├── README.md ├── SmoothTransitionDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── SmoothTransitionDemo.xccheckout │ └── xcuserdata │ │ ├── Delpan.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── apple.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── Delpan.xcuserdatad │ ├── xcdebugger │ │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ │ ├── SmoothTransitionDemo.xcscheme │ │ └── xcschememanagement.plist │ └── apple.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── SmoothTransitionDemo.xcscheme │ └── xcschememanagement.plist ├── SmoothTransitionDemo ├── AppDelegate │ ├── AppDelegate.h │ └── AppDelegate.m ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Launch Screen.xib ├── Resources │ ├── left@2x.png │ └── left@3x.png ├── SmoothTransitionDemo-Info.plist ├── SmoothTransitionDemo-Prefix.pch ├── ViewControllers │ ├── CommonViewControllers │ │ ├── CatalogViewController.h │ │ ├── CatalogViewController.m │ │ ├── RootNavigationController.h │ │ └── RootNavigationController.m │ ├── Situation A │ │ ├── FirstSituationViewController.h │ │ └── FirstSituationViewController.m │ ├── Situation B │ │ ├── SecondSituationViewController.h │ │ └── SecondSituationViewController.m │ └── Situation C │ │ ├── ThirdSituationViewController.h │ │ └── ThirdSituationViewController.m ├── en.lproj │ └── InfoPlist.strings └── main.m └── SmoothTransitionDemoTests ├── SmoothTransitionDemoTests-Info.plist ├── SmoothTransitionDemoTests.m └── en.lproj └── InfoPlist.strings /README.md: -------------------------------------------------------------------------------- 1 | Demo的讲解请看 2 | http://www.jianshu.com/p/77847c0027c9 3 | http://www.jianshu.com/p/92532c2b1d55 4 | -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 186036861C99325E008EE6BB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186036851C99325E008EE6BB /* Foundation.framework */; }; 11 | 186036881C99325E008EE6BB /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186036871C99325E008EE6BB /* CoreGraphics.framework */; }; 12 | 1860368A1C99325E008EE6BB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186036891C99325E008EE6BB /* UIKit.framework */; }; 13 | 186036901C99325E008EE6BB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1860368E1C99325E008EE6BB /* InfoPlist.strings */; }; 14 | 186036921C99325E008EE6BB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 186036911C99325E008EE6BB /* main.m */; }; 15 | 186036981C99325E008EE6BB /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 186036971C99325E008EE6BB /* Images.xcassets */; }; 16 | 1860369F1C99325E008EE6BB /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1860369E1C99325E008EE6BB /* XCTest.framework */; }; 17 | 186036A01C99325E008EE6BB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186036851C99325E008EE6BB /* Foundation.framework */; }; 18 | 186036A11C99325E008EE6BB /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 186036891C99325E008EE6BB /* UIKit.framework */; }; 19 | 186036A91C99325E008EE6BB /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 186036A71C99325E008EE6BB /* InfoPlist.strings */; }; 20 | 186036AB1C99325E008EE6BB /* SmoothTransitionDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 186036AA1C99325E008EE6BB /* SmoothTransitionDemoTests.m */; }; 21 | 1889C9271C9938600055881E /* CatalogViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1889C9261C9938600055881E /* CatalogViewController.m */; }; 22 | 1889C92A1C9938B90055881E /* RootNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1889C9291C9938B90055881E /* RootNavigationController.m */; }; 23 | 1889C92D1C99587D0055881E /* FirstSituationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1889C92C1C99587D0055881E /* FirstSituationViewController.m */; }; 24 | 1889C9311C9958FA0055881E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1889C9301C9958FA0055881E /* AppDelegate.m */; }; 25 | 1889C9351C9959860055881E /* left@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1889C9331C9959860055881E /* left@2x.png */; }; 26 | 1889C9361C9959860055881E /* left@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1889C9341C9959860055881E /* left@3x.png */; }; 27 | 189E44321C9F86CC00F8E1D2 /* Launch Screen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 189E44311C9F86CC00F8E1D2 /* Launch Screen.xib */; }; 28 | 18C433A41C9A5CC300B99262 /* SecondSituationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C433A31C9A5CC300B99262 /* SecondSituationViewController.m */; }; 29 | 32C7CA801CCF4930009E6687 /* ThirdSituationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 32C7CA7F1CCF4930009E6687 /* ThirdSituationViewController.m */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXContainerItemProxy section */ 33 | 186036A21C99325E008EE6BB /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = 1860367A1C99325E008EE6BB /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = 186036811C99325E008EE6BB; 38 | remoteInfo = SmoothTransitionDemo; 39 | }; 40 | /* End PBXContainerItemProxy section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | 186036821C99325E008EE6BB /* SmoothTransitionDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SmoothTransitionDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 186036851C99325E008EE6BB /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 45 | 186036871C99325E008EE6BB /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 46 | 186036891C99325E008EE6BB /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 47 | 1860368D1C99325E008EE6BB /* SmoothTransitionDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SmoothTransitionDemo-Info.plist"; sourceTree = ""; }; 48 | 1860368F1C99325E008EE6BB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 49 | 186036911C99325E008EE6BB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 50 | 186036931C99325E008EE6BB /* SmoothTransitionDemo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "SmoothTransitionDemo-Prefix.pch"; sourceTree = ""; }; 51 | 186036971C99325E008EE6BB /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 52 | 1860369D1C99325E008EE6BB /* SmoothTransitionDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SmoothTransitionDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 1860369E1C99325E008EE6BB /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 54 | 186036A61C99325E008EE6BB /* SmoothTransitionDemoTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "SmoothTransitionDemoTests-Info.plist"; sourceTree = ""; }; 55 | 186036A81C99325E008EE6BB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 56 | 186036AA1C99325E008EE6BB /* SmoothTransitionDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SmoothTransitionDemoTests.m; sourceTree = ""; }; 57 | 1889C9251C9938600055881E /* CatalogViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CatalogViewController.h; sourceTree = ""; }; 58 | 1889C9261C9938600055881E /* CatalogViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CatalogViewController.m; sourceTree = ""; }; 59 | 1889C9281C9938B90055881E /* RootNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootNavigationController.h; sourceTree = ""; }; 60 | 1889C9291C9938B90055881E /* RootNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootNavigationController.m; sourceTree = ""; }; 61 | 1889C92B1C99587D0055881E /* FirstSituationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FirstSituationViewController.h; sourceTree = ""; }; 62 | 1889C92C1C99587D0055881E /* FirstSituationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FirstSituationViewController.m; sourceTree = ""; }; 63 | 1889C92F1C9958FA0055881E /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 64 | 1889C9301C9958FA0055881E /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 65 | 1889C9331C9959860055881E /* left@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "left@2x.png"; sourceTree = ""; }; 66 | 1889C9341C9959860055881E /* left@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "left@3x.png"; sourceTree = ""; }; 67 | 189E44311C9F86CC00F8E1D2 /* Launch Screen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = "Launch Screen.xib"; sourceTree = ""; }; 68 | 18C433A21C9A5CC300B99262 /* SecondSituationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecondSituationViewController.h; sourceTree = ""; }; 69 | 18C433A31C9A5CC300B99262 /* SecondSituationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecondSituationViewController.m; sourceTree = ""; }; 70 | 32C7CA7E1CCF4930009E6687 /* ThirdSituationViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThirdSituationViewController.h; sourceTree = ""; }; 71 | 32C7CA7F1CCF4930009E6687 /* ThirdSituationViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThirdSituationViewController.m; sourceTree = ""; }; 72 | /* End PBXFileReference section */ 73 | 74 | /* Begin PBXFrameworksBuildPhase section */ 75 | 1860367F1C99325E008EE6BB /* Frameworks */ = { 76 | isa = PBXFrameworksBuildPhase; 77 | buildActionMask = 2147483647; 78 | files = ( 79 | 186036881C99325E008EE6BB /* CoreGraphics.framework in Frameworks */, 80 | 1860368A1C99325E008EE6BB /* UIKit.framework in Frameworks */, 81 | 186036861C99325E008EE6BB /* Foundation.framework in Frameworks */, 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | 1860369A1C99325E008EE6BB /* Frameworks */ = { 86 | isa = PBXFrameworksBuildPhase; 87 | buildActionMask = 2147483647; 88 | files = ( 89 | 1860369F1C99325E008EE6BB /* XCTest.framework in Frameworks */, 90 | 186036A11C99325E008EE6BB /* UIKit.framework in Frameworks */, 91 | 186036A01C99325E008EE6BB /* Foundation.framework in Frameworks */, 92 | ); 93 | runOnlyForDeploymentPostprocessing = 0; 94 | }; 95 | /* End PBXFrameworksBuildPhase section */ 96 | 97 | /* Begin PBXGroup section */ 98 | 186036791C99325E008EE6BB = { 99 | isa = PBXGroup; 100 | children = ( 101 | 1860368B1C99325E008EE6BB /* SmoothTransitionDemo */, 102 | 186036A41C99325E008EE6BB /* SmoothTransitionDemoTests */, 103 | 186036841C99325E008EE6BB /* Frameworks */, 104 | 186036831C99325E008EE6BB /* Products */, 105 | ); 106 | sourceTree = ""; 107 | }; 108 | 186036831C99325E008EE6BB /* Products */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 186036821C99325E008EE6BB /* SmoothTransitionDemo.app */, 112 | 1860369D1C99325E008EE6BB /* SmoothTransitionDemoTests.xctest */, 113 | ); 114 | name = Products; 115 | sourceTree = ""; 116 | }; 117 | 186036841C99325E008EE6BB /* Frameworks */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 186036851C99325E008EE6BB /* Foundation.framework */, 121 | 186036871C99325E008EE6BB /* CoreGraphics.framework */, 122 | 186036891C99325E008EE6BB /* UIKit.framework */, 123 | 1860369E1C99325E008EE6BB /* XCTest.framework */, 124 | ); 125 | name = Frameworks; 126 | sourceTree = ""; 127 | }; 128 | 1860368B1C99325E008EE6BB /* SmoothTransitionDemo */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 1889C9321C99594F0055881E /* Resources */, 132 | 1889C91D1C9935950055881E /* ViewControllers */, 133 | 1889C92E1C9958FA0055881E /* AppDelegate */, 134 | 186036971C99325E008EE6BB /* Images.xcassets */, 135 | 1860368C1C99325E008EE6BB /* Supporting Files */, 136 | ); 137 | path = SmoothTransitionDemo; 138 | sourceTree = ""; 139 | }; 140 | 1860368C1C99325E008EE6BB /* Supporting Files */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 1860368D1C99325E008EE6BB /* SmoothTransitionDemo-Info.plist */, 144 | 1860368E1C99325E008EE6BB /* InfoPlist.strings */, 145 | 186036911C99325E008EE6BB /* main.m */, 146 | 186036931C99325E008EE6BB /* SmoothTransitionDemo-Prefix.pch */, 147 | 189E44311C9F86CC00F8E1D2 /* Launch Screen.xib */, 148 | ); 149 | name = "Supporting Files"; 150 | sourceTree = ""; 151 | }; 152 | 186036A41C99325E008EE6BB /* SmoothTransitionDemoTests */ = { 153 | isa = PBXGroup; 154 | children = ( 155 | 186036AA1C99325E008EE6BB /* SmoothTransitionDemoTests.m */, 156 | 186036A51C99325E008EE6BB /* Supporting Files */, 157 | ); 158 | path = SmoothTransitionDemoTests; 159 | sourceTree = ""; 160 | }; 161 | 186036A51C99325E008EE6BB /* Supporting Files */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 186036A61C99325E008EE6BB /* SmoothTransitionDemoTests-Info.plist */, 165 | 186036A71C99325E008EE6BB /* InfoPlist.strings */, 166 | ); 167 | name = "Supporting Files"; 168 | sourceTree = ""; 169 | }; 170 | 1889C91D1C9935950055881E /* ViewControllers */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | 1889C9241C9938600055881E /* CommonViewControllers */, 174 | 1889C91E1C9935950055881E /* Situation A */, 175 | 1889C91F1C9935950055881E /* Situation B */, 176 | 32C7CA7D1CCF4930009E6687 /* Situation C */, 177 | ); 178 | path = ViewControllers; 179 | sourceTree = ""; 180 | }; 181 | 1889C91E1C9935950055881E /* Situation A */ = { 182 | isa = PBXGroup; 183 | children = ( 184 | 1889C92B1C99587D0055881E /* FirstSituationViewController.h */, 185 | 1889C92C1C99587D0055881E /* FirstSituationViewController.m */, 186 | ); 187 | path = "Situation A"; 188 | sourceTree = ""; 189 | }; 190 | 1889C91F1C9935950055881E /* Situation B */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | 18C433A21C9A5CC300B99262 /* SecondSituationViewController.h */, 194 | 18C433A31C9A5CC300B99262 /* SecondSituationViewController.m */, 195 | ); 196 | path = "Situation B"; 197 | sourceTree = ""; 198 | }; 199 | 1889C9241C9938600055881E /* CommonViewControllers */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | 1889C9281C9938B90055881E /* RootNavigationController.h */, 203 | 1889C9291C9938B90055881E /* RootNavigationController.m */, 204 | 1889C9251C9938600055881E /* CatalogViewController.h */, 205 | 1889C9261C9938600055881E /* CatalogViewController.m */, 206 | ); 207 | path = CommonViewControllers; 208 | sourceTree = ""; 209 | }; 210 | 1889C92E1C9958FA0055881E /* AppDelegate */ = { 211 | isa = PBXGroup; 212 | children = ( 213 | 1889C92F1C9958FA0055881E /* AppDelegate.h */, 214 | 1889C9301C9958FA0055881E /* AppDelegate.m */, 215 | ); 216 | path = AppDelegate; 217 | sourceTree = ""; 218 | }; 219 | 1889C9321C99594F0055881E /* Resources */ = { 220 | isa = PBXGroup; 221 | children = ( 222 | 1889C9331C9959860055881E /* left@2x.png */, 223 | 1889C9341C9959860055881E /* left@3x.png */, 224 | ); 225 | path = Resources; 226 | sourceTree = ""; 227 | }; 228 | 32C7CA7D1CCF4930009E6687 /* Situation C */ = { 229 | isa = PBXGroup; 230 | children = ( 231 | 32C7CA7E1CCF4930009E6687 /* ThirdSituationViewController.h */, 232 | 32C7CA7F1CCF4930009E6687 /* ThirdSituationViewController.m */, 233 | ); 234 | path = "Situation C"; 235 | sourceTree = ""; 236 | }; 237 | /* End PBXGroup section */ 238 | 239 | /* Begin PBXNativeTarget section */ 240 | 186036811C99325E008EE6BB /* SmoothTransitionDemo */ = { 241 | isa = PBXNativeTarget; 242 | buildConfigurationList = 186036AE1C99325E008EE6BB /* Build configuration list for PBXNativeTarget "SmoothTransitionDemo" */; 243 | buildPhases = ( 244 | 1860367E1C99325E008EE6BB /* Sources */, 245 | 1860367F1C99325E008EE6BB /* Frameworks */, 246 | 186036801C99325E008EE6BB /* Resources */, 247 | ); 248 | buildRules = ( 249 | ); 250 | dependencies = ( 251 | ); 252 | name = SmoothTransitionDemo; 253 | productName = SmoothTransitionDemo; 254 | productReference = 186036821C99325E008EE6BB /* SmoothTransitionDemo.app */; 255 | productType = "com.apple.product-type.application"; 256 | }; 257 | 1860369C1C99325E008EE6BB /* SmoothTransitionDemoTests */ = { 258 | isa = PBXNativeTarget; 259 | buildConfigurationList = 186036B11C99325E008EE6BB /* Build configuration list for PBXNativeTarget "SmoothTransitionDemoTests" */; 260 | buildPhases = ( 261 | 186036991C99325E008EE6BB /* Sources */, 262 | 1860369A1C99325E008EE6BB /* Frameworks */, 263 | 1860369B1C99325E008EE6BB /* Resources */, 264 | ); 265 | buildRules = ( 266 | ); 267 | dependencies = ( 268 | 186036A31C99325E008EE6BB /* PBXTargetDependency */, 269 | ); 270 | name = SmoothTransitionDemoTests; 271 | productName = SmoothTransitionDemoTests; 272 | productReference = 1860369D1C99325E008EE6BB /* SmoothTransitionDemoTests.xctest */; 273 | productType = "com.apple.product-type.bundle.unit-test"; 274 | }; 275 | /* End PBXNativeTarget section */ 276 | 277 | /* Begin PBXProject section */ 278 | 1860367A1C99325E008EE6BB /* Project object */ = { 279 | isa = PBXProject; 280 | attributes = { 281 | LastUpgradeCheck = 0510; 282 | ORGANIZATIONNAME = Delpan; 283 | TargetAttributes = { 284 | 1860369C1C99325E008EE6BB = { 285 | TestTargetID = 186036811C99325E008EE6BB; 286 | }; 287 | }; 288 | }; 289 | buildConfigurationList = 1860367D1C99325E008EE6BB /* Build configuration list for PBXProject "SmoothTransitionDemo" */; 290 | compatibilityVersion = "Xcode 3.2"; 291 | developmentRegion = English; 292 | hasScannedForEncodings = 0; 293 | knownRegions = ( 294 | en, 295 | ); 296 | mainGroup = 186036791C99325E008EE6BB; 297 | productRefGroup = 186036831C99325E008EE6BB /* Products */; 298 | projectDirPath = ""; 299 | projectRoot = ""; 300 | targets = ( 301 | 186036811C99325E008EE6BB /* SmoothTransitionDemo */, 302 | 1860369C1C99325E008EE6BB /* SmoothTransitionDemoTests */, 303 | ); 304 | }; 305 | /* End PBXProject section */ 306 | 307 | /* Begin PBXResourcesBuildPhase section */ 308 | 186036801C99325E008EE6BB /* Resources */ = { 309 | isa = PBXResourcesBuildPhase; 310 | buildActionMask = 2147483647; 311 | files = ( 312 | 1889C9361C9959860055881E /* left@3x.png in Resources */, 313 | 186036901C99325E008EE6BB /* InfoPlist.strings in Resources */, 314 | 186036981C99325E008EE6BB /* Images.xcassets in Resources */, 315 | 1889C9351C9959860055881E /* left@2x.png in Resources */, 316 | 189E44321C9F86CC00F8E1D2 /* Launch Screen.xib in Resources */, 317 | ); 318 | runOnlyForDeploymentPostprocessing = 0; 319 | }; 320 | 1860369B1C99325E008EE6BB /* Resources */ = { 321 | isa = PBXResourcesBuildPhase; 322 | buildActionMask = 2147483647; 323 | files = ( 324 | 186036A91C99325E008EE6BB /* InfoPlist.strings in Resources */, 325 | ); 326 | runOnlyForDeploymentPostprocessing = 0; 327 | }; 328 | /* End PBXResourcesBuildPhase section */ 329 | 330 | /* Begin PBXSourcesBuildPhase section */ 331 | 1860367E1C99325E008EE6BB /* Sources */ = { 332 | isa = PBXSourcesBuildPhase; 333 | buildActionMask = 2147483647; 334 | files = ( 335 | 1889C9271C9938600055881E /* CatalogViewController.m in Sources */, 336 | 1889C92D1C99587D0055881E /* FirstSituationViewController.m in Sources */, 337 | 1889C9311C9958FA0055881E /* AppDelegate.m in Sources */, 338 | 32C7CA801CCF4930009E6687 /* ThirdSituationViewController.m in Sources */, 339 | 18C433A41C9A5CC300B99262 /* SecondSituationViewController.m in Sources */, 340 | 1889C92A1C9938B90055881E /* RootNavigationController.m in Sources */, 341 | 186036921C99325E008EE6BB /* main.m in Sources */, 342 | ); 343 | runOnlyForDeploymentPostprocessing = 0; 344 | }; 345 | 186036991C99325E008EE6BB /* Sources */ = { 346 | isa = PBXSourcesBuildPhase; 347 | buildActionMask = 2147483647; 348 | files = ( 349 | 186036AB1C99325E008EE6BB /* SmoothTransitionDemoTests.m in Sources */, 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | /* End PBXSourcesBuildPhase section */ 354 | 355 | /* Begin PBXTargetDependency section */ 356 | 186036A31C99325E008EE6BB /* PBXTargetDependency */ = { 357 | isa = PBXTargetDependency; 358 | target = 186036811C99325E008EE6BB /* SmoothTransitionDemo */; 359 | targetProxy = 186036A21C99325E008EE6BB /* PBXContainerItemProxy */; 360 | }; 361 | /* End PBXTargetDependency section */ 362 | 363 | /* Begin PBXVariantGroup section */ 364 | 1860368E1C99325E008EE6BB /* InfoPlist.strings */ = { 365 | isa = PBXVariantGroup; 366 | children = ( 367 | 1860368F1C99325E008EE6BB /* en */, 368 | ); 369 | name = InfoPlist.strings; 370 | sourceTree = ""; 371 | }; 372 | 186036A71C99325E008EE6BB /* InfoPlist.strings */ = { 373 | isa = PBXVariantGroup; 374 | children = ( 375 | 186036A81C99325E008EE6BB /* en */, 376 | ); 377 | name = InfoPlist.strings; 378 | sourceTree = ""; 379 | }; 380 | /* End PBXVariantGroup section */ 381 | 382 | /* Begin XCBuildConfiguration section */ 383 | 186036AC1C99325E008EE6BB /* Debug */ = { 384 | isa = XCBuildConfiguration; 385 | buildSettings = { 386 | ALWAYS_SEARCH_USER_PATHS = NO; 387 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 388 | CLANG_CXX_LIBRARY = "libc++"; 389 | CLANG_ENABLE_MODULES = YES; 390 | CLANG_ENABLE_OBJC_ARC = YES; 391 | CLANG_WARN_BOOL_CONVERSION = YES; 392 | CLANG_WARN_CONSTANT_CONVERSION = YES; 393 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 394 | CLANG_WARN_EMPTY_BODY = YES; 395 | CLANG_WARN_ENUM_CONVERSION = YES; 396 | CLANG_WARN_INT_CONVERSION = YES; 397 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 398 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 399 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 400 | COPY_PHASE_STRIP = NO; 401 | GCC_C_LANGUAGE_STANDARD = gnu99; 402 | GCC_DYNAMIC_NO_PIC = NO; 403 | GCC_OPTIMIZATION_LEVEL = 0; 404 | GCC_PREPROCESSOR_DEFINITIONS = ( 405 | "DEBUG=1", 406 | "$(inherited)", 407 | ); 408 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 409 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 410 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 411 | GCC_WARN_UNDECLARED_SELECTOR = YES; 412 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 413 | GCC_WARN_UNUSED_FUNCTION = YES; 414 | GCC_WARN_UNUSED_VARIABLE = YES; 415 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 416 | ONLY_ACTIVE_ARCH = YES; 417 | SDKROOT = iphoneos; 418 | }; 419 | name = Debug; 420 | }; 421 | 186036AD1C99325E008EE6BB /* Release */ = { 422 | isa = XCBuildConfiguration; 423 | buildSettings = { 424 | ALWAYS_SEARCH_USER_PATHS = NO; 425 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 426 | CLANG_CXX_LIBRARY = "libc++"; 427 | CLANG_ENABLE_MODULES = YES; 428 | CLANG_ENABLE_OBJC_ARC = YES; 429 | CLANG_WARN_BOOL_CONVERSION = YES; 430 | CLANG_WARN_CONSTANT_CONVERSION = YES; 431 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 432 | CLANG_WARN_EMPTY_BODY = YES; 433 | CLANG_WARN_ENUM_CONVERSION = YES; 434 | CLANG_WARN_INT_CONVERSION = YES; 435 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 436 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 437 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 438 | COPY_PHASE_STRIP = YES; 439 | ENABLE_NS_ASSERTIONS = NO; 440 | GCC_C_LANGUAGE_STANDARD = gnu99; 441 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 442 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 443 | GCC_WARN_UNDECLARED_SELECTOR = YES; 444 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 445 | GCC_WARN_UNUSED_FUNCTION = YES; 446 | GCC_WARN_UNUSED_VARIABLE = YES; 447 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 448 | SDKROOT = iphoneos; 449 | VALIDATE_PRODUCT = YES; 450 | }; 451 | name = Release; 452 | }; 453 | 186036AF1C99325E008EE6BB /* Debug */ = { 454 | isa = XCBuildConfiguration; 455 | buildSettings = { 456 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 457 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 458 | GCC_PREFIX_HEADER = "SmoothTransitionDemo/SmoothTransitionDemo-Prefix.pch"; 459 | INFOPLIST_FILE = "SmoothTransitionDemo/SmoothTransitionDemo-Info.plist"; 460 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 461 | PRODUCT_NAME = "$(TARGET_NAME)"; 462 | WRAPPER_EXTENSION = app; 463 | }; 464 | name = Debug; 465 | }; 466 | 186036B01C99325E008EE6BB /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | buildSettings = { 469 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 470 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 471 | GCC_PREFIX_HEADER = "SmoothTransitionDemo/SmoothTransitionDemo-Prefix.pch"; 472 | INFOPLIST_FILE = "SmoothTransitionDemo/SmoothTransitionDemo-Info.plist"; 473 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 474 | PRODUCT_NAME = "$(TARGET_NAME)"; 475 | WRAPPER_EXTENSION = app; 476 | }; 477 | name = Release; 478 | }; 479 | 186036B21C99325E008EE6BB /* Debug */ = { 480 | isa = XCBuildConfiguration; 481 | buildSettings = { 482 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/SmoothTransitionDemo.app/SmoothTransitionDemo"; 483 | FRAMEWORK_SEARCH_PATHS = ( 484 | "$(SDKROOT)/Developer/Library/Frameworks", 485 | "$(inherited)", 486 | "$(DEVELOPER_FRAMEWORKS_DIR)", 487 | ); 488 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 489 | GCC_PREFIX_HEADER = "SmoothTransitionDemo/SmoothTransitionDemo-Prefix.pch"; 490 | GCC_PREPROCESSOR_DEFINITIONS = ( 491 | "DEBUG=1", 492 | "$(inherited)", 493 | ); 494 | INFOPLIST_FILE = "SmoothTransitionDemoTests/SmoothTransitionDemoTests-Info.plist"; 495 | PRODUCT_NAME = "$(TARGET_NAME)"; 496 | TEST_HOST = "$(BUNDLE_LOADER)"; 497 | WRAPPER_EXTENSION = xctest; 498 | }; 499 | name = Debug; 500 | }; 501 | 186036B31C99325E008EE6BB /* Release */ = { 502 | isa = XCBuildConfiguration; 503 | buildSettings = { 504 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/SmoothTransitionDemo.app/SmoothTransitionDemo"; 505 | FRAMEWORK_SEARCH_PATHS = ( 506 | "$(SDKROOT)/Developer/Library/Frameworks", 507 | "$(inherited)", 508 | "$(DEVELOPER_FRAMEWORKS_DIR)", 509 | ); 510 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 511 | GCC_PREFIX_HEADER = "SmoothTransitionDemo/SmoothTransitionDemo-Prefix.pch"; 512 | INFOPLIST_FILE = "SmoothTransitionDemoTests/SmoothTransitionDemoTests-Info.plist"; 513 | PRODUCT_NAME = "$(TARGET_NAME)"; 514 | TEST_HOST = "$(BUNDLE_LOADER)"; 515 | WRAPPER_EXTENSION = xctest; 516 | }; 517 | name = Release; 518 | }; 519 | /* End XCBuildConfiguration section */ 520 | 521 | /* Begin XCConfigurationList section */ 522 | 1860367D1C99325E008EE6BB /* Build configuration list for PBXProject "SmoothTransitionDemo" */ = { 523 | isa = XCConfigurationList; 524 | buildConfigurations = ( 525 | 186036AC1C99325E008EE6BB /* Debug */, 526 | 186036AD1C99325E008EE6BB /* Release */, 527 | ); 528 | defaultConfigurationIsVisible = 0; 529 | defaultConfigurationName = Release; 530 | }; 531 | 186036AE1C99325E008EE6BB /* Build configuration list for PBXNativeTarget "SmoothTransitionDemo" */ = { 532 | isa = XCConfigurationList; 533 | buildConfigurations = ( 534 | 186036AF1C99325E008EE6BB /* Debug */, 535 | 186036B01C99325E008EE6BB /* Release */, 536 | ); 537 | defaultConfigurationIsVisible = 0; 538 | defaultConfigurationName = Release; 539 | }; 540 | 186036B11C99325E008EE6BB /* Build configuration list for PBXNativeTarget "SmoothTransitionDemoTests" */ = { 541 | isa = XCConfigurationList; 542 | buildConfigurations = ( 543 | 186036B21C99325E008EE6BB /* Debug */, 544 | 186036B31C99325E008EE6BB /* Release */, 545 | ); 546 | defaultConfigurationIsVisible = 0; 547 | defaultConfigurationName = Release; 548 | }; 549 | /* End XCConfigurationList section */ 550 | }; 551 | rootObject = 1860367A1C99325E008EE6BB /* Project object */; 552 | } 553 | -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/project.xcworkspace/xcshareddata/SmoothTransitionDemo.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 916E2A14-1C57-404D-93D2-06BC4F28EAFC 9 | IDESourceControlProjectName 10 | SmoothTransitionDemo 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 01054297E58913D754D3BFAD194F97F4778B760D 14 | https://github.com/IOSDelpan/SmoothTransitionDemo.git 15 | 16 | IDESourceControlProjectPath 17 | SmoothTransitionDemo.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 01054297E58913D754D3BFAD194F97F4778B760D 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/IOSDelpan/SmoothTransitionDemo.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 01054297E58913D754D3BFAD194F97F4778B760D 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 01054297E58913D754D3BFAD194F97F4778B760D 36 | IDESourceControlWCCName 37 | SmoothTransitionDemo 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/project.xcworkspace/xcuserdata/Delpan.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IOSDelpan/SmoothTransitionDemo/9b95aa8c4abe84248f9c29363d27eaf77295aeb7/SmoothTransitionDemo.xcodeproj/project.xcworkspace/xcuserdata/Delpan.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IOSDelpan/SmoothTransitionDemo/9b95aa8c4abe84248f9c29363d27eaf77295aeb7/SmoothTransitionDemo.xcodeproj/project.xcworkspace/xcuserdata/apple.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/xcuserdata/Delpan.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/xcuserdata/Delpan.xcuserdatad/xcschemes/SmoothTransitionDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 94 | 100 | 101 | 102 | 103 | 105 | 106 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/xcuserdata/Delpan.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SmoothTransitionDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 186036811C99325E008EE6BB 16 | 17 | primary 18 | 19 | 20 | 1860369C1C99325E008EE6BB 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/xcuserdata/apple.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/SmoothTransitionDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /SmoothTransitionDemo.xcodeproj/xcuserdata/apple.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SmoothTransitionDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 186036811C99325E008EE6BB 16 | 17 | primary 18 | 19 | 20 | 1860369C1C99325E008EE6BB 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/AppDelegate/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/16. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/AppDelegate/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/16. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "RootNavigationController.h" 11 | #import "CatalogViewController.h" 12 | 13 | @implementation AppDelegate 14 | 15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 16 | { 17 | CatalogViewController *rootController = [[CatalogViewController alloc] initWithStyle:UITableViewStyleGrouped]; 18 | RootNavigationController *navigationController = [[RootNavigationController alloc] initWithRootViewController:rootController]; 19 | 20 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 21 | // Override point for customization after application launch. 22 | self.window.backgroundColor = [UIColor whiteColor]; 23 | self.window.rootViewController = navigationController; 24 | [self.window makeKeyAndVisible]; 25 | 26 | return YES; 27 | } 28 | 29 | @end 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /SmoothTransitionDemo/Launch Screen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 23 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/Resources/left@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IOSDelpan/SmoothTransitionDemo/9b95aa8c4abe84248f9c29363d27eaf77295aeb7/SmoothTransitionDemo/Resources/left@2x.png -------------------------------------------------------------------------------- /SmoothTransitionDemo/Resources/left@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IOSDelpan/SmoothTransitionDemo/9b95aa8c4abe84248f9c29363d27eaf77295aeb7/SmoothTransitionDemo/Resources/left@3x.png -------------------------------------------------------------------------------- /SmoothTransitionDemo/SmoothTransitionDemo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.-.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | Launch Screen 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/SmoothTransitionDemo-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_3_0 10 | #warning "This project uses features only available in iOS SDK 3.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | 17 | #define iPhoneHeight [[UIScreen mainScreen] bounds].size.height 18 | #define iPhoneWidth [[UIScreen mainScreen] bounds].size.width 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/ViewControllers/CommonViewControllers/CatalogViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CatalogViewController.h 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/16. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CatalogViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/ViewControllers/CommonViewControllers/CatalogViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CatalogViewController.m 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/16. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | static NSString *const Identifier = @"Cell"; 10 | 11 | /** 区头高度 */ 12 | static const CGFloat TableViewHeadHeight = 40.0f; 13 | 14 | #import "CatalogViewController.h" 15 | #import "FirstSituationViewController.h" 16 | #import "SecondSituationViewController.h" 17 | #import "ThirdSituationViewController.h" 18 | 19 | @interface CatalogViewController () 20 | { 21 | /** 章节 */ 22 | NSArray *chapters; 23 | } 24 | 25 | @end 26 | 27 | @implementation CatalogViewController 28 | 29 | - (instancetype)initWithStyle:(UITableViewStyle)style 30 | { 31 | if (self = [super initWithStyle:style]) 32 | { 33 | self.title = @"目录"; 34 | 35 | chapters = @[ @{ @"Title" : @"情形一", 36 | @"Contents" : @[ @"同步读取数据", @"异步读取数据" ] }, 37 | 38 | @{ @"Title" : @"情形二", 39 | @"Contents" : @[ @"默认加载UI", @"viewDidAppear时加载UI", @"在RunLoop下一次循环加载UI", @"定时器加载UI", @"GCD嵌套加载UI" ] }, 40 | 41 | @{ @"Title" : @"情形三", 42 | @"Contents" : @[ @"默认加载UI", @"截图加载UI" ] } ]; 43 | } 44 | 45 | return self; 46 | } 47 | 48 | - (void)viewDidLoad 49 | { 50 | [super viewDidLoad]; 51 | 52 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:Identifier]; 53 | } 54 | 55 | #pragma mark - Delegate 56 | #pragma mark UITableViewDataSource 57 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView 58 | { 59 | return chapters.count; 60 | } 61 | 62 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section 63 | { 64 | return [chapters[section][@"Contents"] count]; 65 | } 66 | 67 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 68 | { 69 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:Identifier]; 70 | cell.textLabel.backgroundColor = [UIColor whiteColor]; 71 | cell.textLabel.layer.masksToBounds = YES; 72 | cell.textLabel.opaque = YES; 73 | cell.textLabel.textColor = [UIColor grayColor]; 74 | cell.textLabel.text = chapters[indexPath.section][@"Contents"][indexPath.row]; 75 | 76 | return cell; 77 | } 78 | 79 | #pragma mark UITableViewDelegate 80 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section 81 | { 82 | return TableViewHeadHeight; 83 | } 84 | 85 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section 86 | { 87 | return 0.01f; 88 | } 89 | 90 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section 91 | { 92 | UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, iPhoneWidth, TableViewHeadHeight)]; 93 | headerView.backgroundColor = tableView.backgroundColor; 94 | 95 | // 区头标题 96 | UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, 0, (iPhoneWidth - 15), TableViewHeadHeight)]; 97 | titleLabel.backgroundColor = headerView.backgroundColor; 98 | titleLabel.layer.masksToBounds = YES; 99 | titleLabel.opaque = YES; 100 | titleLabel.textColor = [UIColor grayColor]; 101 | titleLabel.text = chapters[section][@"Title"]; 102 | [headerView addSubview:titleLabel]; 103 | 104 | return headerView; 105 | } 106 | 107 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 108 | { 109 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 110 | 111 | UIViewController *controller; 112 | 113 | if (indexPath.section == 0) 114 | { 115 | controller = [FirstSituationViewController createWithAsyncLoadData:indexPath.row]; 116 | } 117 | else if (indexPath.section == 1) 118 | { 119 | controller = [SecondSituationViewController createWithType:indexPath.row]; 120 | } 121 | else 122 | { 123 | controller = [ThirdSituationViewController createWithType:indexPath.row]; 124 | } 125 | 126 | [self.navigationController pushViewController:controller animated:YES]; 127 | } 128 | 129 | @end 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/ViewControllers/CommonViewControllers/RootNavigationController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootNavigationController.h 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/16. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface RootNavigationController : UINavigationController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/ViewControllers/CommonViewControllers/RootNavigationController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RootNavigationController.m 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/16. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import "RootNavigationController.h" 10 | 11 | @interface RootNavigationController () 12 | 13 | @end 14 | 15 | @implementation RootNavigationController 16 | 17 | - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated 18 | { 19 | viewController.edgesForExtendedLayout = UIRectEdgeNone; 20 | 21 | if (self.childViewControllers.count) 22 | { 23 | id target = ([viewController respondsToSelector:@selector(navigationPop:)] ? viewController : self); 24 | 25 | // 返因按钮 26 | UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; 27 | backButton.bounds = CGRectMake(0, 0, 40, 40); 28 | backButton.imageEdgeInsets = UIEdgeInsetsMake(0, -14, 0, 0); 29 | [backButton setImage:[UIImage imageNamed:@"left"] forState:UIControlStateNormal]; 30 | [backButton addTarget:target action:@selector(navigationPop:) forControlEvents:UIControlEventTouchUpInside]; 31 | 32 | viewController.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backButton]; 33 | } 34 | 35 | [super pushViewController:viewController animated:YES]; 36 | } 37 | 38 | #pragma mark - Action 39 | #pragma mark Back 40 | - (void)navigationPop:(UIButton *)sender 41 | { 42 | [self popViewControllerAnimated:YES]; 43 | } 44 | 45 | @end 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/ViewControllers/Situation A/FirstSituationViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FirstSituationViewController.h 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/16. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FirstSituationViewController : UIViewController 12 | 13 | + (instancetype)createWithAsyncLoadData:(BOOL)async; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/ViewControllers/Situation A/FirstSituationViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // FirstSituationViewController.m 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/16. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import "FirstSituationViewController.h" 10 | 11 | @interface FirstSituationViewController () 12 | { 13 | UILabel *label; 14 | } 15 | 16 | @property (nonatomic, assign) BOOL async; 17 | 18 | @end 19 | 20 | @implementation FirstSituationViewController 21 | 22 | + (instancetype)createWithAsyncLoadData:(BOOL)async 23 | { 24 | FirstSituationViewController *object = [FirstSituationViewController new]; 25 | object.async = async; 26 | object.title = @"情形一"; 27 | 28 | return object; 29 | } 30 | 31 | - (void)viewDidLoad 32 | { 33 | [super viewDidLoad]; 34 | // Do any additional setup after loading the view. 35 | 36 | [self loadSubViews]; 37 | [self loadDatas]; 38 | } 39 | 40 | #pragma mark - UI 41 | - (void)loadSubViews 42 | { 43 | self.view.backgroundColor = [UIColor whiteColor]; 44 | 45 | label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, iPhoneWidth, (iPhoneHeight - 64))]; 46 | label.backgroundColor = self.view.backgroundColor; 47 | label.opaque = YES; 48 | label.layer.masksToBounds = YES; 49 | label.numberOfLines = 0; 50 | label.textAlignment = NSTextAlignmentCenter; 51 | label.textColor = [UIColor grayColor]; 52 | label.text = @"Waiting..."; 53 | [self.view addSubview:label]; 54 | } 55 | 56 | #pragma mark - Data 57 | - (void)loadDatas 58 | { 59 | if (_async) 60 | { 61 | // 避免控制器出栈时,由于数据未加载完成,导致label被强制保留 62 | __weak UILabel *weakLabel = label; 63 | 64 | dispatch_async(dispatch_get_global_queue(0, 0), ^{ 65 | 66 | NSString *string = getString(); 67 | 68 | if (weakLabel) 69 | { 70 | dispatch_async(dispatch_get_main_queue(), ^{ 71 | 72 | weakLabel.text = string; 73 | }); 74 | } 75 | }); 76 | } 77 | else 78 | { 79 | label.text = getString(); 80 | } 81 | } 82 | 83 | NS_INLINE NSString *getString(void) 84 | { 85 | NSMutableString *string = [NSMutableString string]; 86 | 87 | for (int i = 0; i < 500000; i++) 88 | { 89 | @autoreleasepool 90 | { 91 | [string appendString:[NSString stringWithFormat:@"%d", i % 10]]; 92 | } 93 | } 94 | 95 | return string; 96 | } 97 | 98 | @end 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/ViewControllers/Situation B/SecondSituationViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SecondSituationViewController.h 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/17. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSInteger, SecondSituationLoadType) 12 | { 13 | /** 默认加载UI */ 14 | SecondSituationLoadDefaultType = 0, 15 | /** viewDidAppear时加载UI */ 16 | SecondSituationLoadViewDidAppearType, 17 | /** RunLoop下次循行加载UI */ 18 | SecondSituationLoadNextLoopType, 19 | /** 定时器加载UI */ 20 | SecondSituationLoadTimerType, 21 | /** GCD加载UI */ 22 | SecondSituationLoadGCDType 23 | }; 24 | 25 | @interface SecondSituationViewController : UIViewController 26 | 27 | + (instancetype)createWithType:(SecondSituationLoadType)type; 28 | 29 | @end 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/ViewControllers/Situation B/SecondSituationViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SecondSituationViewController.m 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/17. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | /** 文本大小 */ 10 | static const NSInteger LabelSize = 15; 11 | 12 | #import "SecondSituationViewController.h" 13 | 14 | @interface SecondSituationViewController () 15 | { 16 | UILabel *tipsLabel; 17 | 18 | CADisplayLink *timer; 19 | 20 | /** 定时次数 */ 21 | NSInteger timerIndex; 22 | 23 | /** X方向上的文本数 */ 24 | NSInteger horizontalCount; 25 | /** Y方向上的文本数 */ 26 | NSInteger verticalCount; 27 | /** 文本间距 */ 28 | CGFloat labelDistance; 29 | } 30 | 31 | @property (nonatomic, assign) SecondSituationLoadType type; 32 | 33 | @end 34 | 35 | @implementation SecondSituationViewController 36 | 37 | + (instancetype)createWithType:(SecondSituationLoadType)type 38 | { 39 | SecondSituationViewController *object = [SecondSituationViewController new]; 40 | object.type = type; 41 | object.title = @"情形二"; 42 | 43 | return object; 44 | } 45 | 46 | - (instancetype)init 47 | { 48 | if (self = [super init]) 49 | { 50 | timerIndex = 0; 51 | 52 | labelDistance = LabelSize - 5.5; 53 | horizontalCount = ceil(iPhoneWidth / labelDistance); 54 | verticalCount = ceil(iPhoneHeight / labelDistance); 55 | } 56 | 57 | return self; 58 | } 59 | 60 | - (void)viewDidAppear:(BOOL)animated 61 | { 62 | [super viewDidAppear:animated]; 63 | 64 | if (_type == SecondSituationLoadViewDidAppearType) 65 | { 66 | [self loadAllLabels]; 67 | } 68 | } 69 | 70 | - (void)viewDidLoad 71 | { 72 | [super viewDidLoad]; 73 | 74 | self.view.backgroundColor = [UIColor whiteColor]; 75 | 76 | if (_type == SecondSituationLoadNextLoopType || _type == SecondSituationLoadViewDidAppearType) 77 | { 78 | tipsLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, iPhoneWidth, (iPhoneHeight - 64))]; 79 | tipsLabel.backgroundColor = self.view.backgroundColor; 80 | tipsLabel.opaque = YES; 81 | tipsLabel.layer.masksToBounds = YES; 82 | tipsLabel.textAlignment = NSTextAlignmentCenter; 83 | tipsLabel.textColor = [UIColor grayColor]; 84 | tipsLabel.text = @"Waiting..."; 85 | [self.view addSubview:tipsLabel]; 86 | } 87 | 88 | [self willLoadLabels]; 89 | } 90 | 91 | - (void)willLoadLabels 92 | { 93 | if (_type == SecondSituationLoadDefaultType) 94 | { 95 | [self loadAllLabels]; 96 | } 97 | else if (_type == SecondSituationLoadNextLoopType) 98 | { 99 | dispatch_async(dispatch_get_main_queue(), ^{ 100 | 101 | [self loadAllLabels]; 102 | }); 103 | } 104 | else if (_type == SecondSituationLoadTimerType) 105 | { 106 | timer = [CADisplayLink displayLinkWithTarget:self selector:@selector(timerAction:)]; 107 | [timer addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; 108 | } 109 | else if (_type == SecondSituationLoadGCDType) 110 | { 111 | [self dispatchTaskAction]; 112 | } 113 | } 114 | 115 | #pragma mark - UI 116 | - (void)loadAllLabels 117 | { 118 | for (int i = 0; i < verticalCount; i++) 119 | { 120 | [self loadLabelsWithIndex:i]; 121 | } 122 | } 123 | 124 | - (void)loadLabelsWithIndex:(NSInteger)index 125 | { 126 | CGFloat vertical = index * labelDistance; 127 | 128 | for (int j = 0; j < horizontalCount; j++) 129 | { 130 | NSDictionary *propertyDic = @{ NSFontAttributeName : [UIFont systemFontOfSize:12.0f], 131 | NSForegroundColorAttributeName : [UIColor whiteColor]}; 132 | 133 | NSString *string = [NSString stringWithFormat:@"%d", j % 10]; 134 | NSAttributedString *attString = [[NSAttributedString alloc] initWithString:string attributes:propertyDic]; 135 | 136 | UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(j * labelDistance, vertical, LabelSize, LabelSize)]; 137 | label.backgroundColor = [UIColor grayColor]; 138 | label.opaque = YES; 139 | label.clipsToBounds = YES; 140 | label.attributedText = attString; 141 | [self.view addSubview:label]; 142 | } 143 | } 144 | 145 | #pragma mark - Action 146 | #pragma mark Timer Action 147 | - (void)timerAction:(CADisplayLink *)sender 148 | { 149 | if (timerIndex < verticalCount) 150 | { 151 | [self loadLabelsWithIndex:timerIndex]; 152 | 153 | timerIndex++; 154 | } 155 | else 156 | { 157 | [timer invalidate]; 158 | timer = nil; 159 | } 160 | } 161 | 162 | #pragma mark Dispatch Task Action 163 | - (void)dispatchTaskAction 164 | { 165 | [self loadLabelsWithIndex:timerIndex]; 166 | 167 | timerIndex++; 168 | 169 | if (timerIndex < verticalCount) 170 | { 171 | dispatch_async(dispatch_get_main_queue(), ^{ 172 | 173 | [self dispatchTaskAction]; 174 | }); 175 | } 176 | } 177 | 178 | #pragma mark Back 179 | - (void)navigationPop:(UIButton *)sender 180 | { 181 | !timer ?: [timer invalidate]; 182 | 183 | [self.navigationController popViewControllerAnimated:YES]; 184 | } 185 | 186 | @end 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/ViewControllers/Situation C/ThirdSituationViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdSituationViewController.h 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/4/11. 6 | // Copyright © 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef NS_ENUM(NSInteger, ThirdSituationLoadType) 12 | { 13 | /** 默认加载UI */ 14 | ThirdSituationLoadDefaultType = 0, 15 | /** viewDidAppear时加载UI */ 16 | ThirdSituationLoadSnapshotType, 17 | }; 18 | 19 | @interface ThirdSituationViewController : UIViewController 20 | 21 | + (instancetype)createWithType:(ThirdSituationLoadType)type; 22 | 23 | @end 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/ViewControllers/Situation C/ThirdSituationViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdSituationViewController.m 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/4/11. 6 | // Copyright © 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import "ThirdSituationViewController.h" 10 | 11 | @interface ThirdSituationViewController () 12 | { 13 | UILabel *tipsLabel; 14 | } 15 | 16 | @property (nonatomic, assign) ThirdSituationLoadType type; 17 | 18 | @property (nonatomic) UIImageView *snapshotView; 19 | 20 | @end 21 | 22 | @implementation ThirdSituationViewController 23 | 24 | + (instancetype)createWithType:(ThirdSituationLoadType)type 25 | { 26 | ThirdSituationViewController *object = [ThirdSituationViewController new]; 27 | object.type = type; 28 | object.title = @"情形三"; 29 | 30 | return object; 31 | } 32 | 33 | - (void)viewWillAppear:(BOOL)animated 34 | { 35 | [super viewWillAppear:animated]; 36 | 37 | !_snapshotView ?: [_snapshotView setHidden:NO]; 38 | } 39 | 40 | - (void)viewDidAppear:(BOOL)animated 41 | { 42 | [super viewDidAppear:animated]; 43 | 44 | !_snapshotView ?: [_snapshotView setHidden:YES]; 45 | } 46 | 47 | - (void)viewWillDisappear:(BOOL)animated 48 | { 49 | [super viewWillDisappear:animated]; 50 | 51 | !_snapshotView ?: [_snapshotView setHidden:NO]; 52 | } 53 | 54 | - (void)viewDidLoad 55 | { 56 | [super viewDidLoad]; 57 | // Do any additional setup after loading the view. 58 | 59 | [self loadSubViews]; 60 | } 61 | 62 | #pragma mark - UI 63 | - (void)loadSubViews 64 | { 65 | self.view.backgroundColor = [UIColor whiteColor]; 66 | 67 | if (_type == ThirdSituationLoadDefaultType) 68 | { 69 | [self loadRoundViews]; 70 | } 71 | else 72 | { 73 | tipsLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, iPhoneWidth, (iPhoneHeight - 64))]; 74 | tipsLabel.backgroundColor = self.view.backgroundColor; 75 | tipsLabel.opaque = YES; 76 | tipsLabel.textAlignment = NSTextAlignmentCenter; 77 | tipsLabel.textColor = [UIColor grayColor]; 78 | tipsLabel.text = @"Waiting..."; 79 | [self.view addSubview:tipsLabel]; 80 | 81 | dispatch_async(dispatch_get_main_queue(), ^{ 82 | 83 | [self loadRoundViews]; 84 | 85 | self.snapshotView.hidden = NO; 86 | }); 87 | } 88 | } 89 | 90 | - (void)loadRoundViews 91 | { 92 | CGPoint point = CGPointMake(CGRectGetWidth(self.view.bounds) / 2, (iPhoneHeight - 64) / 2); 93 | 94 | UIColor *yellowColor = [UIColor yellowColor]; 95 | UIColor *grayColor = [UIColor grayColor]; 96 | 97 | for (int i = 0; i < 30; i++) 98 | { 99 | CGFloat size = iPhoneWidth - i; 100 | 101 | UILabel *subLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, size, size)]; 102 | subLabel.center = point; 103 | subLabel.backgroundColor = i % 2 ? yellowColor : grayColor; 104 | subLabel.layer.cornerRadius = size / 2; 105 | subLabel.layer.masksToBounds = YES; 106 | subLabel.textAlignment = NSTextAlignmentCenter; 107 | subLabel.textColor = [UIColor blackColor]; 108 | subLabel.text = [NSString stringWithFormat:@"%d", i + 1]; 109 | [self.view addSubview:subLabel]; 110 | } 111 | } 112 | 113 | #pragma mark - Action 114 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 115 | { 116 | UIViewController *controller = [UIViewController new]; 117 | controller.view.backgroundColor = self.view.backgroundColor; 118 | controller.title = @"Title"; 119 | [self.navigationController pushViewController:controller animated:YES]; 120 | } 121 | 122 | #pragma mark - Set / Get 123 | #pragma mark 截图视图 124 | - (UIImageView *)snapshotView 125 | { 126 | if (!_snapshotView) 127 | { 128 | UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, self.view.opaque, 0); 129 | CGContextRef context = UIGraphicsGetCurrentContext(); 130 | [self.view.layer renderInContext:context]; 131 | UIImage *image = UIGraphicsGetImageFromCurrentImageContext(); 132 | UIGraphicsEndImageContext(); 133 | 134 | _snapshotView = [[UIImageView alloc] initWithFrame:self.view.bounds]; 135 | _snapshotView.image = image; 136 | [self.view addSubview:_snapshotView]; 137 | } 138 | 139 | return _snapshotView; 140 | } 141 | 142 | @end 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /SmoothTransitionDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // SmoothTransitionDemo 4 | // 5 | // Created by Delpan on 16/3/16. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /SmoothTransitionDemoTests/SmoothTransitionDemoTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.-.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SmoothTransitionDemoTests/SmoothTransitionDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // SmoothTransitionDemoTests.m 3 | // SmoothTransitionDemoTests 4 | // 5 | // Created by Delpan on 16/3/16. 6 | // Copyright (c) 2016年 Delpan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SmoothTransitionDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation SmoothTransitionDemoTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /SmoothTransitionDemoTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | --------------------------------------------------------------------------------