├── AnimationDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ ├── A053.xcuserdatad │ └── xcschemes │ │ ├── AnimationDemo.xcscheme │ │ └── xcschememanagement.plist │ └── EnforLiu.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── AnimationDemo.xcscheme │ └── xcschememanagement.plist ├── AnimationDemo ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon-40.png │ │ ├── icon-40@2x.png │ │ ├── icon-50.png │ │ ├── icon-50@2x.png │ │ ├── icon-60@2x.png │ │ ├── icon-60@3x.png │ │ ├── icon-72.png │ │ ├── icon-72@2x.png │ │ ├── icon-76.png │ │ ├── icon-76@2x.png │ │ ├── icon-small.png │ │ ├── icon-small@2x.png │ │ ├── icon-small@3x.png │ │ ├── icon.png │ │ └── icon@2x.png │ ├── Contents.json │ ├── Image1.imageset │ │ ├── Action_MyFavAdd@2x.png │ │ ├── Action_MyFavAdd@3x.png │ │ └── Contents.json │ ├── LaunchImage.launchimage │ │ ├── Contents.json │ │ ├── Default-568h@2x~iphone.png │ │ ├── Default-667h.png │ │ ├── Default-736h.png │ │ ├── Default-Landscape-736h.png │ │ ├── Default-Landscape@2x~ipad.png │ │ ├── Default-Landscape~ipad.png │ │ ├── Default-Portrait@2x~ipad.png │ │ ├── Default-Portrait~ipad.png │ │ ├── Default@2x~iphone.png │ │ └── Default~iphone.png │ ├── TabBarController │ │ ├── Contents.json │ │ ├── icon1.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_mainframe@2x.png │ │ │ └── tabbar_mainframe@3x.png │ │ ├── icon2.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_contacts@2x.png │ │ │ └── tabbar_contacts@3x.png │ │ ├── icon3.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_discover@2x.png │ │ │ └── tabbar_discover@3x.png │ │ ├── icon4.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_me@2x.png │ │ │ └── tabbar_me@3x.png │ │ ├── selectIcon1.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_mainframeHL@2x.mkm │ │ │ ├── tabbar_mainframeHL@2x.png │ │ │ └── tabbar_mainframeHL@3x.png │ │ ├── selectIcon2.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_contactsHL@2x.png │ │ │ └── tabbar_contactsHL@3x.png │ │ ├── selectIcon3.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_discoverHL@2x.png │ │ │ └── tabbar_discoverHL@3x.png │ │ └── selectIcon4.imageset │ │ │ ├── Contents.json │ │ │ ├── tabbar_meHL@2x.png │ │ │ └── tabbar_meHL@3x.png │ ├── background.imageset │ │ ├── AlbumCommentPlainTextTip@2x.jpg │ │ └── Contents.json │ └── iconImage.imageset │ │ ├── Contents.json │ │ ├── MoreMyFavorites.png │ │ ├── MoreMyFavorites@2x.png │ │ └── MoreMyFavorites@3x.png ├── Info.plist ├── UI │ ├── Common │ │ ├── UINavigationController+YFTransition.h │ │ ├── UINavigationController+YFTransition.m │ │ ├── YFAnimationCostum.h │ │ ├── YFAnimationCostum.m │ │ ├── YFBaseViewController.h │ │ └── YFBaseViewController.m │ ├── TabBarController │ │ ├── YFTabBarViewController.h │ │ └── YFTabBarViewController.m │ └── ViewController │ │ ├── YFFiveViewController.h │ │ ├── YFFiveViewController.m │ │ ├── YFFourViewController.h │ │ ├── YFFourViewController.m │ │ ├── YFOneViewController.h │ │ ├── YFOneViewController.m │ │ ├── YFThreeViewController.h │ │ ├── YFThreeViewController.m │ │ ├── YFTwoViewController.h │ │ └── YFTwoViewController.m └── main.m ├── AnimationDemoTests ├── AnimationDemoTests.m └── Info.plist ├── AnimationDemoUITests ├── AnimationDemoUITests.m └── Info.plist └── README.md /AnimationDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 134849461C0C2DA7005B6484 /* YFFourViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 134849451C0C2DA7005B6484 /* YFFourViewController.m */; }; 11 | 134849491C0C2E26005B6484 /* UINavigationController+YFTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 134849481C0C2E26005B6484 /* UINavigationController+YFTransition.m */; }; 12 | 1348494D1C0C2EC6005B6484 /* YFFiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1348494B1C0C2EC6005B6484 /* YFFiveViewController.m */; }; 13 | 13545BE31C07F1AF0009519A /* YFAnimationCostum.m in Sources */ = {isa = PBXBuildFile; fileRef = 13545BE21C07F1AF0009519A /* YFAnimationCostum.m */; }; 14 | 13909E3A1C06F9C3000A4744 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13909E391C06F9C3000A4744 /* main.m */; }; 15 | 13909E3D1C06F9C3000A4744 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13909E3C1C06F9C3000A4744 /* AppDelegate.m */; }; 16 | 13909E451C06F9C3000A4744 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13909E441C06F9C3000A4744 /* Assets.xcassets */; }; 17 | 13909E531C06F9C3000A4744 /* AnimationDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 13909E521C06F9C3000A4744 /* AnimationDemoTests.m */; }; 18 | 13909E5E1C06F9C3000A4744 /* AnimationDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 13909E5D1C06F9C3000A4744 /* AnimationDemoUITests.m */; }; 19 | 13909E7B1C06FA3D000A4744 /* YFBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 13909E6E1C06FA3D000A4744 /* YFBaseViewController.m */; }; 20 | 13909E7C1C06FA3D000A4744 /* YFTabBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 13909E711C06FA3D000A4744 /* YFTabBarViewController.m */; }; 21 | 13909E7E1C06FA3D000A4744 /* YFOneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 13909E761C06FA3D000A4744 /* YFOneViewController.m */; }; 22 | 13909E7F1C06FA3D000A4744 /* YFThreeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 13909E781C06FA3D000A4744 /* YFThreeViewController.m */; }; 23 | 13909E801C06FA3D000A4744 /* YFTwoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 13909E7A1C06FA3D000A4744 /* YFTwoViewController.m */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXContainerItemProxy section */ 27 | 13909E4F1C06F9C3000A4744 /* PBXContainerItemProxy */ = { 28 | isa = PBXContainerItemProxy; 29 | containerPortal = 13909E2D1C06F9C3000A4744 /* Project object */; 30 | proxyType = 1; 31 | remoteGlobalIDString = 13909E341C06F9C3000A4744; 32 | remoteInfo = AnimationDemo; 33 | }; 34 | 13909E5A1C06F9C3000A4744 /* PBXContainerItemProxy */ = { 35 | isa = PBXContainerItemProxy; 36 | containerPortal = 13909E2D1C06F9C3000A4744 /* Project object */; 37 | proxyType = 1; 38 | remoteGlobalIDString = 13909E341C06F9C3000A4744; 39 | remoteInfo = AnimationDemo; 40 | }; 41 | /* End PBXContainerItemProxy section */ 42 | 43 | /* Begin PBXFileReference section */ 44 | 134849441C0C2DA7005B6484 /* YFFourViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFFourViewController.h; sourceTree = ""; }; 45 | 134849451C0C2DA7005B6484 /* YFFourViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFFourViewController.m; sourceTree = ""; }; 46 | 134849471C0C2E26005B6484 /* UINavigationController+YFTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UINavigationController+YFTransition.h"; sourceTree = ""; }; 47 | 134849481C0C2E26005B6484 /* UINavigationController+YFTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+YFTransition.m"; sourceTree = ""; }; 48 | 1348494A1C0C2EC6005B6484 /* YFFiveViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFFiveViewController.h; sourceTree = ""; }; 49 | 1348494B1C0C2EC6005B6484 /* YFFiveViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFFiveViewController.m; sourceTree = ""; }; 50 | 13545BE11C07F1AF0009519A /* YFAnimationCostum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFAnimationCostum.h; sourceTree = ""; }; 51 | 13545BE21C07F1AF0009519A /* YFAnimationCostum.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFAnimationCostum.m; sourceTree = ""; }; 52 | 13909E351C06F9C3000A4744 /* AnimationDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AnimationDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 13909E391C06F9C3000A4744 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 54 | 13909E3B1C06F9C3000A4744 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 55 | 13909E3C1C06F9C3000A4744 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 56 | 13909E441C06F9C3000A4744 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 13909E491C06F9C3000A4744 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 13909E4E1C06F9C3000A4744 /* AnimationDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AnimationDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 59 | 13909E521C06F9C3000A4744 /* AnimationDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnimationDemoTests.m; sourceTree = ""; }; 60 | 13909E541C06F9C3000A4744 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 61 | 13909E591C06F9C3000A4744 /* AnimationDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AnimationDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | 13909E5D1C06F9C3000A4744 /* AnimationDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnimationDemoUITests.m; sourceTree = ""; }; 63 | 13909E5F1C06F9C3000A4744 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 64 | 13909E6D1C06FA3D000A4744 /* YFBaseViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFBaseViewController.h; sourceTree = ""; }; 65 | 13909E6E1C06FA3D000A4744 /* YFBaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFBaseViewController.m; sourceTree = ""; }; 66 | 13909E701C06FA3D000A4744 /* YFTabBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFTabBarViewController.h; sourceTree = ""; }; 67 | 13909E711C06FA3D000A4744 /* YFTabBarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFTabBarViewController.m; sourceTree = ""; }; 68 | 13909E751C06FA3D000A4744 /* YFOneViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFOneViewController.h; sourceTree = ""; }; 69 | 13909E761C06FA3D000A4744 /* YFOneViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFOneViewController.m; sourceTree = ""; }; 70 | 13909E771C06FA3D000A4744 /* YFThreeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFThreeViewController.h; sourceTree = ""; }; 71 | 13909E781C06FA3D000A4744 /* YFThreeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFThreeViewController.m; sourceTree = ""; }; 72 | 13909E791C06FA3D000A4744 /* YFTwoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = YFTwoViewController.h; sourceTree = ""; }; 73 | 13909E7A1C06FA3D000A4744 /* YFTwoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = YFTwoViewController.m; sourceTree = ""; }; 74 | /* End PBXFileReference section */ 75 | 76 | /* Begin PBXFrameworksBuildPhase section */ 77 | 13909E321C06F9C3000A4744 /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | 13909E4B1C06F9C3000A4744 /* Frameworks */ = { 85 | isa = PBXFrameworksBuildPhase; 86 | buildActionMask = 2147483647; 87 | files = ( 88 | ); 89 | runOnlyForDeploymentPostprocessing = 0; 90 | }; 91 | 13909E561C06F9C3000A4744 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | ); 96 | runOnlyForDeploymentPostprocessing = 0; 97 | }; 98 | /* End PBXFrameworksBuildPhase section */ 99 | 100 | /* Begin PBXGroup section */ 101 | 13909E2C1C06F9C3000A4744 = { 102 | isa = PBXGroup; 103 | children = ( 104 | 13909E6B1C06FA3D000A4744 /* UI */, 105 | 13909E371C06F9C3000A4744 /* AnimationDemo */, 106 | 13909E511C06F9C3000A4744 /* AnimationDemoTests */, 107 | 13909E5C1C06F9C3000A4744 /* AnimationDemoUITests */, 108 | 13909E361C06F9C3000A4744 /* Products */, 109 | ); 110 | sourceTree = ""; 111 | }; 112 | 13909E361C06F9C3000A4744 /* Products */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 13909E351C06F9C3000A4744 /* AnimationDemo.app */, 116 | 13909E4E1C06F9C3000A4744 /* AnimationDemoTests.xctest */, 117 | 13909E591C06F9C3000A4744 /* AnimationDemoUITests.xctest */, 118 | ); 119 | name = Products; 120 | sourceTree = ""; 121 | }; 122 | 13909E371C06F9C3000A4744 /* AnimationDemo */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 13909E3B1C06F9C3000A4744 /* AppDelegate.h */, 126 | 13909E3C1C06F9C3000A4744 /* AppDelegate.m */, 127 | 13909E441C06F9C3000A4744 /* Assets.xcassets */, 128 | 13909E491C06F9C3000A4744 /* Info.plist */, 129 | 13909E381C06F9C3000A4744 /* Supporting Files */, 130 | ); 131 | path = AnimationDemo; 132 | sourceTree = ""; 133 | }; 134 | 13909E381C06F9C3000A4744 /* Supporting Files */ = { 135 | isa = PBXGroup; 136 | children = ( 137 | 13909E391C06F9C3000A4744 /* main.m */, 138 | ); 139 | name = "Supporting Files"; 140 | sourceTree = ""; 141 | }; 142 | 13909E511C06F9C3000A4744 /* AnimationDemoTests */ = { 143 | isa = PBXGroup; 144 | children = ( 145 | 13909E521C06F9C3000A4744 /* AnimationDemoTests.m */, 146 | 13909E541C06F9C3000A4744 /* Info.plist */, 147 | ); 148 | path = AnimationDemoTests; 149 | sourceTree = ""; 150 | }; 151 | 13909E5C1C06F9C3000A4744 /* AnimationDemoUITests */ = { 152 | isa = PBXGroup; 153 | children = ( 154 | 13909E5D1C06F9C3000A4744 /* AnimationDemoUITests.m */, 155 | 13909E5F1C06F9C3000A4744 /* Info.plist */, 156 | ); 157 | path = AnimationDemoUITests; 158 | sourceTree = ""; 159 | }; 160 | 13909E6B1C06FA3D000A4744 /* UI */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 13909E6C1C06FA3D000A4744 /* Common */, 164 | 13909E6F1C06FA3D000A4744 /* TabBarController */, 165 | 13909E721C06FA3D000A4744 /* ViewController */, 166 | ); 167 | name = UI; 168 | path = AnimationDemo/UI; 169 | sourceTree = ""; 170 | }; 171 | 13909E6C1C06FA3D000A4744 /* Common */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 13909E6D1C06FA3D000A4744 /* YFBaseViewController.h */, 175 | 13909E6E1C06FA3D000A4744 /* YFBaseViewController.m */, 176 | 13545BE11C07F1AF0009519A /* YFAnimationCostum.h */, 177 | 13545BE21C07F1AF0009519A /* YFAnimationCostum.m */, 178 | 134849471C0C2E26005B6484 /* UINavigationController+YFTransition.h */, 179 | 134849481C0C2E26005B6484 /* UINavigationController+YFTransition.m */, 180 | ); 181 | path = Common; 182 | sourceTree = ""; 183 | }; 184 | 13909E6F1C06FA3D000A4744 /* TabBarController */ = { 185 | isa = PBXGroup; 186 | children = ( 187 | 13909E701C06FA3D000A4744 /* YFTabBarViewController.h */, 188 | 13909E711C06FA3D000A4744 /* YFTabBarViewController.m */, 189 | ); 190 | path = TabBarController; 191 | sourceTree = ""; 192 | }; 193 | 13909E721C06FA3D000A4744 /* ViewController */ = { 194 | isa = PBXGroup; 195 | children = ( 196 | 13909E751C06FA3D000A4744 /* YFOneViewController.h */, 197 | 13909E761C06FA3D000A4744 /* YFOneViewController.m */, 198 | 13909E791C06FA3D000A4744 /* YFTwoViewController.h */, 199 | 13909E7A1C06FA3D000A4744 /* YFTwoViewController.m */, 200 | 13909E771C06FA3D000A4744 /* YFThreeViewController.h */, 201 | 13909E781C06FA3D000A4744 /* YFThreeViewController.m */, 202 | 134849441C0C2DA7005B6484 /* YFFourViewController.h */, 203 | 134849451C0C2DA7005B6484 /* YFFourViewController.m */, 204 | 1348494A1C0C2EC6005B6484 /* YFFiveViewController.h */, 205 | 1348494B1C0C2EC6005B6484 /* YFFiveViewController.m */, 206 | ); 207 | path = ViewController; 208 | sourceTree = ""; 209 | }; 210 | /* End PBXGroup section */ 211 | 212 | /* Begin PBXNativeTarget section */ 213 | 13909E341C06F9C3000A4744 /* AnimationDemo */ = { 214 | isa = PBXNativeTarget; 215 | buildConfigurationList = 13909E621C06F9C3000A4744 /* Build configuration list for PBXNativeTarget "AnimationDemo" */; 216 | buildPhases = ( 217 | 13909E311C06F9C3000A4744 /* Sources */, 218 | 13909E321C06F9C3000A4744 /* Frameworks */, 219 | 13909E331C06F9C3000A4744 /* Resources */, 220 | ); 221 | buildRules = ( 222 | ); 223 | dependencies = ( 224 | ); 225 | name = AnimationDemo; 226 | productName = AnimationDemo; 227 | productReference = 13909E351C06F9C3000A4744 /* AnimationDemo.app */; 228 | productType = "com.apple.product-type.application"; 229 | }; 230 | 13909E4D1C06F9C3000A4744 /* AnimationDemoTests */ = { 231 | isa = PBXNativeTarget; 232 | buildConfigurationList = 13909E651C06F9C3000A4744 /* Build configuration list for PBXNativeTarget "AnimationDemoTests" */; 233 | buildPhases = ( 234 | 13909E4A1C06F9C3000A4744 /* Sources */, 235 | 13909E4B1C06F9C3000A4744 /* Frameworks */, 236 | 13909E4C1C06F9C3000A4744 /* Resources */, 237 | ); 238 | buildRules = ( 239 | ); 240 | dependencies = ( 241 | 13909E501C06F9C3000A4744 /* PBXTargetDependency */, 242 | ); 243 | name = AnimationDemoTests; 244 | productName = AnimationDemoTests; 245 | productReference = 13909E4E1C06F9C3000A4744 /* AnimationDemoTests.xctest */; 246 | productType = "com.apple.product-type.bundle.unit-test"; 247 | }; 248 | 13909E581C06F9C3000A4744 /* AnimationDemoUITests */ = { 249 | isa = PBXNativeTarget; 250 | buildConfigurationList = 13909E681C06F9C3000A4744 /* Build configuration list for PBXNativeTarget "AnimationDemoUITests" */; 251 | buildPhases = ( 252 | 13909E551C06F9C3000A4744 /* Sources */, 253 | 13909E561C06F9C3000A4744 /* Frameworks */, 254 | 13909E571C06F9C3000A4744 /* Resources */, 255 | ); 256 | buildRules = ( 257 | ); 258 | dependencies = ( 259 | 13909E5B1C06F9C3000A4744 /* PBXTargetDependency */, 260 | ); 261 | name = AnimationDemoUITests; 262 | productName = AnimationDemoUITests; 263 | productReference = 13909E591C06F9C3000A4744 /* AnimationDemoUITests.xctest */; 264 | productType = "com.apple.product-type.bundle.ui-testing"; 265 | }; 266 | /* End PBXNativeTarget section */ 267 | 268 | /* Begin PBXProject section */ 269 | 13909E2D1C06F9C3000A4744 /* Project object */ = { 270 | isa = PBXProject; 271 | attributes = { 272 | CLASSPREFIX = YF; 273 | LastUpgradeCheck = 0710; 274 | ORGANIZATIONNAME = EnforLiu; 275 | TargetAttributes = { 276 | 13909E341C06F9C3000A4744 = { 277 | CreatedOnToolsVersion = 7.1; 278 | }; 279 | 13909E4D1C06F9C3000A4744 = { 280 | CreatedOnToolsVersion = 7.1; 281 | TestTargetID = 13909E341C06F9C3000A4744; 282 | }; 283 | 13909E581C06F9C3000A4744 = { 284 | CreatedOnToolsVersion = 7.1; 285 | TestTargetID = 13909E341C06F9C3000A4744; 286 | }; 287 | }; 288 | }; 289 | buildConfigurationList = 13909E301C06F9C3000A4744 /* Build configuration list for PBXProject "AnimationDemo" */; 290 | compatibilityVersion = "Xcode 3.2"; 291 | developmentRegion = English; 292 | hasScannedForEncodings = 0; 293 | knownRegions = ( 294 | en, 295 | Base, 296 | ); 297 | mainGroup = 13909E2C1C06F9C3000A4744; 298 | productRefGroup = 13909E361C06F9C3000A4744 /* Products */; 299 | projectDirPath = ""; 300 | projectRoot = ""; 301 | targets = ( 302 | 13909E341C06F9C3000A4744 /* AnimationDemo */, 303 | 13909E4D1C06F9C3000A4744 /* AnimationDemoTests */, 304 | 13909E581C06F9C3000A4744 /* AnimationDemoUITests */, 305 | ); 306 | }; 307 | /* End PBXProject section */ 308 | 309 | /* Begin PBXResourcesBuildPhase section */ 310 | 13909E331C06F9C3000A4744 /* Resources */ = { 311 | isa = PBXResourcesBuildPhase; 312 | buildActionMask = 2147483647; 313 | files = ( 314 | 13909E451C06F9C3000A4744 /* Assets.xcassets in Resources */, 315 | ); 316 | runOnlyForDeploymentPostprocessing = 0; 317 | }; 318 | 13909E4C1C06F9C3000A4744 /* Resources */ = { 319 | isa = PBXResourcesBuildPhase; 320 | buildActionMask = 2147483647; 321 | files = ( 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | }; 325 | 13909E571C06F9C3000A4744 /* Resources */ = { 326 | isa = PBXResourcesBuildPhase; 327 | buildActionMask = 2147483647; 328 | files = ( 329 | ); 330 | runOnlyForDeploymentPostprocessing = 0; 331 | }; 332 | /* End PBXResourcesBuildPhase section */ 333 | 334 | /* Begin PBXSourcesBuildPhase section */ 335 | 13909E311C06F9C3000A4744 /* Sources */ = { 336 | isa = PBXSourcesBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | 134849461C0C2DA7005B6484 /* YFFourViewController.m in Sources */, 340 | 13909E801C06FA3D000A4744 /* YFTwoViewController.m in Sources */, 341 | 1348494D1C0C2EC6005B6484 /* YFFiveViewController.m in Sources */, 342 | 13909E7B1C06FA3D000A4744 /* YFBaseViewController.m in Sources */, 343 | 13909E7F1C06FA3D000A4744 /* YFThreeViewController.m in Sources */, 344 | 13909E7C1C06FA3D000A4744 /* YFTabBarViewController.m in Sources */, 345 | 134849491C0C2E26005B6484 /* UINavigationController+YFTransition.m in Sources */, 346 | 13545BE31C07F1AF0009519A /* YFAnimationCostum.m in Sources */, 347 | 13909E7E1C06FA3D000A4744 /* YFOneViewController.m in Sources */, 348 | 13909E3D1C06F9C3000A4744 /* AppDelegate.m in Sources */, 349 | 13909E3A1C06F9C3000A4744 /* main.m in Sources */, 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | 13909E4A1C06F9C3000A4744 /* Sources */ = { 354 | isa = PBXSourcesBuildPhase; 355 | buildActionMask = 2147483647; 356 | files = ( 357 | 13909E531C06F9C3000A4744 /* AnimationDemoTests.m in Sources */, 358 | ); 359 | runOnlyForDeploymentPostprocessing = 0; 360 | }; 361 | 13909E551C06F9C3000A4744 /* Sources */ = { 362 | isa = PBXSourcesBuildPhase; 363 | buildActionMask = 2147483647; 364 | files = ( 365 | 13909E5E1C06F9C3000A4744 /* AnimationDemoUITests.m in Sources */, 366 | ); 367 | runOnlyForDeploymentPostprocessing = 0; 368 | }; 369 | /* End PBXSourcesBuildPhase section */ 370 | 371 | /* Begin PBXTargetDependency section */ 372 | 13909E501C06F9C3000A4744 /* PBXTargetDependency */ = { 373 | isa = PBXTargetDependency; 374 | target = 13909E341C06F9C3000A4744 /* AnimationDemo */; 375 | targetProxy = 13909E4F1C06F9C3000A4744 /* PBXContainerItemProxy */; 376 | }; 377 | 13909E5B1C06F9C3000A4744 /* PBXTargetDependency */ = { 378 | isa = PBXTargetDependency; 379 | target = 13909E341C06F9C3000A4744 /* AnimationDemo */; 380 | targetProxy = 13909E5A1C06F9C3000A4744 /* PBXContainerItemProxy */; 381 | }; 382 | /* End PBXTargetDependency section */ 383 | 384 | /* Begin XCBuildConfiguration section */ 385 | 13909E601C06F9C3000A4744 /* Debug */ = { 386 | isa = XCBuildConfiguration; 387 | buildSettings = { 388 | ALWAYS_SEARCH_USER_PATHS = NO; 389 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 390 | CLANG_CXX_LIBRARY = "libc++"; 391 | CLANG_ENABLE_MODULES = YES; 392 | CLANG_ENABLE_OBJC_ARC = YES; 393 | CLANG_WARN_BOOL_CONVERSION = YES; 394 | CLANG_WARN_CONSTANT_CONVERSION = YES; 395 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 396 | CLANG_WARN_EMPTY_BODY = YES; 397 | CLANG_WARN_ENUM_CONVERSION = YES; 398 | CLANG_WARN_INT_CONVERSION = YES; 399 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 400 | CLANG_WARN_UNREACHABLE_CODE = YES; 401 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 402 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 403 | COPY_PHASE_STRIP = NO; 404 | DEBUG_INFORMATION_FORMAT = dwarf; 405 | ENABLE_STRICT_OBJC_MSGSEND = YES; 406 | ENABLE_TESTABILITY = YES; 407 | GCC_C_LANGUAGE_STANDARD = gnu99; 408 | GCC_DYNAMIC_NO_PIC = NO; 409 | GCC_NO_COMMON_BLOCKS = YES; 410 | GCC_OPTIMIZATION_LEVEL = 0; 411 | GCC_PREPROCESSOR_DEFINITIONS = ( 412 | "DEBUG=1", 413 | "$(inherited)", 414 | ); 415 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 416 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 417 | GCC_WARN_UNDECLARED_SELECTOR = YES; 418 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 419 | GCC_WARN_UNUSED_FUNCTION = YES; 420 | GCC_WARN_UNUSED_VARIABLE = YES; 421 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 422 | MTL_ENABLE_DEBUG_INFO = YES; 423 | ONLY_ACTIVE_ARCH = YES; 424 | SDKROOT = iphoneos; 425 | }; 426 | name = Debug; 427 | }; 428 | 13909E611C06F9C3000A4744 /* Release */ = { 429 | isa = XCBuildConfiguration; 430 | buildSettings = { 431 | ALWAYS_SEARCH_USER_PATHS = NO; 432 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 433 | CLANG_CXX_LIBRARY = "libc++"; 434 | CLANG_ENABLE_MODULES = YES; 435 | CLANG_ENABLE_OBJC_ARC = YES; 436 | CLANG_WARN_BOOL_CONVERSION = YES; 437 | CLANG_WARN_CONSTANT_CONVERSION = YES; 438 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 439 | CLANG_WARN_EMPTY_BODY = YES; 440 | CLANG_WARN_ENUM_CONVERSION = YES; 441 | CLANG_WARN_INT_CONVERSION = YES; 442 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 443 | CLANG_WARN_UNREACHABLE_CODE = YES; 444 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 445 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 446 | COPY_PHASE_STRIP = NO; 447 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 448 | ENABLE_NS_ASSERTIONS = NO; 449 | ENABLE_STRICT_OBJC_MSGSEND = YES; 450 | GCC_C_LANGUAGE_STANDARD = gnu99; 451 | GCC_NO_COMMON_BLOCKS = YES; 452 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 453 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 454 | GCC_WARN_UNDECLARED_SELECTOR = YES; 455 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 456 | GCC_WARN_UNUSED_FUNCTION = YES; 457 | GCC_WARN_UNUSED_VARIABLE = YES; 458 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 459 | MTL_ENABLE_DEBUG_INFO = NO; 460 | SDKROOT = iphoneos; 461 | VALIDATE_PRODUCT = YES; 462 | }; 463 | name = Release; 464 | }; 465 | 13909E631C06F9C3000A4744 /* Debug */ = { 466 | isa = XCBuildConfiguration; 467 | buildSettings = { 468 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 469 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 470 | INFOPLIST_FILE = AnimationDemo/Info.plist; 471 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 472 | PRODUCT_BUNDLE_IDENTIFIER = EnforLiu.AnimationDemo; 473 | PRODUCT_NAME = "$(TARGET_NAME)"; 474 | }; 475 | name = Debug; 476 | }; 477 | 13909E641C06F9C3000A4744 /* Release */ = { 478 | isa = XCBuildConfiguration; 479 | buildSettings = { 480 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 481 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 482 | INFOPLIST_FILE = AnimationDemo/Info.plist; 483 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 484 | PRODUCT_BUNDLE_IDENTIFIER = EnforLiu.AnimationDemo; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | }; 487 | name = Release; 488 | }; 489 | 13909E661C06F9C3000A4744 /* Debug */ = { 490 | isa = XCBuildConfiguration; 491 | buildSettings = { 492 | BUNDLE_LOADER = "$(TEST_HOST)"; 493 | INFOPLIST_FILE = AnimationDemoTests/Info.plist; 494 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 495 | PRODUCT_BUNDLE_IDENTIFIER = EnforLiu.AnimationDemoTests; 496 | PRODUCT_NAME = "$(TARGET_NAME)"; 497 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AnimationDemo.app/AnimationDemo"; 498 | }; 499 | name = Debug; 500 | }; 501 | 13909E671C06F9C3000A4744 /* Release */ = { 502 | isa = XCBuildConfiguration; 503 | buildSettings = { 504 | BUNDLE_LOADER = "$(TEST_HOST)"; 505 | INFOPLIST_FILE = AnimationDemoTests/Info.plist; 506 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 507 | PRODUCT_BUNDLE_IDENTIFIER = EnforLiu.AnimationDemoTests; 508 | PRODUCT_NAME = "$(TARGET_NAME)"; 509 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AnimationDemo.app/AnimationDemo"; 510 | }; 511 | name = Release; 512 | }; 513 | 13909E691C06F9C3000A4744 /* Debug */ = { 514 | isa = XCBuildConfiguration; 515 | buildSettings = { 516 | INFOPLIST_FILE = AnimationDemoUITests/Info.plist; 517 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 518 | PRODUCT_BUNDLE_IDENTIFIER = EnforLiu.AnimationDemoUITests; 519 | PRODUCT_NAME = "$(TARGET_NAME)"; 520 | TEST_TARGET_NAME = AnimationDemo; 521 | USES_XCTRUNNER = YES; 522 | }; 523 | name = Debug; 524 | }; 525 | 13909E6A1C06F9C3000A4744 /* Release */ = { 526 | isa = XCBuildConfiguration; 527 | buildSettings = { 528 | INFOPLIST_FILE = AnimationDemoUITests/Info.plist; 529 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 530 | PRODUCT_BUNDLE_IDENTIFIER = EnforLiu.AnimationDemoUITests; 531 | PRODUCT_NAME = "$(TARGET_NAME)"; 532 | TEST_TARGET_NAME = AnimationDemo; 533 | USES_XCTRUNNER = YES; 534 | }; 535 | name = Release; 536 | }; 537 | /* End XCBuildConfiguration section */ 538 | 539 | /* Begin XCConfigurationList section */ 540 | 13909E301C06F9C3000A4744 /* Build configuration list for PBXProject "AnimationDemo" */ = { 541 | isa = XCConfigurationList; 542 | buildConfigurations = ( 543 | 13909E601C06F9C3000A4744 /* Debug */, 544 | 13909E611C06F9C3000A4744 /* Release */, 545 | ); 546 | defaultConfigurationIsVisible = 0; 547 | defaultConfigurationName = Release; 548 | }; 549 | 13909E621C06F9C3000A4744 /* Build configuration list for PBXNativeTarget "AnimationDemo" */ = { 550 | isa = XCConfigurationList; 551 | buildConfigurations = ( 552 | 13909E631C06F9C3000A4744 /* Debug */, 553 | 13909E641C06F9C3000A4744 /* Release */, 554 | ); 555 | defaultConfigurationIsVisible = 0; 556 | defaultConfigurationName = Release; 557 | }; 558 | 13909E651C06F9C3000A4744 /* Build configuration list for PBXNativeTarget "AnimationDemoTests" */ = { 559 | isa = XCConfigurationList; 560 | buildConfigurations = ( 561 | 13909E661C06F9C3000A4744 /* Debug */, 562 | 13909E671C06F9C3000A4744 /* Release */, 563 | ); 564 | defaultConfigurationIsVisible = 0; 565 | defaultConfigurationName = Release; 566 | }; 567 | 13909E681C06F9C3000A4744 /* Build configuration list for PBXNativeTarget "AnimationDemoUITests" */ = { 568 | isa = XCConfigurationList; 569 | buildConfigurations = ( 570 | 13909E691C06F9C3000A4744 /* Debug */, 571 | 13909E6A1C06F9C3000A4744 /* Release */, 572 | ); 573 | defaultConfigurationIsVisible = 0; 574 | defaultConfigurationName = Release; 575 | }; 576 | /* End XCConfigurationList section */ 577 | }; 578 | rootObject = 13909E2D1C06F9C3000A4744 /* Project object */; 579 | } 580 | -------------------------------------------------------------------------------- /AnimationDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AnimationDemo.xcodeproj/xcuserdata/A053.xcuserdatad/xcschemes/AnimationDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /AnimationDemo.xcodeproj/xcuserdata/A053.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AnimationDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 13909E341C06F9C3000A4744 16 | 17 | primary 18 | 19 | 20 | 13909E4D1C06F9C3000A4744 21 | 22 | primary 23 | 24 | 25 | 13909E581C06F9C3000A4744 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /AnimationDemo.xcodeproj/xcuserdata/EnforLiu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /AnimationDemo.xcodeproj/xcuserdata/EnforLiu.xcuserdatad/xcschemes/AnimationDemo.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /AnimationDemo.xcodeproj/xcuserdata/EnforLiu.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AnimationDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 13909E341C06F9C3000A4744 16 | 17 | primary 18 | 19 | 20 | 13909E4D1C06F9C3000A4744 21 | 22 | primary 23 | 24 | 25 | 13909E581C06F9C3000A4744 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /AnimationDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /AnimationDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "YFTabBarViewController.h" 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen] bounds]]; 21 | self.window.backgroundColor = [UIColor whiteColor]; 22 | self.window.rootViewController = [[YFTabBarViewController alloc]init]; 23 | [self.window makeKeyAndVisible]; 24 | return YES; 25 | } 26 | 27 | - (void)applicationWillResignActive:(UIApplication *)application { 28 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 29 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 30 | } 31 | 32 | - (void)applicationDidEnterBackground:(UIApplication *)application { 33 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | - (void)applicationWillEnterForeground:(UIApplication *)application { 38 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 39 | } 40 | 41 | - (void)applicationDidBecomeActive:(UIApplication *)application { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | - (void)applicationWillTerminate:(UIApplication *)application { 46 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "icon-small.png", 5 | "idiom" : "iphone", 6 | "scale" : "1x", 7 | "size" : "29x29" 8 | }, 9 | { 10 | "filename" : "icon-small@2x.png", 11 | "idiom" : "iphone", 12 | "scale" : "2x", 13 | "size" : "29x29" 14 | }, 15 | { 16 | "filename" : "icon-small@3x.png", 17 | "idiom" : "iphone", 18 | "scale" : "3x", 19 | "size" : "29x29" 20 | }, 21 | { 22 | "filename" : "icon-40@2x.png", 23 | "idiom" : "iphone", 24 | "scale" : "2x", 25 | "size" : "40x40" 26 | }, 27 | { 28 | "filename" : "icon-60@2x.png", 29 | "idiom" : "iphone", 30 | "scale" : "3x", 31 | "size" : "40x40" 32 | }, 33 | { 34 | "filename" : "icon.png", 35 | "idiom" : "iphone", 36 | "scale" : "1x", 37 | "size" : "57x57" 38 | }, 39 | { 40 | "filename" : "icon@2x.png", 41 | "idiom" : "iphone", 42 | "scale" : "2x", 43 | "size" : "57x57" 44 | }, 45 | { 46 | "filename" : "icon-60@2x.png", 47 | "idiom" : "iphone", 48 | "scale" : "2x", 49 | "size" : "60x60" 50 | }, 51 | { 52 | "filename" : "icon-60@3x.png", 53 | "idiom" : "iphone", 54 | "scale" : "3x", 55 | "size" : "60x60" 56 | }, 57 | { 58 | "filename" : "icon-small.png", 59 | "idiom" : "ipad", 60 | "scale" : "1x", 61 | "size" : "29x29" 62 | }, 63 | { 64 | "filename" : "icon-small@2x.png", 65 | "idiom" : "ipad", 66 | "scale" : "2x", 67 | "size" : "29x29" 68 | }, 69 | { 70 | "filename" : "icon-40.png", 71 | "idiom" : "ipad", 72 | "scale" : "1x", 73 | "size" : "40x40" 74 | }, 75 | { 76 | "filename" : "icon-40@2x.png", 77 | "idiom" : "ipad", 78 | "scale" : "2x", 79 | "size" : "40x40" 80 | }, 81 | { 82 | "filename" : "icon-50.png", 83 | "idiom" : "ipad", 84 | "scale" : "1x", 85 | "size" : "50x50" 86 | }, 87 | { 88 | "filename" : "icon-50@2x.png", 89 | "idiom" : "ipad", 90 | "scale" : "2x", 91 | "size" : "50x50" 92 | }, 93 | { 94 | "filename" : "icon-72.png", 95 | "idiom" : "ipad", 96 | "scale" : "1x", 97 | "size" : "72x72" 98 | }, 99 | { 100 | "filename" : "icon-72@2x.png", 101 | "idiom" : "ipad", 102 | "scale" : "2x", 103 | "size" : "72x72" 104 | }, 105 | { 106 | "filename" : "icon-76.png", 107 | "idiom" : "ipad", 108 | "scale" : "1x", 109 | "size" : "76x76" 110 | }, 111 | { 112 | "filename" : "icon-76@2x.png", 113 | "idiom" : "ipad", 114 | "scale" : "2x", 115 | "size" : "76x76" 116 | }, 117 | { 118 | "idiom" : "watch", 119 | "role" : "notificationCenter", 120 | "scale" : "2x", 121 | "size" : "24x24", 122 | "subtype" : "38mm" 123 | }, 124 | { 125 | "idiom" : "watch", 126 | "role" : "notificationCenter", 127 | "scale" : "2x", 128 | "size" : "27.5x27.5", 129 | "subtype" : "42mm" 130 | }, 131 | { 132 | "idiom" : "watch", 133 | "role" : "companionSettings", 134 | "scale" : "2x", 135 | "size" : "29x29" 136 | }, 137 | { 138 | "idiom" : "watch", 139 | "role" : "companionSettings", 140 | "scale" : "3x", 141 | "size" : "29x29" 142 | }, 143 | { 144 | "idiom" : "watch", 145 | "role" : "appLauncher", 146 | "scale" : "2x", 147 | "size" : "40x40", 148 | "subtype" : "38mm" 149 | }, 150 | { 151 | "idiom" : "watch", 152 | "role" : "longLook", 153 | "scale" : "2x", 154 | "size" : "44x44", 155 | "subtype" : "42mm" 156 | }, 157 | { 158 | "idiom" : "watch", 159 | "role" : "quickLook", 160 | "scale" : "2x", 161 | "size" : "86x86", 162 | "subtype" : "38mm" 163 | }, 164 | { 165 | "idiom" : "watch", 166 | "role" : "quickLook", 167 | "scale" : "2x", 168 | "size" : "98x98", 169 | "subtype" : "42mm" 170 | } 171 | ], 172 | "info" : { 173 | "author" : "xcode", 174 | "version" : 1 175 | } 176 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-50.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-72.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-small.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-small@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon-small@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/AppIcon.appiconset/icon@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/Image1.imageset/Action_MyFavAdd@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/Image1.imageset/Action_MyFavAdd@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/Image1.imageset/Action_MyFavAdd@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/Image1.imageset/Action_MyFavAdd@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/Image1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "Action_MyFavAdd@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "Action_MyFavAdd@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "extent" : "full-screen", 5 | "idiom" : "iphone", 6 | "subtype" : "736h", 7 | "filename" : "Default-736h.png", 8 | "minimum-system-version" : "8.0", 9 | "orientation" : "portrait", 10 | "scale" : "3x" 11 | }, 12 | { 13 | "extent" : "full-screen", 14 | "idiom" : "iphone", 15 | "subtype" : "736h", 16 | "filename" : "Default-Landscape-736h.png", 17 | "minimum-system-version" : "8.0", 18 | "orientation" : "landscape", 19 | "scale" : "3x" 20 | }, 21 | { 22 | "extent" : "full-screen", 23 | "idiom" : "iphone", 24 | "subtype" : "667h", 25 | "filename" : "Default-667h.png", 26 | "minimum-system-version" : "8.0", 27 | "orientation" : "portrait", 28 | "scale" : "2x" 29 | }, 30 | { 31 | "orientation" : "portrait", 32 | "idiom" : "iphone", 33 | "filename" : "Default@2x~iphone.png", 34 | "extent" : "full-screen", 35 | "minimum-system-version" : "7.0", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "extent" : "full-screen", 40 | "idiom" : "iphone", 41 | "subtype" : "retina4", 42 | "filename" : "Default-568h@2x~iphone.png", 43 | "minimum-system-version" : "7.0", 44 | "orientation" : "portrait", 45 | "scale" : "2x" 46 | }, 47 | { 48 | "orientation" : "portrait", 49 | "idiom" : "ipad", 50 | "filename" : "Default-Portrait~ipad.png", 51 | "extent" : "full-screen", 52 | "minimum-system-version" : "7.0", 53 | "scale" : "1x" 54 | }, 55 | { 56 | "orientation" : "landscape", 57 | "idiom" : "ipad", 58 | "filename" : "Default-Landscape~ipad.png", 59 | "extent" : "full-screen", 60 | "minimum-system-version" : "7.0", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "orientation" : "portrait", 65 | "idiom" : "ipad", 66 | "filename" : "Default-Portrait@2x~ipad.png", 67 | "extent" : "full-screen", 68 | "minimum-system-version" : "7.0", 69 | "scale" : "2x" 70 | }, 71 | { 72 | "orientation" : "landscape", 73 | "idiom" : "ipad", 74 | "filename" : "Default-Landscape@2x~ipad.png", 75 | "extent" : "full-screen", 76 | "minimum-system-version" : "7.0", 77 | "scale" : "2x" 78 | }, 79 | { 80 | "orientation" : "portrait", 81 | "idiom" : "iphone", 82 | "filename" : "Default~iphone.png", 83 | "extent" : "full-screen", 84 | "scale" : "1x" 85 | }, 86 | { 87 | "orientation" : "portrait", 88 | "idiom" : "iphone", 89 | "filename" : "Default@2x~iphone.png", 90 | "extent" : "full-screen", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "orientation" : "portrait", 95 | "idiom" : "iphone", 96 | "filename" : "Default-568h@2x~iphone.png", 97 | "extent" : "full-screen", 98 | "subtype" : "retina4", 99 | "scale" : "2x" 100 | }, 101 | { 102 | "orientation" : "portrait", 103 | "idiom" : "ipad", 104 | "extent" : "to-status-bar", 105 | "scale" : "1x" 106 | }, 107 | { 108 | "orientation" : "portrait", 109 | "idiom" : "ipad", 110 | "filename" : "Default-Portrait~ipad.png", 111 | "extent" : "full-screen", 112 | "scale" : "1x" 113 | }, 114 | { 115 | "orientation" : "landscape", 116 | "idiom" : "ipad", 117 | "extent" : "to-status-bar", 118 | "scale" : "1x" 119 | }, 120 | { 121 | "orientation" : "landscape", 122 | "idiom" : "ipad", 123 | "extent" : "full-screen", 124 | "scale" : "1x" 125 | }, 126 | { 127 | "orientation" : "portrait", 128 | "idiom" : "ipad", 129 | "extent" : "to-status-bar", 130 | "scale" : "2x" 131 | }, 132 | { 133 | "orientation" : "portrait", 134 | "idiom" : "ipad", 135 | "filename" : "Default-Portrait@2x~ipad.png", 136 | "extent" : "full-screen", 137 | "scale" : "2x" 138 | }, 139 | { 140 | "orientation" : "landscape", 141 | "idiom" : "ipad", 142 | "extent" : "to-status-bar", 143 | "scale" : "2x" 144 | }, 145 | { 146 | "orientation" : "landscape", 147 | "idiom" : "ipad", 148 | "extent" : "full-screen", 149 | "scale" : "2x" 150 | } 151 | ], 152 | "info" : { 153 | "version" : 1, 154 | "author" : "xcode" 155 | } 156 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x~iphone.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-667h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-667h.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-736h.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-736h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-736h.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x~ipad.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-Landscape~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-Landscape~ipad.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x~ipad.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-Portrait~ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default-Portrait~ipad.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default@2x~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default@2x~iphone.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default~iphone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/LaunchImage.launchimage/Default~iphone.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_mainframe@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_mainframe@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon1.imageset/tabbar_mainframe@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/icon1.imageset/tabbar_mainframe@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon1.imageset/tabbar_mainframe@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/icon1.imageset/tabbar_mainframe@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_contacts@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_contacts@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon2.imageset/tabbar_contacts@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/icon2.imageset/tabbar_contacts@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon2.imageset/tabbar_contacts@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/icon2.imageset/tabbar_contacts@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_discover@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_discover@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon3.imageset/tabbar_discover@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/icon3.imageset/tabbar_discover@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon3.imageset/tabbar_discover@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/icon3.imageset/tabbar_discover@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_me@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_me@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon4.imageset/tabbar_me@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/icon4.imageset/tabbar_me@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/icon4.imageset/tabbar_me@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/icon4.imageset/tabbar_me@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_mainframeHL@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_mainframeHL@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon1.imageset/tabbar_mainframeHL@2x.mkm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon1.imageset/tabbar_mainframeHL@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/selectIcon1.imageset/tabbar_mainframeHL@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon1.imageset/tabbar_mainframeHL@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/selectIcon1.imageset/tabbar_mainframeHL@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_contactsHL@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_contactsHL@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon2.imageset/tabbar_contactsHL@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/selectIcon2.imageset/tabbar_contactsHL@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon2.imageset/tabbar_contactsHL@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/selectIcon2.imageset/tabbar_contactsHL@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_discoverHL@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_discoverHL@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon3.imageset/tabbar_discoverHL@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/selectIcon3.imageset/tabbar_discoverHL@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon3.imageset/tabbar_discoverHL@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/selectIcon3.imageset/tabbar_discoverHL@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "tabbar_meHL@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "tabbar_meHL@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon4.imageset/tabbar_meHL@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/selectIcon4.imageset/tabbar_meHL@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/TabBarController/selectIcon4.imageset/tabbar_meHL@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/TabBarController/selectIcon4.imageset/tabbar_meHL@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/background.imageset/AlbumCommentPlainTextTip@2x.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/background.imageset/AlbumCommentPlainTextTip@2x.jpg -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/background.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "AlbumCommentPlainTextTip@2x.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/iconImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "MoreMyFavorites.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "MoreMyFavorites@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "MoreMyFavorites@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/iconImage.imageset/MoreMyFavorites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/iconImage.imageset/MoreMyFavorites.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/iconImage.imageset/MoreMyFavorites@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/iconImage.imageset/MoreMyFavorites@2x.png -------------------------------------------------------------------------------- /AnimationDemo/Assets.xcassets/iconImage.imageset/MoreMyFavorites@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/YvanLiu/AnimationDemo/ec0022ddc5b02e18f440bed013bcf9e93932e338/AnimationDemo/Assets.xcassets/iconImage.imageset/MoreMyFavorites@3x.png -------------------------------------------------------------------------------- /AnimationDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIRequiredDeviceCapabilities 26 | 27 | armv7 28 | 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /AnimationDemo/UI/Common/UINavigationController+YFTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+YFTransition.h 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/30. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #define ANIMATION_TIME 0.8 12 | 13 | #define CUBE @"cube" 14 | #define SUCK_EFFECT @"suckEffect" 15 | #define RIPPLE_EFFECT @"rippleEffect" 16 | #define PAGE_CURL @"pageCurl" 17 | #define PAGE_UN_CURL @"pageUnCurl" 18 | #define CAMERA_IRIS_OPEN @"cameraIrisHollowOpen" 19 | #define CAMERA_IRIS_CLOSE @"cameraIrisHollowClose" 20 | 21 | 22 | 23 | typedef NS_ENUM(NSInteger, YFPushAnimation) { 24 | YFPushAnimationDefine, //默认 25 | YFPushAnimationCurl, //翻页 26 | YFPushAnimationCurlTWo, //翻页二 27 | YFPushAnimationFlip, //翻转 28 | YFPushAnimationCube, //立方体 29 | YFPushAnimationSuckEffect, //吸收 30 | YFPushAnimationRippleEffect, //波纹 31 | YFPushAnimationCameraIris, //镜头 32 | YFPushAnimationReveal, //覆盖 33 | YFPushAnimationFade, //淡入 34 | }; 35 | @interface UINavigationController (YFTransition) 36 | 37 | /** 38 | * push方法 39 | * 40 | * @param viewController 视图控制器 41 | * @param animated 动画类型 42 | */ 43 | - (void)pushViewController:(nullable UIViewController *)viewController withAnimated:(YFPushAnimation)animated; 44 | 45 | /** 46 | * pop方法 47 | * 48 | * @param animated 动画类型 49 | * 50 | * @return 视图控制器 51 | */ 52 | - (nullable UIViewController *)popViewControllerWithAnimated:(YFPushAnimation)animated; 53 | 54 | @end 55 | -------------------------------------------------------------------------------- /AnimationDemo/UI/Common/UINavigationController+YFTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+YFTransition.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/30. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | 10 | 11 | #import "UINavigationController+YFTransition.h" 12 | 13 | @implementation UINavigationController (YFTransition) 14 | 15 | 16 | - (void)pushViewController:(UIViewController *)viewController withAnimated:(YFPushAnimation)animated { 17 | 18 | if (animated == YFPushAnimationDefine) { //默认 不需要做任何处理 19 | [self pushViewController:viewController animated:YES]; 20 | } 21 | else if (animated == YFPushAnimationFlip||animated == YFPushAnimationCurl) { 22 | //系统动画 23 | [UIView beginAnimations:nil context:NULL]; 24 | [self pushViewController:viewController animated:NO]; 25 | [UIView setAnimationDuration:ANIMATION_TIME]; 26 | [UIView setAnimationBeginsFromCurrentState:YES]; 27 | 28 | if (animated == YFPushAnimationFlip) { //翻转 29 | [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES]; 30 | }else { //立方体 31 | [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; 32 | } 33 | [UIView commitAnimations]; 34 | 35 | } 36 | else { 37 | //私密动画 38 | CATransition *animation = [CATransition animation]; 39 | animation.duration = ANIMATION_TIME; 40 | animation.fillMode = kCAFillModeForwards; 41 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 42 | if (animated == YFPushAnimationCube) { 43 | animation.type = CUBE; 44 | }else if (animated == YFPushAnimationSuckEffect) { 45 | animation.type = SUCK_EFFECT; 46 | }else if (animated == YFPushAnimationRippleEffect) { 47 | animation.type = RIPPLE_EFFECT; 48 | }else if (animated == YFPushAnimationCameraIris) { 49 | animation.type = CAMERA_IRIS_OPEN; 50 | }else if (animated == YFPushAnimationReveal) { 51 | animation.type =kCATransitionReveal; 52 | }else if (animated == YFPushAnimationFade) { 53 | animation.type = kCATransitionFade; 54 | }else if (animated == YFPushAnimationCurlTWo) { 55 | animation.type = PAGE_CURL; 56 | } 57 | if (animated == YFPushAnimationCurlTWo) { 58 | animation.subtype = kCATransitionFromLeft; 59 | }else { 60 | animation.subtype = kCATransitionFromRight; 61 | } 62 | [self.view.layer addAnimation:animation forKey:nil]; 63 | [self pushViewController:viewController animated:NO]; 64 | } 65 | 66 | 67 | } 68 | 69 | - (UIViewController *)popViewControllerWithAnimated:(YFPushAnimation)animated { 70 | UIViewController *controller; 71 | 72 | if (animated == YFPushAnimationDefine) { 73 | controller = [self popViewControllerAnimated:YES]; 74 | } 75 | else { 76 | controller = [self popViewControllerAnimated:NO]; 77 | 78 | if (animated == YFPushAnimationFlip||animated == YFPushAnimationCurl) { 79 | [UIView beginAnimations:nil context:NULL]; 80 | [UIView setAnimationDuration:ANIMATION_TIME]; 81 | [UIView setAnimationBeginsFromCurrentState:YES]; 82 | if (animated == YFPushAnimationFlip) { 83 | [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES]; 84 | }else { 85 | [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:self.view cache:YES]; 86 | } 87 | [UIView commitAnimations]; 88 | } 89 | 90 | else { 91 | CATransition *animation = [CATransition animation]; 92 | animation.duration = ANIMATION_TIME; 93 | animation.fillMode = kCAFillModeForwards; 94 | if (animated == YFPushAnimationCube) { 95 | animation.type = CUBE; 96 | }else if (animated == YFPushAnimationSuckEffect) { 97 | animation.type = SUCK_EFFECT; 98 | }else if (animated == YFPushAnimationRippleEffect) { 99 | animation.type = RIPPLE_EFFECT; 100 | }else if (animated == YFPushAnimationCameraIris) { 101 | animation.type = CAMERA_IRIS_CLOSE; 102 | }else if (animated == YFPushAnimationReveal) { 103 | animation.type = kCATransitionReveal; 104 | }else if (animated == YFPushAnimationFade) { 105 | animation.type = kCATransitionFade; 106 | }else if (animated == YFPushAnimationCurlTWo) { 107 | animation.type = PAGE_UN_CURL; 108 | } 109 | animation.subtype = kCATransitionFromLeft; 110 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 111 | [self.view.layer addAnimation:animation forKey:nil]; 112 | } 113 | } 114 | return controller; 115 | 116 | } 117 | @end 118 | -------------------------------------------------------------------------------- /AnimationDemo/UI/Common/YFAnimationCostum.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationCostum.h 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/27. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | 10 | #define kRadianToDegrees(radian) (radian*180.0)/(M_PI) 11 | #define kDegreesToRadian(x) (M_PI * (x) / 180.0) 12 | 13 | #import 14 | #import 15 | #import 16 | #import 17 | 18 | 19 | 20 | 21 | @interface YFAnimationCostum : NSObject 22 | 23 | /** 24 | * 永久的闪烁动画 25 | * 26 | * @param time 闪烁的时间周期 27 | * 28 | * @return [layer addAnimation: forKey:]; 29 | */ 30 | + (CABasicAnimation *)animation_opacityForever:(float)time; 31 | 32 | /** 33 | * 横向移动动画 34 | * 35 | * @param time 移动的时间周期 36 | * @param x 横移距离 37 | * 38 | * @return [layer addAnimation: forKey:]; 39 | */ 40 | + (CABasicAnimation *)animation_moveX:(float)time X:(NSNumber *)x; 41 | 42 | /** 43 | * 纵向移动动画 44 | * 45 | * @param time 移动的时间周期 46 | * @param y 纵移距离 47 | * 48 | * @return [layer addAnimation: forKey:]; 49 | */ 50 | + (CABasicAnimation *)animation_moveY:(float)time Y:(NSNumber *)y; 51 | 52 | /** 53 | * 缩放 54 | * 55 | * @param Multiple 动画前大小比例 56 | * @param orginMultiple 动画后大小比例 57 | * @param time 动画时间周期 58 | * 59 | * @return [layer addAnimation: forKey:]; 60 | */ 61 | + (CABasicAnimation *)animation_scale:(NSNumber *)Multiple orgin:(NSNumber *)orginMultiple durTimes:(float)time; 62 | 63 | /** 64 | * 组合动画 65 | * 66 | * @param animationAry 组合动画数组 67 | * @param time 动画时间周期 68 | * @param repeatTimes 动画运行次数 69 | * 70 | * @return animation 71 | */ 72 | + (CAAnimationGroup *)animation_groupAnimation:(NSArray *)animationAry durTimes:(float)time Rep:(float)repeatTimes; 73 | 74 | /** 75 | * 路径动画 76 | * @param path 移动控制点 77 | * @param time 动画时间 78 | * @param repeatTimes 动画次数 79 | */ 80 | + (CAKeyframeAnimation *)animation_keyframeAnimation:(CGMutablePathRef)path durTimes:(float)time Rep:(float)repeatTimes; 81 | 82 | /** 83 | * 旋转动画 84 | * @param time 时间 85 | * @param transform3D CATransform3DMakeRotation 86 | * @param repeatCount 动画次数 87 | */ 88 | + (CABasicAnimation *)animation_rotation:(float)time CATransform3D:(CATransform3D)transform3D repeatCount:(int)repeatCount; 89 | 90 | /* 91 | * 抖动动画 92 | * @param from CATransform3DRotate 93 | * @param to CATransform3DRotate 94 | */ 95 | + (CABasicAnimation *)animation_JitterFromCATransform3D:(CATransform3D)from To:(CATransform3D)to; 96 | 97 | 98 | 99 | 100 | /** 101 | * 向上翻页动画 102 | * @param view 要执行动画的view 103 | */ 104 | + (void)animationCurlUp:(UIView *)view; 105 | 106 | /** 107 | * 向下翻页动画 108 | * @param view 要执行动画的view 109 | */ 110 | + (void)animationCurlDown:(UIView *)view; 111 | 112 | /** 113 | * 向左翻页动画 114 | * @param view 要执行动画的view 115 | */ 116 | 117 | + (void)animationCurlLeft:(UIView *)view; 118 | /** 119 | * 向右翻页动画 120 | * @param view 要执行动画的view 121 | */ 122 | + (void)animationCurlRight:(UIView *)view; 123 | 124 | /** 125 | * 向上翻转动画 126 | * @param view 要执行动画的view 127 | */ 128 | + (void)animationFlipUp:(UIView *)view; 129 | 130 | /** 131 | * 向下翻转动画 132 | * @param view 要执行动画的view 133 | */ 134 | + (void)animationFlipDown:(UIView *)view; 135 | 136 | /** 137 | * 向左翻转动画 138 | * @param view 要执行动画的view 139 | */ 140 | + (void)animationFlipLeft:(UIView *)view; 141 | 142 | /** 143 | * 向右翻转动画 144 | * @param view 要执行动画的view 145 | */ 146 | + (void)animationFlipRight:(UIView *)view; 147 | 148 | /** 149 | * 向上Push 150 | * @param view 要执行动画的view 151 | * @param duration 动画时间 152 | */ 153 | + (void)animationPushUp:(UIView *)view duration:(CFTimeInterval)duration; 154 | 155 | /** 156 | * 向下Push 157 | * @param view 要执行动画的view 158 | * @param duration 动画时间 159 | */ 160 | + (void)animationPushDown:(UIView *)view duration:(CFTimeInterval)duration; 161 | 162 | /** 163 | * 向左Push 164 | * @param view 要执行动画的view 165 | * @param duration 动画时间 166 | */ 167 | + (void)animationPushLeft:(UIView *)view duration:(CFTimeInterval)duration; 168 | 169 | /** 170 | * 向右Push 171 | * @param view 要执行动画的view 172 | * @param duration 动画时间 173 | */ 174 | + (void)animationPushRight:(UIView *)view duration:(CFTimeInterval)duration; 175 | 176 | /** 177 | * 向上Present 178 | * @param view 要执行动画的view 179 | * @param duration 动画时间 180 | */ 181 | + (void)animationMoveUp:(UIView *)view duration:(CFTimeInterval)duration; 182 | 183 | /** 184 | * 向下Present 185 | * @param view 要执行动画的view 186 | * @param duration 动画时间 187 | */ 188 | + (void)animationMoveDown:(UIView *)view duration:(CFTimeInterval)duration; 189 | 190 | /** 191 | * 向左Present 192 | * @param view 要执行动画的view 193 | * @param duration 动画时间 194 | */ 195 | + (void)animationMoveLeft:(UIView *)view duration:(CFTimeInterval)duration; 196 | 197 | /** 198 | * 向右Present 199 | * @param view 要执行动画的view 200 | * @param duration 动画时间 201 | */ 202 | + (void)animationMoveRight:(UIView *)view duration:(CFTimeInterval)duration; 203 | 204 | /** 205 | * 立方体向上 206 | * @param view 要执行动画的view 207 | * @param duration 动画时间 208 | */ 209 | + (void)animationCubeUp:(UIView *)view duration:(CFTimeInterval)duration; 210 | 211 | /** 212 | * 立方体向下 213 | * @param view 要执行动画的view 214 | * @param duration 动画时间 215 | */ 216 | + (void)animationCubeDown:(UIView *)view duration:(CFTimeInterval)duration; 217 | 218 | /** 219 | * 立方体向左 220 | * @param view 要执行动画的view 221 | * @param duration 动画时间 222 | */ 223 | + (void)animationCubeLeft:(UIView *)view duration:(CFTimeInterval)duration; 224 | 225 | /** 226 | * 立方体向右 227 | * @param view 要执行动画的view 228 | * @param duration 动画时间 229 | */ 230 | + (void)animationCubeRight:(UIView *)view duration:(CFTimeInterval)duration; 231 | 232 | /** 233 | * 吸收 234 | * @param view 要执行动画的view 235 | * @param duration 动画时间 236 | */ 237 | + (void)animationSuckEffect:(UIView *)view duration:(CFTimeInterval)duration; 238 | 239 | /** 240 | * 波纹 241 | * @param view 要执行动画的view 242 | * @param duration 动画时间 243 | */ 244 | + (void)animationRippleEffect:(UIView *)view duration:(CFTimeInterval)duration; 245 | 246 | /** 247 | * 镜头开 248 | * @param view 要执行动画的view 249 | * @param duration 动画时间 250 | */ 251 | + (void)animationCameraOpen:(UIView *)view duration:(CFTimeInterval)duration; 252 | 253 | /** 254 | * 镜头关 255 | * @param view 要执行动画的view 256 | * @param duration 动画时间 257 | */ 258 | + (void)animationCameraClose:(UIView *)view duration:(CFTimeInterval)duration; 259 | 260 | /** 261 | * 覆盖向上 262 | * @param view 要执行动画的view 263 | * @param duration 动画时间 264 | */ 265 | + (void)animationRevealUp:(UIView *)view duration:(CFTimeInterval)duration; 266 | 267 | /** 268 | * 覆盖向下 269 | * @param view 要执行动画的view 270 | * @param duration 动画时间 271 | */ 272 | + (void)animationRevealDown:(UIView *)view duration:(CFTimeInterval)duration; 273 | 274 | /** 275 | * 覆盖向左 276 | * @param view 要执行动画的view 277 | * @param duration 动画时间 278 | */ 279 | + (void)animationRevealLeft:(UIView *)view duration:(CFTimeInterval)duration; 280 | 281 | /** 282 | * 覆盖向右 283 | * @param view 要执行动画的view 284 | * @param duration 动画时间 285 | */ 286 | + (void)animationRevealRight:(UIView *)view duration:(CFTimeInterval)duration; 287 | 288 | /** 289 | * 淡入 290 | * @param view 要执行动画的view 291 | * @param duration 动画时间 292 | */ 293 | + (void)animationFade:(UIView *)view duration:(CFTimeInterval)duration; 294 | 295 | @end 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | #pragma mark - 问题解析 311 | 312 | /** CATransition 313 | * 314 | *  @see http://www.dreamingwish.com/dream-2012/the-concept-of-coreanimation-programming-guide.html 315 | *  @see http://geeklu.com/2012/09/animation-in-ios/ 316 | * 317 | *  CATransition 常用设置及属性注解如下: 318 | */ 319 | 320 | 321 | /** delegate 322 |  * 323 |  *  动画的代理,如果你想在动画开始和结束的时候做一些事,可以设置此属性,它会自动回调两个代理方法. 324 |  * 325 |  *  @see CAAnimationDelegate    (按下command键点击) 326 |  */ 327 | 328 | 329 | /** duration 330 |  * 331 |  *  动画持续时间 332 |  */ 333 | 334 | 335 | /** timingFunction 336 |  * 337 |  *  用于变化起点和终点之间的插值计算,形象点说它决定了动画运行的节奏,比如是均匀变化(相同时间变化量相同)还是 338 | *  先快后慢,先慢后快还是先慢再快再慢. 339 | * 340 |  *  动画的开始与结束的快慢,有五个预置分别为(下同): 341 |  *  kCAMediaTimingFunctionLinear            线性,即匀速 342 |  *  kCAMediaTimingFunctionEaseIn            先慢后快 343 |  *  kCAMediaTimingFunctionEaseOut           先快后慢 344 |  *  kCAMediaTimingFunctionEaseInEaseOut     先慢后快再慢 345 |  *  kCAMediaTimingFunctionDefault           实际效果是动画中间比较快. 346 |  */ 347 | 348 | /** timingFunction 349 |  * 350 |  *  当上面的预置不能满足你的需求的时候,你可以使用下面的两个方法来自定义你的timingFunction 351 |  *  具体参见下面的URL 352 |  * 353 |  *  @see http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/CAMediaTimingFunction_class/Introduction/Introduction.html 354 |  * 355 |  *  + (id)functionWithControlPoints:(float)c1x :(float)c1y :(float)c2x :(float)c2y; 356 |  * 357 |  *  - (id)initWithControlPoints:(float)c1x :(float)c1y :(float)c2x :(float)c2y; 358 | */ 359 | 360 | /** fillMode 361 |  * 362 |  *  决定当前对象过了非active时间段的行为,比如动画开始之前,动画结束之后. 363 |  *  预置为: 364 |  *  kCAFillModeRemoved   默认,当动画开始前和动画结束后,动画对layer都没有影响,动画结束后,layer会恢复到之前的状态 365 |  *  kCAFillModeForwards  当动画结束后,layer会一直保持着动画最后的状态 366 |  *  kCAFillModeBackwards 和kCAFillModeForwards相对,具体参考上面的URL 367 |  *  kCAFillModeBoth      kCAFillModeForwards和kCAFillModeBackwards在一起的效果 368 |  */ 369 | 370 | 371 | /** removedOnCompletion 372 |  * 373 |  *  这个属性默认为YES.一般情况下,不需要设置这个属性. 374 |  * 375 |  *  但如果是CAAnimation动画,并且需要设置 fillMode 属性,那么需要将 removedOnCompletion 设置为NO,否则 376 |  *  fillMode无效 377 |  */ 378 | 379 | /** type 380 |  * 381 |  *  各种动画效果  其中除了'fade', `moveIn', `push' , `reveal' ,其他属于似有的API(我是这么认为的,可以点进去看下注释). 382 |  *  ↑↑↑上面四个可以分别使用'kCATransitionFade', 'kCATransitionMoveIn', 'kCATransitionPush', 'kCATransitionReveal'来调用. 383 |  *  @"cube"                     立方体翻滚效果 384 |  *  @"moveIn"                   新视图移到旧视图上面 385 |  *  @"reveal"                   显露效果(将旧视图移开,显示下面的新视图) 386 |  *  @"fade"                     交叉淡化过渡(不支持过渡方向)             (默认为此效果) 387 |  *  @"pageCurl"                 向上翻一页 388 |  *  @"pageUnCurl"               向下翻一页 389 |  *  @"suckEffect"               收缩效果,类似系统最小化窗口时的神奇效果(不支持过渡方向) 390 |  *  @"rippleEffect"             滴水效果,(不支持过渡方向) 391 |  *  @"oglFlip"                  上下左右翻转效果 392 |  *  @"rotate"                   旋转效果 393 |  *  @"push" 394 |  *  @"cameraIrisHollowOpen"     相机镜头打开效果(不支持过渡方向) 395 |  *  @"cameraIrisHollowClose"    相机镜头关上效果(不支持过渡方向) 396 |  */ 397 | 398 | /** subtype 399 | * 400 | * 动画方向 401 | * kCATransitionFromRight 402 | * kCATransitionFromLeft 403 | * kCATransitionFromTop 404 | * kCATransitionFromBottom 405 | */ 406 | 407 | /** 408 |  *  UIViewAnimation 409 |  * 410 |  *  @see    http://www.cocoachina.com/bbs/read.php?tid=110168 411 |  * 412 |  *  @brief  UIView动画应该是最简单便捷创建动画的方式了,详解请猛戳URL. 413 |  * 414 |  *  @method beginAnimations:context 第一个参数用来作为动画的标识,第二个参数给代理代理传递消息.至于为什么一个使用 415 |  *                                  nil而另外一个使用NULL,是因为第一个参数是一个对象指针,而第二个参数是基本数据类型. 416 |  *  @method setAnimationCurve:      设置动画的加速或减速的方式(速度) 417 |  *  @method setAnimationDuration:   动画持续时间 418 |  *  @method setAnimationTransition:forView:cache:   第一个参数定义动画类型,第二个参数是当前视图对象,第三个参数是是否使用缓冲区 419 |  *  @method commitAnimations        动画结束 420 |  */ 421 | 422 | /** CABasicAnimation 423 |  * 424 |  *  @see https://developer.apple.com/library/mac/#documentation/cocoa/conceptual/CoreAnimation_guide/Articles/KVCAdditions.html 425 |  * 426 |  *  @brief                      便利构造函数 animationWithKeyPath: KeyPath需要一个字符串类型的参数,实际上是一个 427 |  *                              键-值编码协议的扩展,参数必须是CALayer的某一项属性,你的代码会对应的去改变该属性的效果 428 |  *                              具体可以填写什么请参考上面的URL,切勿乱填! 429 |  *                              例如这里填写的是 @"transform.rotation.z" 意思就是围绕z轴旋转,旋转的单位是弧度. 430 |  *                              这个动画的效果是把view旋转到最小,再旋转回来. 431 |  *                              你也可以填写@"opacity" 去修改透明度...以此类推.修改layer的属性,可以用这个类. 432 |  * 433 |  *  @param toValue              动画结束的值.CABasicAnimation自己只有三个属性(都很重要)(其他属性是继承来的),分别为: 434 |  *                              fromValue(开始值), toValue(结束值), byValue(偏移值), 435 |  !                              这三个属性最多只能同时设置两个; 436 |  *                              他们之间的关系如下: 437 |  *                              如果同时设置了fromValue和toValue,那么动画就会从fromValue过渡到toValue; 438 |  *                              如果同时设置了fromValue和byValue,那么动画就会从fromValue过渡到fromValue +byValue; 439 |  *                              如果同时设置了byValue  和toValue,那么动画就会从toValue - byValue过渡到toValue; 440 |  * 441 |  *                              如果只设置了fromValue,那么动画就会从fromValue过渡到当前的value; 442 |  *                              如果只设置了toValue  ,那么动画就会从当前的value过渡到toValue; 443 |  *                              如果只设置了byValue  ,那么动画就会从从当前的value过渡到当前value + byValue. 444 |  * 445 |  *                              可以这么理解,当你设置了三个中的一个或多个,系统就会根据以上规则使用插值算法计算出一个时间差 446 | * 并同时开启一个Timer.Timer的间隔也就是这个时间差,通过这个Timer去不停地刷新keyPath的值. 447 |  !                              而实际上,keyPath的值(layer的属性)在动画运行这一过程中,是没有任何变化的,它只是调用 448 | * 了GPU去完成这些显示效果而已.在这个动画里,是设置了要旋转到的弧度,根据以上规则,动画将会 449 | * 从它当前的弧度专旋转到我设置的度. 450 |  * 451 |  *  @param duration             动画持续时间 452 |  * 453 |  *  @param timingFunction       动画起点和终点之间的插值计算,也就是说它决定了动画运行的节奏,是快还是慢,还是先快后慢... 454 |  */ 455 | 456 | /** CABasicAnimation 457 | * 458 | * 我们可以通过animationWithKeyPath键值对的方式来改变动画 459 | * animationWithKeyPath的值: 460 | * transform.scale 比例转换 461 | * transform.scale.x 横向比例转换 462 | * transform.scale.y 纵向比例转换 463 | * transform.rotation.z 平面圆的旋转 464 | * transform.translation.x 横向移动距离 465 | * transform.translation.y 纵向移动距离 466 | * opacity 透明度 467 | * margin 468 | * zPosition 469 | * backgroundColor 背景颜色 470 | * cornerRadius 圆角 471 | * borderWidth 472 | * bounds 473 | * contents 474 | * contentsRect 475 | * cornerRadius 476 | * frame 477 | * hidden 478 | * mask 479 | * masksToBounds 480 | * opacity 481 | * position 482 | * shadowColor 483 | * shadowOffset 484 | * shadowOpacity 485 | * shadowRadius 486 | * 487 | */ 488 | 489 | /** CAAnimationGroup 490 |  * 491 |  *  @brief                      顾名思义,这是一个动画组,它允许多个动画组合在一起并行显示.比如这里设置了两个动画, 492 |  *                              把他们加在动画组里,一起显示.例如你有几个动画,在动画执行的过程中需要同时修改动画的某些属性, 493 |  *                              这时候就可以使用CAAnimationGroup. 494 |  * 495 |  *  @param duration             动画持续时间,值得一提的是,如果添加到group里的子动画不设置此属性, 496 | * group里的duration会统一设置动画(包括子动画)的duration属性;但是如果子动画设置了 497 | * duration属性,那么group的duration属性的值不应该小于每个子动画中duration属性的值, 498 | * 否则会造成子动画显示不全就停止了动画. 499 |  * 500 |  *  @param autoreverses         动画完成后自动重新开始,默认为NO. 501 |  * 502 |  *  @param repeatCount          动画重复次数,默认为0. 503 |  * 504 |  *  @param animations           动画组(数组类型),把需要同时运行的动画加到这个数组里. 505 |  * 506 |  *  @note  addAnimation:forKey  这个方法的forKey参数是一个字符串,这个字符串可以随意设置. 507 |  * 508 |  *  @note                       如果你需要在动画group执行结束后保存动画效果的话,设置 fillMode 属性,并且把 509 |  *                              removedOnCompletion 设置为NO; 510 |  */ 511 | 512 | 513 | /** CATransform3D 514 | * 515 | * 516 | * CATransform3D transform3D = CATransform3DMakeRotation(angle, x, y, z); 517 | * 518 | * 该CATransform3DMakeRotation函数创建了一个转变,将在三维轴坐标系以任意弧度旋转层。 519 | * x-y-z轴的有个确定的范围(介于-1 和+1之间) 。相应的坐标轴指定的值告诉系统在该轴上旋转。 520 | * 521 | * angle是由角度值经计算转化为弧度值。要把角度值转化为弧度值,可以使用一个简单的公式Mπ/180 。 522 | * 例如, 45π/180 = 45 ( 3.1415 ) / 180 = 0.7853 。 523 | * 如果你打算在你的程序里面一直都用角度值的话,你可以写一个简单的转化方法, 524 | * 以帮助保持您的代码是可以理解的: 525 | * #define kDegreesToRadian(x) (M_PI * (x) / 180.0) 526 | * 527 | */ 528 | 529 | 530 | /** 531 | * 532 | * CGMutablePathRef path = CGPathCreateMutable();CGPathCreateMutable主要是为动画设置移动路径的。 533 | * CGPathMoveToPoint设置移动到某点,这个方法之前的点不会建立一条直线 534 | * CGPathAddQuadCurveToPoint以二次曲线的方式移动 535 | * CGPathGetBoundingBox得到占用的区域的大小 536 | * UIGraphicsBeginImageContext创建一个基于位图的上下文,并将其设置为上下文 537 | * 538 | * 539 | * 创建一个 二阶贝塞尔曲线 540 | * CGMutablePathRef path = CGPathCreateMutable(); 541 | * CGPathMoveToPoint(path, NULL, startPoint.x, startPoint.y); 542 | ! startPoint 是起点 endPoint是终点 x,y 是x轴y轴的控制点 543 | * CGPathAddQuadCurveToPoint(path, NULL, x, y, endPoint.x, endPoint.y); 544 | 545 | * @see http://www.cnblogs.com/jay-dong/archive/2012/09/26/2704188.html 546 | * 547 | */ 548 | 549 | 550 | 551 | -------------------------------------------------------------------------------- /AnimationDemo/UI/Common/YFAnimationCostum.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationCostum.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/27. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFAnimationCostum.h" 10 | 11 | 12 | 13 | @implementation YFAnimationCostum 14 | 15 | #pragma mark - 永久的闪烁动画 16 | 17 | /** 18 | * 永久的闪烁动画 19 | * 20 | * @param time 闪烁的时间周期 21 | * 22 | * @return [layer addAnimation: forKey:nil]; 23 | */ 24 | + (CABasicAnimation *)animation_opacityForever:(float)time { 25 | //选择动画效果 透明度 26 | CABasicAnimation * animation; 27 | animation = [CABasicAnimation animationWithKeyPath:@"opacity"]; 28 | //fromValue 就是透明度 29 | animation.fromValue = [NSNumber numberWithFloat:1.0f]; 30 | animation.toValue = [NSNumber numberWithFloat:0.0f]; 31 | //当autoreverses为 YES 时,在它到达目的地之后,动画的返回到开始的值,代替了直接跳转到开始的值 32 | animation.autoreverses = YES; 33 | //动画时间 34 | animation.duration = time; 35 | //repeatCount 36 | //默认的是 0,意味着动画只会播放一次。如果指定一个无限大的重复次数,使用 1e100f。 37 | //这个不应该和 repeatDration 属性一块使用。 38 | animation.repeatCount = MAXFLOAT; 39 | //这个属性默认为 YES,那意味着,在指定的时间段完成后,动画就自动的从层上移除了。这个一般不用。 40 | animation.removedOnCompletion = NO; 41 | //解释在.h中 42 | animation.fillMode = kCAFillModeForwards; 43 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]; 44 | return animation; 45 | } 46 | 47 | #pragma mark - 横向移动 48 | 49 | + (CABasicAnimation *)animation_moveX:(float)time X:(NSNumber *)x { 50 | 51 | CABasicAnimation * animation; 52 | //选择横向移动动画 53 | animation = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"]; 54 | animation.toValue = x; 55 | animation.duration = time; 56 | //默认设置是yes,那意味着,在制定时间完成后 动画自动从layer上一处, 57 | animation.removedOnCompletion = NO; 58 | //动画播放次数 59 | animation.repeatCount = MAXFLOAT; 60 | //保持动画结束时状态 61 | animation.fillMode = kCAFillModeForwards; 62 | animation.autoreverses = YES; 63 | return animation; 64 | } 65 | 66 | #pragma mark - 纵向移动 67 | 68 | + (CABasicAnimation *)animation_moveY:(float)time Y:(NSNumber *)y { 69 | 70 | CABasicAnimation * animation; 71 | animation = [CABasicAnimation animationWithKeyPath:@"transform.translation.y"]; 72 | animation.toValue = y; 73 | animation.duration = time; 74 | animation.repeatCount = MAXFLOAT; 75 | animation.removedOnCompletion = NO; 76 | animation.fillMode = kCAFillModeForwards; 77 | animation.autoreverses = YES; 78 | 79 | return animation; 80 | } 81 | 82 | #pragma mark - 缩放 83 | 84 | + (CABasicAnimation *)animation_scale:(NSNumber *)Multiple orgin:(NSNumber *)orginMultiple durTimes:(float)time { 85 | 86 | CABasicAnimation * animation; 87 | 88 | animation = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; 89 | animation.fromValue = Multiple; 90 | animation.toValue = orginMultiple; 91 | animation.duration = time; 92 | //动画结束返回到开始大小 93 | animation.autoreverses = YES; 94 | //动画次数 95 | animation.repeatCount = MAXFLOAT; 96 | //动画结束时不移除动画 97 | animation.removedOnCompletion = NO; 98 | //动画后保持结束时状态 99 | animation.fillMode = kCAFillModeForwards; 100 | return animation; 101 | } 102 | 103 | #pragma mark - 组合动画 104 | 105 | + (CAAnimationGroup *)animation_groupAnimation:(NSArray *)animationAry durTimes:(float)time Rep:(float)repeatTimes { 106 | CAAnimationGroup * animation = [CAAnimationGroup animation]; 107 | animation.animations = animationAry; 108 | animation.duration = time; 109 | animation.repeatCount = repeatTimes; 110 | animation.fillMode = kCAFillModeForwards; 111 | 112 | return animation; 113 | } 114 | 115 | #pragma mark - 路径动画 116 | 117 | + (CAKeyframeAnimation *)animation_keyframeAnimation:(CGMutablePathRef)path durTimes:(float)time Rep:(float)repeatTimes { 118 | 119 | CAKeyframeAnimation * animation; 120 | animation = [CAKeyframeAnimation animationWithKeyPath:@"position"]; 121 | animation.path = path; 122 | animation.removedOnCompletion = NO; 123 | animation.duration = time; 124 | animation.repeatCount = repeatTimes; 125 | animation.autoreverses = NO; 126 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; 127 | animation.fillMode = kCAFillModeForwards; 128 | animation.calculationMode = kCAAnimationCubicPaced; 129 | return animation; 130 | } 131 | 132 | #pragma mark - 旋转动画 133 | 134 | + (CABasicAnimation *)animation_rotation:(float)time CATransform3D:(CATransform3D)transform3D repeatCount:(int)repeatCount { 135 | 136 | CABasicAnimation * animation = [CABasicAnimation animationWithKeyPath:@"transform"]; 137 | animation.removedOnCompletion = NO; 138 | animation.repeatCount = repeatCount; 139 | animation.duration = time; 140 | animation.autoreverses = YES; 141 | animation.fillMode = kCAFillModeForwards; 142 | animation.delegate = self; 143 | animation.toValue = [NSValue valueWithCATransform3D:transform3D]; 144 | animation.cumulative = NO; 145 | 146 | return animation; 147 | } 148 | 149 | #pragma mark - 旋转动画 150 | 151 | + (CABasicAnimation *)animation_JitterFromCATransform3D:(CATransform3D)from To:(CATransform3D)to { 152 | CABasicAnimation*animation =[CABasicAnimation animationWithKeyPath:@"transform"]; 153 | animation.duration =0.1; 154 | animation.repeatCount = MAXFLOAT; 155 | animation.autoreverses =YES; 156 | animation.fromValue =[NSValue valueWithCATransform3D:from]; 157 | animation.toValue =[NSValue valueWithCATransform3D:to]; 158 | return animation; 159 | } 160 | 161 | #pragma mark - 向上翻页 162 | 163 | + (void)animationCurlUp:(UIView *)view { 164 | 165 | [UIView beginAnimations:nil context:NULL]; 166 | [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; 167 | [UIView setAnimationDuration:1]; 168 | [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:view cache:NO]; 169 | [UIView commitAnimations]; 170 | } 171 | 172 | #pragma mark - 向下翻页 173 | 174 | + (void)animationCurlDown:(UIView *)view { 175 | 176 | [UIView beginAnimations:nil context:NULL]; 177 | [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; 178 | [UIView setAnimationDuration:0.7f]; 179 | [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:view cache:NO]; 180 | [UIView commitAnimations]; 181 | } 182 | #pragma mark - 向左翻页 183 | 184 | + (void)animationCurlLeft:(UIView *)view { 185 | 186 | CATransition *animation = [CATransition animation]; 187 | animation.duration = 1; 188 | animation.fillMode = kCAFillModeForwards; 189 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 190 | animation.type = @"pageUnCurl"; 191 | animation.subtype = kCATransitionFromLeft; 192 | [view.layer addAnimation:animation forKey:nil]; 193 | } 194 | 195 | #pragma mark - 向右翻页 196 | 197 | + (void)animationCurlRight:(UIView *)view { 198 | 199 | CATransition *animation = [CATransition animation]; 200 | animation.duration = 1; 201 | animation.fillMode = kCAFillModeForwards; 202 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 203 | animation.type = @"pageCurl"; 204 | animation.subtype = kCATransitionFromLeft; 205 | [view.layer addAnimation:animation forKey:nil]; 206 | } 207 | 208 | 209 | #pragma mark - 向右翻转 210 | 211 | + (void)animationFlipUp:(UIView *)view { 212 | 213 | CATransition *animation = [CATransition animation]; 214 | animation.duration = 1; 215 | animation.fillMode = kCAFillModeForwards; 216 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 217 | animation.type = @"oglFlip"; 218 | animation.subtype = kCATransitionFromTop; 219 | [view.layer addAnimation:animation forKey:nil]; 220 | } 221 | #pragma mark - 向下翻转 222 | 223 | + (void)animationFlipDown:(UIView *)view { 224 | 225 | CATransition *animation = [CATransition animation]; 226 | animation.duration = 1; 227 | animation.fillMode = kCAFillModeForwards; 228 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 229 | animation.type = @"oglFlip"; 230 | animation.subtype = kCATransitionFromBottom; 231 | [view.layer addAnimation:animation forKey:nil]; 232 | } 233 | 234 | #pragma mark - 向右翻转 235 | 236 | + (void)animationFlipRight:(UIView *)view { 237 | 238 | [UIView beginAnimations:nil context:NULL]; 239 | [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; 240 | [UIView setAnimationDuration:1]; 241 | [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:view cache:NO]; 242 | [UIView commitAnimations]; 243 | } 244 | 245 | #pragma mark - 向左翻转 246 | 247 | + (void)animationFlipLeft:(UIView *)view { 248 | 249 | [UIView beginAnimations:nil context:NULL]; 250 | [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; 251 | [UIView setAnimationDuration:1]; 252 | [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:view cache:NO]; 253 | [UIView commitAnimations]; 254 | } 255 | 256 | 257 | #pragma mark - Push 258 | 259 | + (void)animationPushUp:(UIView *)view duration:(CFTimeInterval)duration { 260 | 261 | CATransition *animation = [CATransition animation]; 262 | animation.duration = duration; 263 | animation.fillMode = kCAFillModeForwards; 264 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 265 | animation.type = kCATransitionPush; 266 | animation.subtype = kCATransitionFromTop; 267 | [view.layer addAnimation:animation forKey:nil]; 268 | } 269 | 270 | + (void)animationPushDown:(UIView *)view duration:(CFTimeInterval)duration { 271 | 272 | CATransition *animation = [CATransition animation]; 273 | animation.duration = duration; 274 | animation.fillMode = kCAFillModeForwards; 275 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 276 | animation.type = kCATransitionPush; 277 | animation.subtype = kCATransitionFromBottom; 278 | [view.layer addAnimation:animation forKey:nil]; 279 | } 280 | 281 | + (void)animationPushLeft:(UIView *)view duration:(CFTimeInterval)duration { 282 | 283 | CATransition *animation = [CATransition animation]; 284 | animation.duration = duration; 285 | animation.fillMode = kCAFillModeForwards; 286 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 287 | animation.type = kCATransitionPush; 288 | animation.subtype = kCATransitionFromLeft; 289 | [view.layer addAnimation:animation forKey:nil]; 290 | } 291 | 292 | + (void)animationPushRight:(UIView *)view duration:(CFTimeInterval)duration { 293 | 294 | CATransition *animation = [CATransition animation]; 295 | animation.duration = duration; 296 | animation.fillMode = kCAFillModeForwards; 297 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 298 | animation.type = kCATransitionPush; 299 | animation.subtype = kCATransitionFromRight; 300 | [view.layer addAnimation:animation forKey:nil]; 301 | } 302 | 303 | #pragma mark - Present 304 | 305 | + (void)animationMoveUp:(UIView *)view duration:(CFTimeInterval)duration { 306 | 307 | CATransition *animation = [CATransition animation]; 308 | animation.duration = duration; 309 | animation.fillMode = kCAFillModeForwards; 310 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 311 | animation.type = kCATransitionMoveIn; 312 | animation.subtype = kCATransitionFromTop; 313 | [view.layer addAnimation:animation forKey:nil]; 314 | } 315 | 316 | + (void)animationMoveDown:(UIView *)view duration:(CFTimeInterval)duration { 317 | 318 | CATransition *animation = [CATransition animation]; 319 | animation.duration = duration; 320 | animation.fillMode = kCAFillModeForwards; 321 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 322 | animation.type = kCATransitionMoveIn; 323 | animation.subtype = kCATransitionFromBottom; 324 | [view.layer addAnimation:animation forKey:nil]; 325 | } 326 | 327 | + (void)animationMoveLeft:(UIView *)view duration:(CFTimeInterval)duration { 328 | 329 | CATransition *animation = [CATransition animation]; 330 | animation.duration = duration; 331 | animation.fillMode = kCAFillModeForwards; 332 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 333 | animation.type = kCATransitionMoveIn; 334 | animation.subtype = kCATransitionFromLeft; 335 | [view.layer addAnimation:animation forKey:nil]; 336 | } 337 | 338 | + (void)animationMoveRight:(UIView *)view duration:(CFTimeInterval)duration { 339 | 340 | CATransition *animation = [CATransition animation]; 341 | animation.duration = duration; 342 | animation.fillMode = kCAFillModeForwards; 343 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 344 | animation.type = kCATransitionMoveIn; 345 | animation.subtype = kCATransitionFromRight; 346 | [view.layer addAnimation:animation forKey:nil]; 347 | } 348 | 349 | #pragma mark - 立方体 350 | 351 | + (void)animationCubeUp:(UIView *)view duration:(CFTimeInterval)duration { 352 | 353 | CATransition *animation = [CATransition animation]; 354 | animation.duration = duration; 355 | animation.fillMode = kCAFillModeForwards; 356 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 357 | animation.type = @"cube"; 358 | animation.subtype = kCATransitionFromTop; 359 | [view.layer addAnimation:animation forKey:nil]; 360 | } 361 | 362 | + (void)animationCubeDown:(UIView *)view duration:(CFTimeInterval)duration { 363 | 364 | CATransition *animation = [CATransition animation]; 365 | animation.duration = duration; 366 | animation.fillMode = kCAFillModeForwards; 367 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 368 | animation.type = @"cube"; 369 | animation.subtype = kCATransitionFromBottom; 370 | [view.layer addAnimation:animation forKey:nil]; 371 | } 372 | 373 | + (void)animationCubeLeft:(UIView *)view duration:(CFTimeInterval)duration { 374 | 375 | CATransition *animation = [CATransition animation]; 376 | animation.duration = duration; 377 | animation.fillMode = kCAFillModeForwards; 378 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 379 | animation.type = @"cube"; 380 | animation.subtype = kCATransitionFromRight; 381 | [view.layer addAnimation:animation forKey:nil]; 382 | } 383 | 384 | + (void)animationCubeRight:(UIView *)view duration:(CFTimeInterval)duration { 385 | 386 | CATransition *animation = [CATransition animation]; 387 | animation.duration = duration; 388 | animation.fillMode = kCAFillModeForwards; 389 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 390 | animation.type = @"cube"; 391 | animation.subtype = kCATransitionFromLeft; 392 | [view.layer addAnimation:animation forKey:nil]; 393 | } 394 | 395 | #pragma mark - 吸收 396 | 397 | + (void)animationSuckEffect:(UIView *)view duration:(CFTimeInterval)duration { 398 | 399 | CATransition *animation = [CATransition animation]; 400 | animation.duration = duration; 401 | animation.fillMode = kCAFillModeForwards; 402 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 403 | animation.type = @"suckEffect"; 404 | [view.layer addAnimation:animation forKey:nil]; 405 | } 406 | 407 | #pragma mark - 波纹 408 | 409 | + (void)animationRippleEffect:(UIView *)view duration:(CFTimeInterval)duration { 410 | 411 | CATransition *animation = [CATransition animation]; 412 | animation.duration = duration; 413 | animation.fillMode = kCAFillModeForwards; 414 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 415 | animation.type = @"rippleEffect"; 416 | [view.layer addAnimation:animation forKey:nil]; 417 | } 418 | 419 | #pragma mark - 镜头开 420 | 421 | + (void)animationCameraOpen:(UIView *)view duration:(CFTimeInterval)duration { 422 | 423 | CATransition *animation = [CATransition animation]; 424 | animation.duration = duration; 425 | animation.fillMode = kCAFillModeForwards; 426 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 427 | animation.type = @"cameraIrisHollowOpen"; 428 | [view.layer addAnimation:animation forKey:nil]; 429 | } 430 | 431 | #pragma mark - 镜头关 432 | 433 | + (void)animationCameraClose:(UIView *)view duration:(CFTimeInterval)duration { 434 | 435 | CATransition *animation = [CATransition animation]; 436 | animation.duration = duration; 437 | animation.fillMode = kCAFillModeForwards; 438 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 439 | animation.type = @"cameraIrisHollowClose"; 440 | [view.layer addAnimation:animation forKey:nil]; 441 | } 442 | 443 | #pragma mark - 覆盖 444 | 445 | + (void)animationRevealUp:(UIView *)view duration:(CFTimeInterval)duration { 446 | 447 | CATransition *animation = [CATransition animation]; 448 | animation.duration = duration; 449 | animation.fillMode = kCAFillModeForwards; 450 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 451 | animation.type = kCATransitionReveal; 452 | animation.subtype = kCATransitionFromTop; 453 | [view.layer addAnimation:animation forKey:nil]; 454 | } 455 | 456 | + (void)animationRevealDown:(UIView *)view duration:(CFTimeInterval)duration { 457 | 458 | CATransition *animation = [CATransition animation]; 459 | animation.duration = duration; 460 | animation.fillMode = kCAFillModeForwards; 461 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 462 | animation.type = kCATransitionReveal; 463 | animation.subtype = kCATransitionFromBottom; 464 | [view.layer addAnimation:animation forKey:nil]; 465 | } 466 | 467 | + (void)animationRevealLeft:(UIView *)view duration:(CFTimeInterval)duration { 468 | 469 | CATransition *animation = [CATransition animation]; 470 | animation.duration = duration; 471 | animation.fillMode = kCAFillModeForwards; 472 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 473 | animation.type = kCATransitionReveal; 474 | animation.subtype = kCATransitionFromLeft; 475 | [view.layer addAnimation:animation forKey:nil]; 476 | } 477 | 478 | + (void)animationRevealRight:(UIView *)view duration:(CFTimeInterval)duration { 479 | 480 | CATransition *animation = [CATransition animation]; 481 | animation.duration = duration; 482 | animation.fillMode = kCAFillModeForwards; 483 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 484 | animation.type = kCATransitionReveal; 485 | animation.subtype = kCATransitionFromRight; 486 | [view.layer addAnimation:animation forKey:nil]; 487 | } 488 | 489 | #pragma mark - 淡入 490 | 491 | + (void)animationFade:(UIView *)view duration:(CFTimeInterval)duration { 492 | 493 | CATransition *animation = [CATransition animation]; 494 | animation.duration = duration; 495 | animation.fillMode = kCAFillModeForwards; 496 | animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseOut]; 497 | animation.type = kCATransitionFade; 498 | [view.layer addAnimation:animation forKey:nil]; 499 | } 500 | 501 | 502 | @end 503 | -------------------------------------------------------------------------------- /AnimationDemo/UI/Common/YFBaseViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YFBaseViewController.h 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #define WW [[UIScreen mainScreen] bounds].size.width 10 | #define HH [[UIScreen mainScreen] bounds].size.height 11 | 12 | #import 13 | #import "UINavigationController+YFTransition.h" 14 | @interface YFBaseViewController : UIViewController 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /AnimationDemo/UI/Common/YFBaseViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YFBaseViewController.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFBaseViewController.h" 10 | 11 | @interface YFBaseViewController () 12 | 13 | @end 14 | 15 | @implementation YFBaseViewController 16 | 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | //导航条颜色 21 | self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:200/255 green:200/255 blue:200/255 alpha:1]; 22 | //导航条不透明 23 | self.navigationController.navigationBar.translucent = NO; 24 | //导航条标题属性 25 | [self.navigationController.navigationBar setTitleTextAttributes: @{NSFontAttributeName:[UIFont systemFontOfSize:20], NSForegroundColorAttributeName:[UIColor whiteColor]}]; 26 | //标签栏不透明 27 | self.tabBarController.tabBar.translucent = NO; 28 | 29 | } 30 | 31 | - (void)didReceiveMemoryWarning { 32 | [super didReceiveMemoryWarning]; 33 | // Dispose of any resources that can be recreated. 34 | } 35 | 36 | /* 37 | #pragma mark - Navigation 38 | 39 | // In a storyboard-based application, you will often want to do a little preparation before navigation 40 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 41 | // Get the new view controller using [segue destinationViewController]. 42 | // Pass the selected object to the new view controller. 43 | } 44 | */ 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /AnimationDemo/UI/TabBarController/YFTabBarViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YFTabBarViewController.h 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "YFOneViewController.h" 11 | #import "YFTwoViewController.h" 12 | #import "YFThreeViewController.h" 13 | #import "YFFourViewController.h" 14 | @interface YFTabBarViewController : UITabBarController 15 | 16 | @property (strong, nonatomic) YFOneViewController *oncVC; 17 | @property (strong, nonatomic) YFTwoViewController *twoVC; 18 | @property (strong, nonatomic) YFThreeViewController *threeVC; 19 | @property (strong, nonatomic) YFFourViewController *fourVC; 20 | 21 | @property (strong, nonatomic) UINavigationController *nav1; 22 | @property (strong, nonatomic) UINavigationController *nav2; 23 | @property (strong, nonatomic) UINavigationController *nav3; 24 | @property (strong, nonatomic) UINavigationController *nav4; 25 | 26 | @property (strong, nonatomic) UITabBarItem *item1; 27 | @property (strong, nonatomic) UITabBarItem *item2; 28 | @property (strong, nonatomic) UITabBarItem *item3; 29 | @property (strong, nonatomic) UITabBarItem *item4; 30 | 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /AnimationDemo/UI/TabBarController/YFTabBarViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YFTabBarViewController.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFTabBarViewController.h" 10 | 11 | @interface YFTabBarViewController () 12 | 13 | @end 14 | 15 | @implementation YFTabBarViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | self.oncVC = [[YFOneViewController alloc]init]; 21 | self.oncVC.title = @"动画"; 22 | 23 | self.twoVC = [[YFTwoViewController alloc]init]; 24 | self.twoVC.title = @"切换view"; 25 | 26 | self.threeVC = [[YFThreeViewController alloc]init]; 27 | self.threeVC.title = @"切换Controller"; 28 | 29 | self.fourVC = [[YFFourViewController alloc]init]; 30 | self.fourVC.title = @"其他"; 31 | 32 | self.nav1 = [[UINavigationController alloc]initWithRootViewController:self.oncVC]; 33 | self.nav2 = [[UINavigationController alloc]initWithRootViewController:self.twoVC]; 34 | self.nav3 = [[UINavigationController alloc]initWithRootViewController:self.threeVC]; 35 | self.nav4 = [[UINavigationController alloc]initWithRootViewController:self.fourVC]; 36 | 37 | self.item1 = [[UITabBarItem alloc]initWithTitle:self.oncVC.title image:[UIImage imageNamed:@"icon1"] selectedImage:[UIImage imageNamed:@"selectIcon1"]]; 38 | self.item2 = [[UITabBarItem alloc]initWithTitle:self.twoVC.title image:[UIImage imageNamed:@"icon2"] selectedImage:[UIImage imageNamed:@"selectIcon2"]]; 39 | self.item3 = [[UITabBarItem alloc]initWithTitle:self.threeVC.title image:[UIImage imageNamed:@"icon3"] selectedImage:[UIImage imageNamed:@"selectIcon3"]]; 40 | self.item4 = [[UITabBarItem alloc]initWithTitle:self.fourVC.title image:[UIImage imageNamed:@"icon4"] selectedImage:[UIImage imageNamed:@"selectIcon4"]]; 41 | 42 | self.nav1.tabBarItem = self.item1; 43 | self.nav2.tabBarItem = self.item2; 44 | self.nav3.tabBarItem = self.item3; 45 | self.nav4.tabBarItem = self.item4; 46 | 47 | self.tabBar.tintColor = [UIColor colorWithRed:9/255.0 green:187/255.0 blue:7/255.0 alpha:1]; 48 | 49 | self.viewControllers = @[self.nav1,self.nav2,self.nav3,self.nav4]; 50 | 51 | 52 | } 53 | 54 | - (void)didReceiveMemoryWarning { 55 | [super didReceiveMemoryWarning]; 56 | // Dispose of any resources that can be recreated. 57 | } 58 | 59 | /* 60 | #pragma mark - Navigation 61 | 62 | // In a storyboard-based application, you will often want to do a little preparation before navigation 63 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 64 | // Get the new view controller using [segue destinationViewController]. 65 | // Pass the selected object to the new view controller. 66 | } 67 | */ 68 | 69 | @end 70 | -------------------------------------------------------------------------------- /AnimationDemo/UI/ViewController/YFFiveViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YFFiveViewController.h 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/30. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFBaseViewController.h" 10 | #import "YFTwoViewController.h" 11 | @interface YFFiveViewController : YFBaseViewController 12 | @property (strong, nonatomic) UITableView *tableView; 13 | @property (strong, nonatomic) NSArray *dataSource; 14 | @end 15 | -------------------------------------------------------------------------------- /AnimationDemo/UI/ViewController/YFFiveViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YFFiveViewController.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/30. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFFiveViewController.h" 10 | 11 | @interface YFFiveViewController () 12 | 13 | @end 14 | 15 | @implementation YFFiveViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | self.title = @"返回"; 20 | // Do any additional setup after loading the view from its nib. 21 | self.view.backgroundColor = [UIColor grayColor]; 22 | 23 | self.dataSource = @[@"返回->define",@"返回->翻页", 24 | @"返回->翻页二",@"返回->翻转", 25 | @"返回->立方体",@"返回->吸收",@"返回->波纹", 26 | @"返回->镜头",@"返回->覆盖",@"返回->淡出"]; 27 | 28 | [self createUI]; 29 | 30 | } 31 | 32 | - (void)createUI { 33 | 34 | UIBarButtonItem * item = [[UIBarButtonItem alloc]initWithTitle:@"" style:UIBarButtonItemStylePlain target:self action:@selector(pushView)]; 35 | self.navigationItem.leftBarButtonItem = item; 36 | 37 | self.tableView =[[UITableView alloc]initWithFrame:CGRectMake(0, 0, WW, HH-113) style:UITableViewStylePlain]; 38 | self.tableView.delegate =self; 39 | self.tableView.dataSource =self; 40 | self.tableView.bounces =NO; 41 | self.tableView.backgroundColor =[UIColor lightGrayColor]; 42 | [self.view addSubview:self.tableView]; 43 | 44 | } 45 | 46 | - (void)pushView { 47 | } 48 | 49 | #pragma mark - UITableViewDataSource 50 | 51 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 52 | 53 | return self.dataSource.count; 54 | } 55 | 56 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 57 | YFTableViewCell * cell =[tableView dequeueReusableCellWithIdentifier:@"YFTableCellTwo"]; 58 | if (!cell) { 59 | cell =[[YFTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault 60 | reuseIdentifier:@"YFTableCellTwo"]; 61 | 62 | cell.selectionStyle =UITableViewCellSelectionStyleNone; 63 | // cell.backgroundColor = [UIColor lightTextColor]; 64 | } 65 | cell.nameLabel.text =self.dataSource[indexPath.row]; 66 | return cell; 67 | } 68 | 69 | #pragma mark - UITableViewDelegate 70 | 71 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { 72 | return 0.01; 73 | } 74 | 75 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 76 | return 0.01; 77 | } 78 | 79 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 80 | return 44; 81 | } 82 | 83 | #pragma mark - didSelect 84 | 85 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 86 | 87 | switch (indexPath.row) { 88 | case 0:{ //defin 89 | [self.navigationController popViewControllerWithAnimated:YFPushAnimationDefine]; 90 | } break; 91 | case 1:{ //翻页 92 | [self.navigationController popViewControllerWithAnimated:YFPushAnimationCurl]; 93 | } break; 94 | case 2:{ //翻页二 95 | [self.navigationController popViewControllerWithAnimated:YFPushAnimationCurlTWo]; 96 | } break; 97 | case 3:{ //翻转 98 | [self.navigationController popViewControllerWithAnimated:YFPushAnimationFlip]; 99 | } break; 100 | case 4:{ //立方体 101 | [self.navigationController popViewControllerWithAnimated:YFPushAnimationCube]; 102 | } break; 103 | case 5:{ //吸收 104 | [self.navigationController popViewControllerWithAnimated:YFPushAnimationSuckEffect]; 105 | } break; 106 | case 6:{ //波纹 107 | [self.navigationController popViewControllerWithAnimated:YFPushAnimationRippleEffect]; 108 | } break; 109 | case 7:{ //镜头 110 | [self.navigationController popViewControllerWithAnimated:YFPushAnimationCameraIris]; 111 | } break; 112 | case 8:{ //覆盖 113 | [self.navigationController popViewControllerWithAnimated:YFPushAnimationReveal]; 114 | } break; 115 | case 9:{ //覆盖 116 | [self.navigationController popViewControllerWithAnimated:YFPushAnimationFade]; 117 | } break; 118 | 119 | 120 | } 121 | } 122 | 123 | - (void)didReceiveMemoryWarning { 124 | [super didReceiveMemoryWarning]; 125 | // Dispose of any resources that can be recreated. 126 | } 127 | 128 | /* 129 | #pragma mark - Navigation 130 | 131 | // In a storyboard-based application, you will often want to do a little preparation before navigation 132 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 133 | // Get the new view controller using [segue destinationViewController]. 134 | // Pass the selected object to the new view controller. 135 | } 136 | */ 137 | 138 | @end 139 | -------------------------------------------------------------------------------- /AnimationDemo/UI/ViewController/YFFourViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YFFourViewController.h 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFBaseViewController.h" 10 | 11 | @interface YFFourViewController : YFBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationDemo/UI/ViewController/YFFourViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YFFourViewController.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFFourViewController.h" 10 | #import "YFFiveViewController.h" 11 | @interface YFFourViewController () 12 | 13 | @end 14 | 15 | @implementation YFFourViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | 21 | 22 | } 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | /* 30 | #pragma mark - Navigation 31 | 32 | // In a storyboard-based application, you will often want to do a little preparation before navigation 33 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 34 | // Get the new view controller using [segue destinationViewController]. 35 | // Pass the selected object to the new view controller. 36 | } 37 | */ 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /AnimationDemo/UI/ViewController/YFOneViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YFOneViewController.h 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFBaseViewController.h" 10 | 11 | @interface YFOneViewController : YFBaseViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationDemo/UI/ViewController/YFOneViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YFOneViewController.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFOneViewController.h" 10 | #import "YFAnimationCostum.h" 11 | @interface YFOneViewController () 12 | 13 | @end 14 | 15 | @implementation YFOneViewController 16 | { 17 | UIImageView *_imageView; 18 | CALayer *layer; 19 | } 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | self.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.2]; 23 | 24 | _imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 50, 50)]; 25 | _imageView.image = [UIImage imageNamed:@"Image1"]; 26 | _imageView.center = CGPointMake(self.view.center.x, self.view.center.y-100); 27 | [self.view addSubview:_imageView]; 28 | 29 | layer = _imageView.layer; 30 | 31 | UIBarButtonItem * item =[[UIBarButtonItem alloc]initWithTitle:@"选择动画" 32 | style:UIBarButtonItemStylePlain 33 | target:self 34 | action:@selector(changeAnimation)]; 35 | item.tintColor = [UIColor whiteColor]; 36 | self.navigationItem.rightBarButtonItem = item; 37 | 38 | 39 | } 40 | 41 | - (void)changeAnimation { 42 | 43 | //先移除动画 不然会有动画重叠 44 | [layer removeAllAnimations]; 45 | //ios8 的actionsheet 46 | UIAlertController * alertController = [UIAlertController alertControllerWithTitle:@"动画效果" message:@"整理的动画效果" preferredStyle:UIAlertControllerStyleActionSheet]; 47 | 48 | UIAlertAction * cancel = [UIAlertAction actionWithTitle:@"取消" 49 | style:UIAlertActionStyleCancel handler:nil]; 50 | 51 | UIAlertAction * action1 = [UIAlertAction actionWithTitle:@"闪烁动画" 52 | style:UIAlertActionStyleDefault 53 | handler:^(UIAlertAction * _Nonnull action) { 54 | //闪烁 55 | [layer addAnimation:[YFAnimationCostum animation_opacityForever:0.5] forKey:nil]; 56 | }]; 57 | 58 | UIAlertAction * action2 = [UIAlertAction actionWithTitle:@"横向移动" 59 | style:UIAlertActionStyleDefault 60 | handler:^(UIAlertAction * _Nonnull action) { 61 | //横向移动 62 | [layer addAnimation:[YFAnimationCostum animation_moveX:0.5 X:[NSNumber numberWithFloat:50]] forKey:nil]; 63 | }]; 64 | 65 | UIAlertAction * action3 = [UIAlertAction actionWithTitle:@"纵向移动" 66 | style:UIAlertActionStyleDefault 67 | handler:^(UIAlertAction * _Nonnull action) { 68 | //纵向移动 69 | [layer addAnimation:[YFAnimationCostum animation_moveY:0.5 Y:[NSNumber numberWithFloat:50]] forKey:nil]; 70 | }]; 71 | 72 | UIAlertAction * action4 = [UIAlertAction actionWithTitle:@"缩放效果" 73 | style:UIAlertActionStyleDefault 74 | handler:^(UIAlertAction * _Nonnull action) { 75 | //缩放 76 | [layer addAnimation:[YFAnimationCostum animation_scale:[NSNumber numberWithFloat:1.0f] orgin:[NSNumber numberWithFloat:0.5] durTimes:0.5]forKey:nil]; 77 | }]; 78 | 79 | UIAlertAction * action5 = [UIAlertAction actionWithTitle:@"组合动画" 80 | style:UIAlertActionStyleDefault 81 | handler:^(UIAlertAction * _Nonnull action) { 82 | //组合动画 83 | NSArray *myArray = [NSArray arrayWithObjects:[YFAnimationCostum animation_opacityForever:0.5],[YFAnimationCostum animation_moveX:0.5 X:[NSNumber numberWithFloat:100]],[YFAnimationCostum animation_scale:[NSNumber numberWithFloat:1.0f] orgin:[NSNumber numberWithFloat:0.5] durTimes:0.5], nil]; 84 | 85 | [layer addAnimation:[YFAnimationCostum animation_groupAnimation:myArray durTimes:3 Rep:MAXFLOAT]forKey:nil]; 86 | }]; 87 | 88 | UIAlertAction * action6 = [UIAlertAction actionWithTitle:@"路径动画" 89 | style:UIAlertActionStyleDefault 90 | handler:^(UIAlertAction * _Nonnull action) { 91 | //路径动画 92 | CGPoint centerP = _imageView.center; 93 | //YFAnimationCostum.h 中有使用方法 94 | CGMutablePathRef curvedPath = CGPathCreateMutable(); 95 | CGPathMoveToPoint(curvedPath, NULL, centerP.x, centerP.y); 96 | CGPathAddQuadCurveToPoint(curvedPath, NULL, centerP.x+100,centerP.y,centerP.x+100, centerP.y+100); 97 | CGPathAddQuadCurveToPoint(curvedPath, NULL, centerP.x+100,centerP.y+200,centerP.x , centerP.y+200); 98 | CGPathAddQuadCurveToPoint(curvedPath, NULL, centerP.x-100, centerP.y+200,centerP.x-100, centerP.y+100); 99 | CGPathAddQuadCurveToPoint(curvedPath, NULL, centerP.x-100, centerP.y,centerP.x, centerP.y); 100 | 101 | [layer addAnimation:[YFAnimationCostum animation_keyframeAnimation:curvedPath durTimes:2 Rep:MAXFLOAT] forKey:nil]; 102 | 103 | }]; 104 | 105 | UIAlertAction * action7 = [UIAlertAction actionWithTitle:@"旋转动画" 106 | style:UIAlertActionStyleDefault 107 | handler:^(UIAlertAction * _Nonnull action) { 108 | //旋转 109 | CATransform3D ca3d = CATransform3DMakeRotation(kDegreesToRadian(180), 1, 1, 0); 110 | [layer addAnimation:[YFAnimationCostum animation_rotation:0.7 CATransform3D:ca3d repeatCount:MAXFLOAT] forKey:nil]; 111 | 112 | }]; 113 | UIAlertAction * action8 = [UIAlertAction actionWithTitle:@"抖动动画" 114 | style:UIAlertActionStyleDefault 115 | handler:^(UIAlertAction * _Nonnull action) { 116 | //抖动 117 | CATransform3D ca3d1 =CATransform3DRotate(_imageView.layer.transform, -0.05, 0.0, 0.0, 0.05); 118 | CATransform3D ca3d2 =CATransform3DRotate(_imageView.layer.transform, 0.05, 0.0, 0.0, 0.05); 119 | [layer addAnimation:[YFAnimationCostum animation_JitterFromCATransform3D:ca3d1 To:ca3d2] forKey:nil]; 120 | }]; 121 | 122 | 123 | [alertController addAction:action1]; 124 | [alertController addAction:action2]; 125 | [alertController addAction:action3]; 126 | [alertController addAction:action4]; 127 | [alertController addAction:action5]; 128 | [alertController addAction:action6]; 129 | [alertController addAction:action7]; 130 | [alertController addAction:action8]; 131 | [alertController addAction:cancel]; 132 | [self presentViewController:alertController animated:YES completion:nil]; 133 | } 134 | 135 | - (void)didReceiveMemoryWarning { 136 | [super didReceiveMemoryWarning]; 137 | // Dispose of any resources that can be recreated. 138 | } 139 | 140 | /* 141 | #pragma mark - Navigation 142 | 143 | // In a storyboard-based application, you will often want to do a little preparation before navigation 144 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 145 | // Get the new view controller using [segue destinationViewController]. 146 | // Pass the selected object to the new view controller. 147 | } 148 | */ 149 | 150 | @end 151 | -------------------------------------------------------------------------------- /AnimationDemo/UI/ViewController/YFThreeViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YFThreeViewController.h 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFBaseViewController.h" 10 | #import "YFTwoViewController.h" 11 | @interface YFThreeViewController : YFBaseViewController 12 | 13 | @property (strong, nonatomic) UITableView *tableView; 14 | @property (strong, nonatomic) NSArray *dataSource; 15 | @end 16 | -------------------------------------------------------------------------------- /AnimationDemo/UI/ViewController/YFThreeViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YFThreeViewController.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFThreeViewController.h" 10 | #import "YFFiveViewController.h" 11 | @interface YFThreeViewController () 12 | 13 | @end 14 | 15 | @implementation YFThreeViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | self.view.backgroundColor = [UIColor grayColor]; 21 | 22 | self.dataSource = @[@"define",@"翻页",@"翻页二",@"翻转",@"立方体",@"吸收",@"波纹",@"镜头",@"覆盖",@"淡入"]; 23 | 24 | [self createUI]; 25 | } 26 | 27 | - (void)createUI { 28 | 29 | self.tableView =[[UITableView alloc]initWithFrame:CGRectMake(0, 0, WW, HH-113) style:UITableViewStylePlain]; 30 | self.tableView.delegate =self; 31 | self.tableView.dataSource =self; 32 | self.tableView.bounces =NO; 33 | self.tableView.backgroundColor =[UIColor lightGrayColor]; 34 | [self.view addSubview:self.tableView]; 35 | 36 | } 37 | 38 | 39 | #pragma mark - UITableViewDataSource 40 | 41 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 42 | 43 | return self.dataSource.count; 44 | } 45 | 46 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 47 | YFTableViewCell * cell =[tableView dequeueReusableCellWithIdentifier:@"YFTableCellTwo"]; 48 | if (!cell) { 49 | cell =[[YFTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"YFTableCellTwo"]; 50 | cell.selectionStyle =UITableViewCellSelectionStyleNone; 51 | } 52 | cell.nameLabel.text =self.dataSource[indexPath.row]; 53 | return cell; 54 | } 55 | 56 | #pragma mark - UITableViewDelegate 57 | 58 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { 59 | return 0.01; 60 | } 61 | 62 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 63 | return 0.01; 64 | } 65 | 66 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 67 | return 44; 68 | } 69 | 70 | #pragma mark - didSelect 71 | 72 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 73 | YFFiveViewController * five = [[YFFiveViewController alloc]init]; 74 | switch (indexPath.row) { 75 | case 0:{ //defin 76 | [self.navigationController pushViewController:five withAnimated:YFPushAnimationDefine]; 77 | } break; 78 | case 1:{ //翻页 79 | [self.navigationController pushViewController:five withAnimated:YFPushAnimationCurl]; 80 | } break; 81 | case 2:{ //翻页2 82 | [self.navigationController pushViewController:five withAnimated:YFPushAnimationCurlTWo]; 83 | } break; 84 | case 3:{ //翻转 85 | [self.navigationController pushViewController:five withAnimated:YFPushAnimationFlip]; 86 | } break; 87 | case 4:{ //立方体 88 | [self.navigationController pushViewController:five withAnimated:YFPushAnimationCube]; 89 | } break; 90 | case 5:{ //吸收 91 | [self.navigationController pushViewController:five withAnimated:YFPushAnimationSuckEffect]; 92 | } break; 93 | case 6:{ //波纹 94 | [self.navigationController pushViewController:five withAnimated:YFPushAnimationRippleEffect]; 95 | } break; 96 | case 7:{ //镜头 97 | [self.navigationController pushViewController:five withAnimated:YFPushAnimationCameraIris]; 98 | } break; 99 | case 8:{ //覆盖 100 | [self.navigationController pushViewController:five withAnimated:YFPushAnimationReveal]; 101 | } break; 102 | case 9:{ //淡入 103 | [self.navigationController pushViewController:five withAnimated:YFPushAnimationFade]; 104 | } break; 105 | 106 | 107 | } 108 | } 109 | 110 | 111 | - (void)didReceiveMemoryWarning { 112 | [super didReceiveMemoryWarning]; 113 | // Dispose of any resources that can be recreated. 114 | } 115 | 116 | /* 117 | #pragma mark - Navigation 118 | 119 | // In a storyboard-based application, you will often want to do a little preparation before navigation 120 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 121 | // Get the new view controller using [segue destinationViewController]. 122 | // Pass the selected object to the new view controller. 123 | } 124 | */ 125 | 126 | @end 127 | -------------------------------------------------------------------------------- /AnimationDemo/UI/ViewController/YFTwoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // YFTwoViewController.h 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFBaseViewController.h" 10 | 11 | @interface YFTableViewCell : UITableViewCell 12 | @property (strong, nonatomic) UILabel *nameLabel; 13 | @property (strong, nonatomic) UIImageView *iconImageView; 14 | @end 15 | 16 | @interface YFTwoViewController : YFBaseViewController 17 | @property (strong, nonatomic) UITableView *tableView; 18 | @property (strong, nonatomic) NSMutableArray *dataSource; 19 | @end 20 | -------------------------------------------------------------------------------- /AnimationDemo/UI/ViewController/YFTwoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // YFTwoViewController.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import "YFTwoViewController.h" 10 | #import "YFAnimationCostum.h" 11 | 12 | @implementation YFTableViewCell 13 | 14 | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { 15 | 16 | if (self =[super initWithStyle:style reuseIdentifier:reuseIdentifier]) { 17 | //iconImage 18 | self.iconImageView =[[UIImageView alloc]initWithFrame:CGRectMake(15, 9.5, 25, 25)]; 19 | self.iconImageView.image =[UIImage imageNamed:@"iconImage"]; 20 | [self.contentView addSubview:self.iconImageView]; 21 | 22 | //nameLabel 23 | self.nameLabel =[[UILabel alloc]initWithFrame:CGRectMake(WW-200, 5, 180, 34)]; 24 | self.nameLabel.font =[UIFont systemFontOfSize:15.0f]; 25 | self.nameLabel.textAlignment =NSTextAlignmentRight; 26 | self.nameLabel.textColor =[UIColor blackColor]; 27 | [self.contentView addSubview:self.nameLabel]; 28 | 29 | self.backgroundColor =[UIColor whiteColor]; 30 | 31 | } 32 | 33 | return self; 34 | } 35 | 36 | @end 37 | 38 | @interface YFTwoViewController () 39 | 40 | @end 41 | 42 | @implementation YFTwoViewController 43 | { 44 | UIImageView *_imageView; 45 | } 46 | - (void)viewDidLoad { 47 | 48 | [super viewDidLoad]; 49 | 50 | [self creatDataSource]; 51 | [self creatUI]; 52 | } 53 | 54 | #pragma mark - 数据 55 | 56 | - (void)creatDataSource { 57 | 58 | self.dataSource =[[NSMutableArray alloc]init]; 59 | 60 | NSArray *curlArray =@[@"向上翻页",@"向下翻页",@"向左翻页",@"向右翻页"]; 61 | NSArray *flipArray =@[@"向左翻转",@"向右翻转",@"向上翻转",@"向下翻转"]; 62 | NSArray *pushArray =@[@"向右推出",@"向左返回"]; 63 | NSArray *presentArray =@[@"向上提出",@"向下消失"]; 64 | NSArray *cubeArray =@[@"立方体向上",@"立方体向下",@"立方体向左",@"立方体向右"]; 65 | NSArray *revealArray =@[@"覆盖向上",@"覆盖向下",@"覆盖向左",@"覆盖向右"]; 66 | NSArray *fadeArray =@[@"吸收",@"波纹",@"镜头开",@"镜头关",@"淡入"]; 67 | 68 | [self.dataSource addObject:curlArray]; 69 | [self.dataSource addObject:flipArray]; 70 | [self.dataSource addObject:pushArray]; 71 | [self.dataSource addObject:presentArray]; 72 | [self.dataSource addObject:cubeArray]; 73 | [self.dataSource addObject:revealArray]; 74 | [self.dataSource addObject:fadeArray]; 75 | 76 | } 77 | 78 | #pragma mark - UI 79 | 80 | - (void)creatUI { 81 | 82 | _imageView =[[UIImageView alloc]initWithFrame:CGRectMake(0, 0, WW, HH)]; 83 | _imageView.image =[UIImage imageNamed:@"background"]; 84 | _imageView.backgroundColor =[UIColor whiteColor]; 85 | _imageView.userInteractionEnabled =YES; 86 | [self.view addSubview:_imageView]; 87 | 88 | UIButton * button =[UIButton buttonWithType:UIButtonTypeCustom]; 89 | button.frame =CGRectMake(0, 0, 100, 50); 90 | button.center =_imageView.center; 91 | [button addTarget:self action:@selector(exchangeView) forControlEvents:UIControlEventTouchUpInside]; 92 | [button setTitle:@"返回" forState:UIControlStateNormal]; 93 | button.backgroundColor =[UIColor whiteColor]; 94 | button.layer.masksToBounds =YES; 95 | button.layer.cornerRadius =5; 96 | [button setTitleColor: [UIColor blackColor]forState:UIControlStateNormal]; 97 | [_imageView addSubview:button]; 98 | 99 | self.tableView =[[UITableView alloc]initWithFrame:CGRectMake(0, 0, WW, HH-113) style:UITableViewStylePlain]; 100 | self.tableView.delegate =self; 101 | self.tableView.dataSource =self; 102 | self.tableView.bounces =NO; 103 | self.tableView.backgroundColor =[UIColor lightGrayColor]; 104 | [self.view addSubview:self.tableView]; 105 | 106 | } 107 | 108 | - (void)exchangeView { 109 | 110 | [self.view.layer removeAllAnimations]; 111 | [self.view exchangeSubviewAtIndex:1 withSubviewAtIndex:0]; 112 | } 113 | 114 | #pragma mark - UITableViewDataSource 115 | 116 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 117 | 118 | return [[self.dataSource objectAtIndex:section] count]; 119 | } 120 | 121 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 122 | 123 | return self.dataSource.count; 124 | } 125 | 126 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 127 | YFTableViewCell * cell =[tableView dequeueReusableCellWithIdentifier:@"YFTableCellTwo"]; 128 | if (!cell) { 129 | cell =[[YFTableViewCell alloc]initWithStyle:UITableViewCellStyleDefault 130 | reuseIdentifier:@"YFTableCellTwo"]; 131 | 132 | cell.selectionStyle =UITableViewCellSelectionStyleNone; 133 | } 134 | 135 | cell.nameLabel.text =self.dataSource[indexPath.section][indexPath.row]; 136 | return cell; 137 | } 138 | 139 | #pragma mark - UITableViewDelegate 140 | 141 | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { 142 | 143 | return 0.01; 144 | } 145 | 146 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { 147 | 148 | return 30; 149 | } 150 | 151 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { 152 | 153 | return 44; 154 | } 155 | 156 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { 157 | 158 | UILabel * headerView =[[UILabel alloc]initWithFrame:CGRectMake(0, 0, WW, 30)]; 159 | 160 | switch (section) { 161 | case 0: 162 | headerView.text =@" 翻页"; 163 | break; 164 | case 1: 165 | headerView.text =@" 翻转"; 166 | break; 167 | case 2: 168 | headerView.text =@" Push"; 169 | break; 170 | case 3: 171 | headerView.text =@" Present"; 172 | break; 173 | case 4: 174 | headerView.text =@" 立方体"; 175 | break; 176 | case 5: 177 | headerView.text =@" 覆盖"; 178 | break; 179 | 180 | default: 181 | headerView.text =@" 其他"; 182 | break; 183 | 184 | } 185 | headerView.textColor =[UIColor grayColor]; 186 | headerView.font =[UIFont systemFontOfSize:17.0f]; 187 | headerView.backgroundColor =[UIColor lightGrayColor]; 188 | return headerView; 189 | } 190 | 191 | #pragma mark - didSelect 192 | 193 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 194 | 195 | switch (indexPath.section) { 196 | case 0: { //翻页 197 | switch (indexPath.row) { 198 | case 0:{ 199 | [YFAnimationCostum animationCurlUp:self.view]; 200 | }break; 201 | case 1:{ 202 | [YFAnimationCostum animationCurlDown:self.view]; 203 | }break; 204 | case 2:{ 205 | [YFAnimationCostum animationCurlLeft:self.view]; 206 | }break; 207 | case 3:{ 208 | [YFAnimationCostum animationCurlRight:self.view]; 209 | }break; 210 | 211 | 212 | } 213 | }break; 214 | 215 | case 1: { //翻转 216 | switch (indexPath.row) { 217 | case 0:{ 218 | [YFAnimationCostum animationFlipLeft:self.view]; 219 | }break; 220 | case 1:{ 221 | [YFAnimationCostum animationFlipRight:self.view]; 222 | }break; 223 | case 2:{ 224 | [YFAnimationCostum animationFlipUp:self.view]; 225 | }break; 226 | case 3:{ 227 | [YFAnimationCostum animationFlipDown:self.view]; 228 | }break; 229 | 230 | } 231 | 232 | }break; 233 | 234 | case 2: { //Push 235 | switch (indexPath.row) { 236 | case 0:{ 237 | [YFAnimationCostum animationPushRight:self.view duration:1]; 238 | }break; 239 | case 1:{ 240 | [YFAnimationCostum animationPushLeft:self.view duration:1]; 241 | 242 | }break; 243 | 244 | } 245 | 246 | }break; 247 | 248 | case 3: { //Present 249 | switch (indexPath.row) { 250 | case 0:{ 251 | [YFAnimationCostum animationMoveUp:self.view duration:1]; 252 | }break; 253 | case 1:{ 254 | [YFAnimationCostum animationMoveDown:self.view duration:1]; 255 | }break; 256 | 257 | } 258 | 259 | }break; 260 | case 4: { //立方体 261 | switch (indexPath.row) { 262 | case 0:{ 263 | [YFAnimationCostum animationCubeUp:self.view duration:1]; 264 | }break; 265 | case 1:{ 266 | [YFAnimationCostum animationCubeDown:self.view duration:1]; 267 | }break; 268 | case 2:{ 269 | [YFAnimationCostum animationCubeLeft:self.view duration:1]; 270 | }break; 271 | case 3:{ 272 | [YFAnimationCostum animationCubeRight:self.view duration:1]; 273 | }break; 274 | 275 | 276 | } 277 | }break; 278 | case 5:{ //翻转 279 | switch (indexPath.row) { 280 | case 0:{ 281 | [YFAnimationCostum animationRevealUp:self.view duration:1]; 282 | }break; 283 | case 1:{ 284 | [YFAnimationCostum animationRevealDown:self.view duration:1]; 285 | }break; 286 | case 2:{ 287 | [YFAnimationCostum animationRevealLeft:self.view duration:1]; 288 | }break; 289 | case 3:{ 290 | [YFAnimationCostum animationRevealRight:self.view duration:1]; 291 | }break; 292 | } 293 | }break; 294 | case 6: { //其他 295 | switch (indexPath.row) { 296 | case 0:{ 297 | [YFAnimationCostum animationSuckEffect:self.view duration:1]; 298 | }break; 299 | case 1:{ 300 | [YFAnimationCostum animationRippleEffect:self.view duration:1]; 301 | }break; 302 | case 2:{ 303 | [YFAnimationCostum animationCameraOpen:self.view duration:1]; 304 | }break; 305 | case 3:{ 306 | [YFAnimationCostum animationCameraClose:self.view duration:1]; 307 | }break; 308 | case 4:{ 309 | [YFAnimationCostum animationFade:self.view duration:1]; 310 | }break; 311 | 312 | 313 | } 314 | 315 | }break; 316 | 317 | } 318 | [self.view exchangeSubviewAtIndex:1 withSubviewAtIndex:0]; 319 | 320 | } 321 | 322 | - (void)didReceiveMemoryWarning { 323 | [super didReceiveMemoryWarning]; 324 | // Dispose of any resources that can be recreated. 325 | } 326 | 327 | /* 328 | #pragma mark - Navigation 329 | 330 | // In a storyboard-based application, you will often want to do a little preparation before navigation 331 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 332 | // Get the new view controller using [segue destinationViewController]. 333 | // Pass the selected object to the new view controller. 334 | } 335 | */ 336 | 337 | @end 338 | -------------------------------------------------------------------------------- /AnimationDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AnimationDemo 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AnimationDemoTests/AnimationDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationDemoTests.m 3 | // AnimationDemoTests 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AnimationDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AnimationDemoTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /AnimationDemoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /AnimationDemoUITests/AnimationDemoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationDemoUITests.m 3 | // AnimationDemoUITests 4 | // 5 | // Created by EnforLiu on 15/11/26. 6 | // Copyright © 2015年 EnforLiu. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AnimationDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AnimationDemoUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /AnimationDemoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AnimationDemo 2 | 3 | # YFAnimationCostum.h 4 | 5 | ``` 6 | 7 | /** 8 | * 永久的闪烁动画 9 | * 10 | * @param time 闪烁的时间周期 11 | * 12 | * @return [layer addAnimation: forKey:]; 13 | */ 14 | + (CABasicAnimation *)animation_opacityForever:(float)time; 15 | 16 | /** 17 | * 横向移动动画 18 | * 19 | * @param time 移动的时间周期 20 | * @param x 横移距离 21 | * 22 | * @return [layer addAnimation: forKey:]; 23 | */ 24 | + (CABasicAnimation *)animation_moveX:(float)time X:(NSNumber *)x; 25 | 26 | /** 27 | * 纵向移动动画 28 | * 29 | * @param time 移动的时间周期 30 | * @param y 纵移距离 31 | * 32 | * @return [layer addAnimation: forKey:]; 33 | */ 34 | + (CABasicAnimation *)animation_moveY:(float)time Y:(NSNumber *)y; 35 | 36 | /** 37 | * 缩放 38 | * 39 | * @param Multiple 动画前大小比例 40 | * @param orginMultiple 动画后大小比例 41 | * @param time 动画时间周期 42 | * 43 | * @return [layer addAnimation: forKey:]; 44 | */ 45 | + (CABasicAnimation *)animation_scale:(NSNumber *)Multiple orgin:(NSNumber *)orginMultiple durTimes:(float)time; 46 | 47 | /** 48 | * 组合动画 49 | * 50 | * @param animationAry 组合动画数组 51 | * @param time 动画时间周期 52 | * @param repeatTimes 动画运行次数 53 | * 54 | * @return animation 55 | */ 56 | + (CAAnimationGroup *)animation_groupAnimation:(NSArray *)animationAry durTimes:(float)time Rep:(float)repeatTimes; 57 | 58 | /** 59 | * 路径动画 60 | * @param path 移动控制点 61 | * @param time 动画时间 62 | * @param repeatTimes 动画次数 63 | */ 64 | + (CAKeyframeAnimation *)animation_keyframeAnimation:(CGMutablePathRef)path durTimes:(float)time Rep:(float)repeatTimes; 65 | 66 | /** 67 | * 旋转动画 68 | * @param time 时间 69 | * @param transform3D CATransform3DMakeRotation 70 | * @param repeatCount 动画次数 71 | */ 72 | + (CABasicAnimation *)animation_rotation:(float)time CATransform3D:(CATransform3D)transform3D repeatCount:(int)repeatCount; 73 | 74 | /* 75 | * 抖动动画 76 | * @param from CATransform3DRotate 77 | * @param to CATransform3DRotate 78 | */ 79 | + (CABasicAnimation *)animation_JitterFromCATransform3D:(CATransform3D)from To:(CATransform3D)to; 80 | 81 | 82 | 83 | 84 | /** 85 | * 向上翻页动画 86 | * @param view 要执行动画的view 87 | */ 88 | + (void)animationCurlUp:(UIView *)view; 89 | 90 | /** 91 | * 向下翻页动画 92 | * @param view 要执行动画的view 93 | */ 94 | + (void)animationCurlDown:(UIView *)view; 95 | 96 | /** 97 | * 向左翻页动画 98 | * @param view 要执行动画的view 99 | */ 100 | 101 | + (void)animationCurlLeft:(UIView *)view; 102 | /** 103 | * 向右翻页动画 104 | * @param view 要执行动画的view 105 | */ 106 | + (void)animationCurlRight:(UIView *)view; 107 | 108 | /** 109 | * 向上翻转动画 110 | * @param view 要执行动画的view 111 | */ 112 | + (void)animationFlipUp:(UIView *)view; 113 | 114 | /** 115 | * 向下翻转动画 116 | * @param view 要执行动画的view 117 | */ 118 | + (void)animationFlipDown:(UIView *)view; 119 | 120 | /** 121 | * 向左翻转动画 122 | * @param view 要执行动画的view 123 | */ 124 | + (void)animationFlipLeft:(UIView *)view; 125 | 126 | /** 127 | * 向右翻转动画 128 | * @param view 要执行动画的view 129 | */ 130 | + (void)animationFlipRight:(UIView *)view; 131 | 132 | /** 133 | * 向上Push 134 | * @param view 要执行动画的view 135 | * @param duration 动画时间 136 | */ 137 | + (void)animationPushUp:(UIView *)view duration:(CFTimeInterval)duration; 138 | 139 | /** 140 | * 向下Push 141 | * @param view 要执行动画的view 142 | * @param duration 动画时间 143 | */ 144 | + (void)animationPushDown:(UIView *)view duration:(CFTimeInterval)duration; 145 | 146 | /** 147 | * 向左Push 148 | * @param view 要执行动画的view 149 | * @param duration 动画时间 150 | */ 151 | + (void)animationPushLeft:(UIView *)view duration:(CFTimeInterval)duration; 152 | 153 | /** 154 | * 向右Push 155 | * @param view 要执行动画的view 156 | * @param duration 动画时间 157 | */ 158 | + (void)animationPushRight:(UIView *)view duration:(CFTimeInterval)duration; 159 | 160 | /** 161 | * 向上Present 162 | * @param view 要执行动画的view 163 | * @param duration 动画时间 164 | */ 165 | + (void)animationMoveUp:(UIView *)view duration:(CFTimeInterval)duration; 166 | 167 | /** 168 | * 向下Present 169 | * @param view 要执行动画的view 170 | * @param duration 动画时间 171 | */ 172 | + (void)animationMoveDown:(UIView *)view duration:(CFTimeInterval)duration; 173 | 174 | /** 175 | * 向左Present 176 | * @param view 要执行动画的view 177 | * @param duration 动画时间 178 | */ 179 | + (void)animationMoveLeft:(UIView *)view duration:(CFTimeInterval)duration; 180 | 181 | /** 182 | * 向右Present 183 | * @param view 要执行动画的view 184 | * @param duration 动画时间 185 | */ 186 | + (void)animationMoveRight:(UIView *)view duration:(CFTimeInterval)duration; 187 | 188 | /** 189 | * 立方体向上 190 | * @param view 要执行动画的view 191 | * @param duration 动画时间 192 | */ 193 | + (void)animationCubeUp:(UIView *)view duration:(CFTimeInterval)duration; 194 | 195 | /** 196 | * 立方体向下 197 | * @param view 要执行动画的view 198 | * @param duration 动画时间 199 | */ 200 | + (void)animationCubeDown:(UIView *)view duration:(CFTimeInterval)duration; 201 | 202 | /** 203 | * 立方体向左 204 | * @param view 要执行动画的view 205 | * @param duration 动画时间 206 | */ 207 | + (void)animationCubeLeft:(UIView *)view duration:(CFTimeInterval)duration; 208 | 209 | /** 210 | * 立方体向右 211 | * @param view 要执行动画的view 212 | * @param duration 动画时间 213 | */ 214 | + (void)animationCubeRight:(UIView *)view duration:(CFTimeInterval)duration; 215 | 216 | /** 217 | * 吸收 218 | * @param view 要执行动画的view 219 | * @param duration 动画时间 220 | */ 221 | + (void)animationSuckEffect:(UIView *)view duration:(CFTimeInterval)duration; 222 | 223 | /** 224 | * 波纹 225 | * @param view 要执行动画的view 226 | * @param duration 动画时间 227 | */ 228 | + (void)animationRippleEffect:(UIView *)view duration:(CFTimeInterval)duration; 229 | 230 | /** 231 | * 镜头开 232 | * @param view 要执行动画的view 233 | * @param duration 动画时间 234 | */ 235 | + (void)animationCameraOpen:(UIView *)view duration:(CFTimeInterval)duration; 236 | 237 | /** 238 | * 镜头关 239 | * @param view 要执行动画的view 240 | * @param duration 动画时间 241 | */ 242 | + (void)animationCameraClose:(UIView *)view duration:(CFTimeInterval)duration; 243 | 244 | /** 245 | * 覆盖向上 246 | * @param view 要执行动画的view 247 | * @param duration 动画时间 248 | */ 249 | + (void)animationRevealUp:(UIView *)view duration:(CFTimeInterval)duration; 250 | 251 | /** 252 | * 覆盖向下 253 | * @param view 要执行动画的view 254 | * @param duration 动画时间 255 | */ 256 | + (void)animationRevealDown:(UIView *)view duration:(CFTimeInterval)duration; 257 | 258 | /** 259 | * 覆盖向左 260 | * @param view 要执行动画的view 261 | * @param duration 动画时间 262 | */ 263 | + (void)animationRevealLeft:(UIView *)view duration:(CFTimeInterval)duration; 264 | 265 | /** 266 | * 覆盖向右 267 | * @param view 要执行动画的view 268 | * @param duration 动画时间 269 | */ 270 | + (void)animationRevealRight:(UIView *)view duration:(CFTimeInterval)duration; 271 | 272 | /** 273 | * 淡入 274 | * @param view 要执行动画的view 275 | * @param duration 动画时间 276 | */ 277 | + (void)animationFade:(UIView *)view duration:(CFTimeInterval)duration; 278 | 279 | 280 | ``` 281 | # UINavigationController+YFTransition.h 282 | 283 | ``` 284 | typedef NS_ENUM(NSInteger, YFPushAnimation) { 285 | YFPushAnimationDefine, //默认 286 | YFPushAnimationCurl, //翻页 287 | YFPushAnimationCurlTWo, //翻页二 288 | YFPushAnimationFlip, //翻转 289 | YFPushAnimationCube, //立方体 290 | YFPushAnimationSuckEffect, //吸收 291 | YFPushAnimationRippleEffect, //波纹 292 | YFPushAnimationCameraIris, //镜头 293 | YFPushAnimationReveal, //覆盖 294 | YFPushAnimationFade, //淡入 295 | }; 296 | @interface UINavigationController (YFTransition) 297 | 298 | /** 299 | * push方法 300 | * 301 | * @param viewController 视图控制器 302 | * @param animated 动画类型 303 | */ 304 | - (void)pushViewController:(nullable UIViewController *)viewController withAnimated:(YFPushAnimation)animated; 305 | 306 | /** 307 | * pop方法 308 | * 309 | * @param animated 动画类型 310 | * 311 | * @return 视图控制器 312 | */ 313 | - (nullable UIViewController *)popViewControllerWithAnimated:(YFPushAnimation)animated; 314 | 315 | ``` --------------------------------------------------------------------------------