Browse Source

Change launch image

Change launch image
MJLee 10 years ago
parent
commit
f70c56b952

+ 2 - 0
MJRefreshExample/MJRefreshExample.xcodeproj/project.pbxproj

@@ -672,6 +672,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
 				GCC_PREFIX_HEADER = MJRefreshExample/PrefixHeader.pch;
 				INFOPLIST_FILE = MJRefreshExample/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 6.0;
@@ -685,6 +686,7 @@
 			isa = XCBuildConfiguration;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
 				GCC_PREFIX_HEADER = MJRefreshExample/PrefixHeader.pch;
 				INFOPLIST_FILE = MJRefreshExample/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 6.0;

BIN
MJRefreshExample/MJRefreshExample.xcodeproj/project.xcworkspace/xcuserdata/mj.xcuserdatad/UserInterfaceState.xcuserstate


+ 16 - 3
MJRefreshExample/MJRefreshExample/Base.lproj/LaunchScreen.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8121.17" systemVersion="14E33b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
+<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">
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8101.14"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -13,34 +13,46 @@
             <subviews>
                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="  Copyright (c) 2015年 小码哥. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
                     <rect key="frame" x="20" y="439" width="441" height="20.5"/>
+                    <animations/>
                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
                 <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="MJRefresh" translatesAutoresizingMaskIntoConstraints="NO" id="XTX-D8-JkJ">
                     <rect key="frame" x="140" y="140" width="200" height="200"/>
+                    <animations/>
                     <constraints>
                         <constraint firstAttribute="height" constant="200" id="Yjl-z0-AQq"/>
                         <constraint firstAttribute="width" constant="200" id="b2j-uN-0ek"/>
                     </constraints>
                 </imageView>
                 <label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="http://www.520it.com" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="ofo-Sj-yNl">
-                    <rect key="frame" x="20" y="398.5" width="440" height="20.5"/>
+                    <rect key="frame" x="20" y="398" width="440" height="20.5"/>
+                    <animations/>
                     <fontDescription key="fontDescription" type="system" pointSize="17"/>
                     <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
+                <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="logo" translatesAutoresizingMaskIntoConstraints="NO" id="0ve-6E-pvp">
+                    <rect key="frame" x="0.0" y="0.0" width="480" height="140"/>
+                    <animations/>
+                </imageView>
             </subviews>
+            <animations/>
             <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
             <constraints>
                 <constraint firstItem="XTX-D8-JkJ" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="AF4-xX-WmS"/>
                 <constraint firstItem="XTX-D8-JkJ" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="HyF-59-iKh"/>
+                <constraint firstItem="0ve-6E-pvp" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="KQM-Cd-Hc3"/>
                 <constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
+                <constraint firstAttribute="trailing" secondItem="0ve-6E-pvp" secondAttribute="trailing" id="LtZ-i4-kFh"/>
                 <constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
                 <constraint firstAttribute="trailing" secondItem="ofo-Sj-yNl" secondAttribute="trailing" constant="20" id="OIk-aG-mfh"/>
                 <constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
+                <constraint firstItem="XTX-D8-JkJ" firstAttribute="top" secondItem="0ve-6E-pvp" secondAttribute="bottom" id="dbG-fu-pEr"/>
                 <constraint firstItem="8ie-xW-0ye" firstAttribute="top" secondItem="ofo-Sj-yNl" secondAttribute="bottom" constant="20" id="gGa-XS-sGm"/>
                 <constraint firstItem="ofo-Sj-yNl" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="gRD-8E-YGE"/>
+                <constraint firstItem="0ve-6E-pvp" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="lEK-cb-8gf"/>
             </constraints>
             <nil key="simulatedStatusBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
@@ -49,5 +61,6 @@
     </objects>
     <resources>
         <image name="MJRefresh" width="400" height="400"/>
+        <image name="logo" width="548" height="200"/>
     </resources>
 </document>

+ 2 - 0
MJRefreshExample/MJRefreshExample/Classes/DIY/MJDIYBackFooter.m

@@ -40,6 +40,7 @@ - (void)prepare
     
     // logo
     UIImageView *logo = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo"]];
+    logo.contentMode = UIViewContentModeScaleAspectFit;
     [self addSubview:logo];
     self.logo = logo;
     
@@ -56,6 +57,7 @@ - (void)placeSubviews
     
     self.label.frame = self.bounds;
     
+    self.logo.bounds = CGRectMake(0, 0, self.bounds.size.width, 100);
     self.logo.center = CGPointMake(self.mj_w * 0.5, self.mj_h + self.logo.mj_h * 0.5);
     
     self.loading.center = CGPointMake(self.mj_w - 30, self.mj_h * 0.5);

+ 2 - 0
MJRefreshExample/MJRefreshExample/Classes/DIY/MJDIYHeader.m

@@ -40,6 +40,7 @@ - (void)prepare
     
     // logo
     UIImageView *logo = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"logo"]];
+    logo.contentMode = UIViewContentModeScaleAspectFit;
     [self addSubview:logo];
     self.logo = logo;
     
@@ -56,6 +57,7 @@ - (void)placeSubviews
 
     self.label.frame = self.bounds;
     
+    self.logo.bounds = CGRectMake(0, 0, self.bounds.size.width, 100);
     self.logo.center = CGPointMake(self.mj_w * 0.5, - self.logo.mj_h + 20);
     
     self.loading.center = CGPointMake(self.mj_w - 30, self.mj_h * 0.5);

+ 4 - 0
MJRefreshExample/MJRefreshExample/Classes/Second/MJTableViewController.m

@@ -46,6 +46,10 @@ - (void)example01
     
     // 马上进入刷新状态
     [self.tableView.header beginRefreshing];
+    
+    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [self.tableView.header beginRefreshing];
+    });
 }
 
 #pragma mark UITableView + 下拉刷新 动画图片

+ 1 - 0
MJRefreshExample/MJRefreshExample/Images.xcassets/logo.imageset/Contents.json

@@ -7,6 +7,7 @@
     },
     {
       "idiom" : "universal",
+      "filename" : "logo@2x.png",
       "scale" : "2x"
     },
     {

BIN
MJRefreshExample/MJRefreshExample/Images.xcassets/logo.imageset/logo.png


BIN
MJRefreshExample/MJRefreshExample/Images.xcassets/logo.imageset/logo@2x.png