Browse Source

Let subviews can be using auto layout

Let subviews can be using auto layout
MJLee 10 years ago
parent
commit
bb7ad80103

+ 2 - 0
MJRefresh/Custom/Footer/Auto/MJRefreshAutoGifFooter.m

@@ -68,6 +68,8 @@ - (void)placeSubviews
 {
 {
     [super placeSubviews];
     [super placeSubviews];
     
     
+    if (self.gifView.constraints.count) return;
+    
     self.gifView.frame = self.bounds;
     self.gifView.frame = self.bounds;
     if (self.isRefreshingTitleHidden) {
     if (self.isRefreshingTitleHidden) {
         self.gifView.contentMode = UIViewContentModeCenter;
         self.gifView.contentMode = UIViewContentModeCenter;

+ 6 - 4
MJRefresh/Custom/Footer/Auto/MJRefreshAutoNormalFooter.m

@@ -43,13 +43,15 @@ - (void)placeSubviews
 {
 {
     [super placeSubviews];
     [super placeSubviews];
     
     
+    if (self.loadingView.constraints.count) return;
+    
     // 圈圈
     // 圈圈
-    CGFloat arrowCenterX = self.mj_w * 0.5;
+    CGFloat loadingCenterX = self.mj_w * 0.5;
     if (!self.isRefreshingTitleHidden) {
     if (!self.isRefreshingTitleHidden) {
-        arrowCenterX -= 100;
+        loadingCenterX -= 100;
     }
     }
-    CGFloat arrowCenterY = self.mj_h * 0.5;
-    self.loadingView.center = CGPointMake(arrowCenterX, arrowCenterY);
+    CGFloat loadingCenterY = self.mj_h * 0.5;
+    self.loadingView.center = CGPointMake(loadingCenterX, loadingCenterY);
 }
 }
 
 
 - (void)setState:(MJRefreshState)state
 - (void)setState:(MJRefreshState)state

+ 2 - 0
MJRefresh/Custom/Footer/Auto/MJRefreshAutoStateFooter.m

@@ -70,6 +70,8 @@ - (void)placeSubviews
 {
 {
     [super placeSubviews];
     [super placeSubviews];
     
     
+    if (self.stateLabel.constraints.count) return;
+    
     // 状态标签
     // 状态标签
     self.stateLabel.frame = self.bounds;
     self.stateLabel.frame = self.bounds;
 }
 }

+ 2 - 0
MJRefresh/Custom/Footer/Back/MJRefreshBackGifFooter.m

@@ -79,6 +79,8 @@ - (void)placeSubviews
 {
 {
     [super placeSubviews];
     [super placeSubviews];
     
     
+    if (self.gifView.constraints.count) return;
+    
     self.gifView.frame = self.bounds;
     self.gifView.frame = self.bounds;
     if (self.stateLabel.hidden) {
     if (self.stateLabel.hidden) {
         self.gifView.contentMode = UIViewContentModeCenter;
         self.gifView.contentMode = UIViewContentModeCenter;

+ 11 - 4
MJRefresh/Custom/Footer/Back/MJRefreshBackNormalFooter.m

@@ -57,17 +57,24 @@ - (void)placeSubviews
 {
 {
     [super placeSubviews];
     [super placeSubviews];
     
     
-    // 箭头
-    self.arrowView.mj_size = self.arrowView.image.size;
+    // 箭头的中心点
     CGFloat arrowCenterX = self.mj_w * 0.5;
     CGFloat arrowCenterX = self.mj_w * 0.5;
     if (!self.stateLabel.hidden) {
     if (!self.stateLabel.hidden) {
         arrowCenterX -= 100;
         arrowCenterX -= 100;
     }
     }
     CGFloat arrowCenterY = self.mj_h * 0.5;
     CGFloat arrowCenterY = self.mj_h * 0.5;
-    self.arrowView.center = CGPointMake(arrowCenterX, arrowCenterY);
+    CGPoint arrowCenter = CGPointMake(arrowCenterX, arrowCenterY);
+    
+    // 箭头
+    if (self.arrowView.constraints.count == 0) {
+        self.arrowView.mj_size = self.arrowView.image.size;
+        self.arrowView.center = arrowCenter;
+    }
     
     
     // 圈圈
     // 圈圈
-    self.loadingView.frame = self.arrowView.frame;
+    if (self.loadingView.constraints.count == 0) {
+        self.loadingView.center = arrowCenter;
+    }
 }
 }
 
 
 - (void)setState:(MJRefreshState)state
 - (void)setState:(MJRefreshState)state

+ 2 - 0
MJRefresh/Custom/Footer/Back/MJRefreshBackStateFooter.m

@@ -63,6 +63,8 @@ - (void)placeSubviews
 {
 {
     [super placeSubviews];
     [super placeSubviews];
     
     
+    if (self.stateLabel.constraints.count) return;
+    
     // 状态标签
     // 状态标签
     self.stateLabel.frame = self.bounds;
     self.stateLabel.frame = self.bounds;
 }
 }

+ 2 - 0
MJRefresh/Custom/Header/MJRefreshGifHeader.m

@@ -81,6 +81,8 @@ - (void)placeSubviews
 {
 {
     [super placeSubviews];
     [super placeSubviews];
     
     
+    if (self.gifView.constraints.count) return;
+    
     self.gifView.frame = self.bounds;
     self.gifView.frame = self.bounds;
     if (self.stateLabel.hidden && self.lastUpdatedTimeLabel.hidden) {
     if (self.stateLabel.hidden && self.lastUpdatedTimeLabel.hidden) {
         self.gifView.contentMode = UIViewContentModeCenter;
         self.gifView.contentMode = UIViewContentModeCenter;

+ 11 - 4
MJRefresh/Custom/Header/MJRefreshNormalHeader.m

@@ -58,17 +58,24 @@ - (void)placeSubviews
 {
 {
     [super placeSubviews];
     [super placeSubviews];
     
     
-    // 箭头
-    self.arrowView.mj_size = self.arrowView.image.size;
+    // 箭头的中心点
     CGFloat arrowCenterX = self.mj_w * 0.5;
     CGFloat arrowCenterX = self.mj_w * 0.5;
     if (!self.stateLabel.hidden) {
     if (!self.stateLabel.hidden) {
         arrowCenterX -= 100;
         arrowCenterX -= 100;
     }
     }
     CGFloat arrowCenterY = self.mj_h * 0.5;
     CGFloat arrowCenterY = self.mj_h * 0.5;
-    self.arrowView.center = CGPointMake(arrowCenterX, arrowCenterY);
+    CGPoint arrowCenter = CGPointMake(arrowCenterX, arrowCenterY);
     
     
+    // 箭头
+    if (self.arrowView.constraints.count == 0) {
+        self.arrowView.mj_size = self.arrowView.image.size;
+        self.arrowView.center = arrowCenter;
+    }
+        
     // 圈圈
     // 圈圈
-    self.loadingView.frame = self.arrowView.frame;
+    if (self.loadingView.constraints.count == 0) {
+        self.loadingView.center = arrowCenter;
+    }
 }
 }
 
 
 - (void)setState:(MJRefreshState)state
 - (void)setState:(MJRefreshState)state

+ 17 - 10
MJRefresh/Custom/Header/MJRefreshStateHeader.m

@@ -55,7 +55,7 @@ - (void)setTitle:(NSString *)title forState:(MJRefreshState)state
 
 
 #pragma mark - 日历获取在9.x之后的系统使用currentCalendar会出异常。在8.0之后使用系统新API。
 #pragma mark - 日历获取在9.x之后的系统使用currentCalendar会出异常。在8.0之后使用系统新API。
 - (NSCalendar *)currentCalendar {
 - (NSCalendar *)currentCalendar {
-    if (([[[UIDevice currentDevice] systemVersion] compare:@"8.0" options:NSNumericSearch] == NSOrderedDescending)) {
+    if (NSFoundationVersionNumber >= NSFoundationVersionNumber_iOS_8_0) {
         return [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
         return [NSCalendar calendarWithIdentifier:NSCalendarIdentifierGregorian];
     }
     }
     return [NSCalendar currentCalendar];
     return [NSCalendar currentCalendar];
@@ -116,21 +116,28 @@ - (void)placeSubviews
     
     
     if (self.stateLabel.hidden) return;
     if (self.stateLabel.hidden) return;
     
     
+    BOOL noConstrainsOnStatusLabel = self.stateLabel.constraints.count == 0;
+    
     if (self.lastUpdatedTimeLabel.hidden) {
     if (self.lastUpdatedTimeLabel.hidden) {
         // 状态
         // 状态
-        self.stateLabel.frame = self.bounds;
+        if (noConstrainsOnStatusLabel) self.stateLabel.frame = self.bounds;
     } else {
     } else {
+        CGFloat stateLabelH = self.mj_h * 0.5;
         // 状态
         // 状态
-        self.stateLabel.mj_x = 0;
-        self.stateLabel.mj_y = 0;
-        self.stateLabel.mj_w = self.mj_w;
-        self.stateLabel.mj_h = self.mj_h * 0.5;
+        if (noConstrainsOnStatusLabel) {
+            self.stateLabel.mj_x = 0;
+            self.stateLabel.mj_y = 0;
+            self.stateLabel.mj_w = self.mj_w;
+            self.stateLabel.mj_h = stateLabelH;
+        }
         
         
         // 更新时间
         // 更新时间
-        self.lastUpdatedTimeLabel.mj_x = 0;
-        self.lastUpdatedTimeLabel.mj_y = self.stateLabel.mj_h;
-        self.lastUpdatedTimeLabel.mj_w = self.mj_w;
-        self.lastUpdatedTimeLabel.mj_h = self.mj_h - self.lastUpdatedTimeLabel.mj_y;
+        if (self.lastUpdatedTimeLabel.constraints.count == 0) {
+            self.lastUpdatedTimeLabel.mj_x = 0;
+            self.lastUpdatedTimeLabel.mj_y = stateLabelH;
+            self.lastUpdatedTimeLabel.mj_w = self.mj_w;
+            self.lastUpdatedTimeLabel.mj_h = self.mj_h - self.lastUpdatedTimeLabel.mj_y;
+        }
     }
     }
 }
 }
 
 

+ 1 - 1
MJRefreshExample/Base.lproj/LaunchScreen.xib

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A284" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
     <dependencies>
     <dependencies>
         <deployment identifier="iOS"/>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>

+ 13 - 1
MJRefreshExample/Base.lproj/Main.storyboard

@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="06B-cM-i4B">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="06B-cM-i4B">
     <dependencies>
     <dependencies>
         <deployment identifier="iOS"/>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
@@ -13,6 +13,7 @@
                     <tabBar key="tabBar" contentMode="scaleToFill" id="BAy-Gq-nS1">
                     <tabBar key="tabBar" contentMode="scaleToFill" id="BAy-Gq-nS1">
                         <rect key="frame" x="0.0" y="0.0" width="320" height="49"/>
                         <rect key="frame" x="0.0" y="0.0" width="320" height="49"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <autoresizingMask key="autoresizingMask"/>
+                        <animations/>
                         <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                         <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                     </tabBar>
                     </tabBar>
                     <connections>
                     <connections>
@@ -31,6 +32,7 @@
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="kOg-FB-cx3">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="kOg-FB-cx3">
                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <animations/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <connections>
                         <connections>
                             <outlet property="dataSource" destination="bYG-Kt-eGn" id="UPe-dz-o9s"/>
                             <outlet property="dataSource" destination="bYG-Kt-eGn" id="UPe-dz-o9s"/>
@@ -51,6 +53,7 @@
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="gXg-XT-JWK">
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="gXg-XT-JWK">
                         <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
                         <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <autoresizingMask key="autoresizingMask"/>
+                        <animations/>
                     </navigationBar>
                     </navigationBar>
                     <connections>
                     <connections>
                         <segue destination="bYG-Kt-eGn" kind="relationship" relationship="rootViewController" id="pQs-fb-3dO"/>
                         <segue destination="bYG-Kt-eGn" kind="relationship" relationship="rootViewController" id="pQs-fb-3dO"/>
@@ -67,6 +70,7 @@
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="cbU-lV-mY4">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="cbU-lV-mY4">
                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <animations/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <connections>
                         <connections>
                             <outlet property="dataSource" destination="m94-yi-d3y" id="tv3-44-MfP"/>
                             <outlet property="dataSource" destination="m94-yi-d3y" id="tv3-44-MfP"/>
@@ -85,6 +89,7 @@
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="Kj6-u7-ICR">
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="Kj6-u7-ICR">
                         <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
                         <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <autoresizingMask key="autoresizingMask"/>
+                        <animations/>
                     </navigationBar>
                     </navigationBar>
                     <connections>
                     <connections>
                         <segue destination="3cf-VR-wv0" kind="relationship" relationship="rootViewController" id="dcc-cy-YeH"/>
                         <segue destination="3cf-VR-wv0" kind="relationship" relationship="rootViewController" id="dcc-cy-YeH"/>
@@ -101,6 +106,7 @@
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="IS9-AM-1DI">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="IS9-AM-1DI">
                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <animations/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <prototypes>
                         <prototypes>
                             <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="example" textLabel="veW-N9-syp" detailTextLabel="Iv7-PA-lBt" style="IBUITableViewCellStyleSubtitle" id="xJS-7u-6pG">
                             <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="example" textLabel="veW-N9-syp" detailTextLabel="Iv7-PA-lBt" style="IBUITableViewCellStyleSubtitle" id="xJS-7u-6pG">
@@ -113,6 +119,7 @@
                                         <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="veW-N9-syp">
                                         <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="veW-N9-syp">
                                             <rect key="frame" x="15" y="6" width="31.5" height="19.5"/>
                                             <rect key="frame" x="15" y="6" width="31.5" height="19.5"/>
                                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <animations/>
                                             <fontDescription key="fontDescription" type="system" pointSize="16"/>
                                             <fontDescription key="fontDescription" type="system" pointSize="16"/>
                                             <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                             <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                             <nil key="highlightedColor"/>
@@ -120,12 +127,15 @@
                                         <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Subtitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Iv7-PA-lBt">
                                         <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Subtitle" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="Iv7-PA-lBt">
                                             <rect key="frame" x="15" y="25.5" width="40.5" height="13.5"/>
                                             <rect key="frame" x="15" y="25.5" width="40.5" height="13.5"/>
                                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <animations/>
                                             <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                             <fontDescription key="fontDescription" type="system" pointSize="11"/>
                                             <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                             <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                                             <nil key="highlightedColor"/>
                                             <nil key="highlightedColor"/>
                                         </label>
                                         </label>
                                     </subviews>
                                     </subviews>
+                                    <animations/>
                                 </tableViewCellContentView>
                                 </tableViewCellContentView>
+                                <animations/>
                             </tableViewCell>
                             </tableViewCell>
                         </prototypes>
                         </prototypes>
                         <connections>
                         <connections>
@@ -148,6 +158,7 @@
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="sAi-eu-GBh">
                     <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="sAi-eu-GBh">
                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <animations/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <connections>
                         <connections>
                             <outlet property="dataSource" destination="cR6-pa-HhO" id="HsB-FV-ckP"/>
                             <outlet property="dataSource" destination="cR6-pa-HhO" id="HsB-FV-ckP"/>
@@ -168,6 +179,7 @@
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="mcw-Hk-IYU">
                     <navigationBar key="navigationBar" contentMode="scaleToFill" id="mcw-Hk-IYU">
                         <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
                         <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
                         <autoresizingMask key="autoresizingMask"/>
                         <autoresizingMask key="autoresizingMask"/>
+                        <animations/>
                     </navigationBar>
                     </navigationBar>
                     <connections>
                     <connections>
                         <segue destination="cR6-pa-HhO" kind="relationship" relationship="rootViewController" id="PUF-0S-3Ga"/>
                         <segue destination="cR6-pa-HhO" kind="relationship" relationship="rootViewController" id="PUF-0S-3Ga"/>

+ 1 - 1
MJRefreshExample/Classes/DIY/MJDIYHeader.h

@@ -6,7 +6,7 @@
 //  Copyright © 2015年 小码哥. All rights reserved.
 //  Copyright © 2015年 小码哥. All rights reserved.
 //
 //
 
 
-#import "MJRefreshHeader.h"
+#import "MJRefresh.h"
 
 
 @interface MJDIYHeader : MJRefreshHeader
 @interface MJDIYHeader : MJRefreshHeader
 
 

+ 3 - 3
MJRefreshExample/Info.plist

@@ -11,7 +11,7 @@
 	<key>CFBundleInfoDictionaryVersion</key>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<string>6.0</string>
 	<key>CFBundleName</key>
 	<key>CFBundleName</key>
-	<string>$(PRODUCT_NAME)</string>
+	<string>MJRefresh</string>
 	<key>CFBundlePackageType</key>
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
 	<key>CFBundleShortVersionString</key>
@@ -20,13 +20,13 @@
 	<string>????</string>
 	<string>????</string>
 	<key>CFBundleVersion</key>
 	<key>CFBundleVersion</key>
 	<string>1</string>
 	<string>1</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
 	<key>NSAppTransportSecurity</key>
 	<key>NSAppTransportSecurity</key>
 	<dict>
 	<dict>
 		<key>NSAllowsArbitraryLoads</key>
 		<key>NSAllowsArbitraryLoads</key>
 		<true/>
 		<true/>
 	</dict>
 	</dict>
-	<key>LSRequiresIPhoneOS</key>
-	<true/>
 	<key>UILaunchStoryboardName</key>
 	<key>UILaunchStoryboardName</key>
 	<string>LaunchScreen</string>
 	<string>LaunchScreen</string>
 	<key>UIMainStoryboardFile</key>
 	<key>UIMainStoryboardFile</key>