├── README.md ├── animation_demo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── zhanqin.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── animation_demo ├── AnimationModel.h ├── AnimationModel.m ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── Contents.json ├── BZFireworkAnimation │ ├── BZFireworkAnimationButton.h │ ├── BZFireworkAnimationButton.m │ ├── BZFireworkAnimationView.h │ └── BZFireworkAnimationView.m ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── FireAnimationViewController.h ├── FireAnimationViewController.m ├── FloatViewController.h ├── FloatViewController.m ├── GifViewController.h ├── GifViewController.m ├── HeartbeatViewController.h ├── HeartbeatViewController.m ├── Info.plist ├── LineGifViewController.h ├── LineGifViewController.m ├── SingleLineViewController.h ├── SingleLineViewController.m ├── ViewController.h ├── ViewController.m ├── animation.json ├── button_bulletin_board_collected@2x.png ├── button_bulletin_board_uncollect@2x.png ├── ferriswheel │ ├── gif_ferriswheel1@2x.png │ ├── gif_ferriswheel2@2x.png │ ├── gif_ferriswheel3@2x.png │ ├── gif_ferriswheel4@2x.png │ ├── gif_ferriswheel5@2x.png │ └── gif_ferriswheel6@2x.png ├── image_city_angel_login_girl@2x.png ├── image_home_yacht@2x.png ├── main.m └── walk │ ├── walk_person6_01@2x.png │ ├── walk_person6_02@2x.png │ ├── walk_person6_03@2x.png │ └── walk_person6_04@2x.png ├── animation_demoTests ├── Info.plist └── animation_demoTests.m └── animation_demoUITests ├── Info.plist └── animation_demoUITests.m /README.md: -------------------------------------------------------------------------------- 1 | # animation 2 | iOS常用动画效果的实现 3 | 动画效果可参考该博客:https://blog.csdn.net/aaaaazq/article/details/80736594 4 | -------------------------------------------------------------------------------- /animation_demo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 2D50C5EA20D8AAFF00458561 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C5E920D8AAFF00458561 /* AppDelegate.m */; }; 11 | 2D50C5ED20D8AAFF00458561 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C5EC20D8AAFF00458561 /* ViewController.m */; }; 12 | 2D50C5F020D8AAFF00458561 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C5EE20D8AAFF00458561 /* Main.storyboard */; }; 13 | 2D50C5F220D8AB0400458561 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C5F120D8AB0400458561 /* Assets.xcassets */; }; 14 | 2D50C5F520D8AB0400458561 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C5F320D8AB0400458561 /* LaunchScreen.storyboard */; }; 15 | 2D50C5F820D8AB0400458561 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C5F720D8AB0400458561 /* main.m */; }; 16 | 2D50C60220D8AB0400458561 /* animation_demoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C60120D8AB0400458561 /* animation_demoTests.m */; }; 17 | 2D50C60D20D8AB0400458561 /* animation_demoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C60C20D8AB0400458561 /* animation_demoUITests.m */; }; 18 | 2D50C61C20D8B0FF00458561 /* SingleLineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C61B20D8B0FF00458561 /* SingleLineViewController.m */; }; 19 | 2D50C61F20D8CCCC00458561 /* AnimationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C61E20D8CCCC00458561 /* AnimationModel.m */; }; 20 | 2D50C62120D8CE3300458561 /* animation.json in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C62020D8CE3300458561 /* animation.json */; }; 21 | 2D50C62720D8CFEC00458561 /* image_home_yacht@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C62620D8CFEC00458561 /* image_home_yacht@2x.png */; }; 22 | 2D50C62D20D8D41B00458561 /* BZFireworkAnimationButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C62A20D8D41B00458561 /* BZFireworkAnimationButton.m */; }; 23 | 2D50C62E20D8D41B00458561 /* BZFireworkAnimationView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C62C20D8D41B00458561 /* BZFireworkAnimationView.m */; }; 24 | 2D50C63120D8D45F00458561 /* FireAnimationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C63020D8D45F00458561 /* FireAnimationViewController.m */; }; 25 | 2D50C63420D8D5E500458561 /* button_bulletin_board_collected@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C63220D8D5E400458561 /* button_bulletin_board_collected@2x.png */; }; 26 | 2D50C63520D8D5E500458561 /* button_bulletin_board_uncollect@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C63320D8D5E500458561 /* button_bulletin_board_uncollect@2x.png */; }; 27 | 2D50C63820D8D77D00458561 /* HeartbeatViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C63720D8D77D00458561 /* HeartbeatViewController.m */; }; 28 | 2D50C63B20D8DC4900458561 /* FloatViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C63A20D8DC4900458561 /* FloatViewController.m */; }; 29 | 2D50C63D20D8DE1400458561 /* image_city_angel_login_girl@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C63C20D8DE1400458561 /* image_city_angel_login_girl@2x.png */; }; 30 | 2D50C64020D8E45A00458561 /* GifViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C63F20D8E45A00458561 /* GifViewController.m */; }; 31 | 2D50C64820D8E4B200458561 /* gif_ferriswheel1@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C64220D8E4B200458561 /* gif_ferriswheel1@2x.png */; }; 32 | 2D50C64920D8E4B200458561 /* gif_ferriswheel2@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C64320D8E4B200458561 /* gif_ferriswheel2@2x.png */; }; 33 | 2D50C64A20D8E4B200458561 /* gif_ferriswheel3@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C64420D8E4B200458561 /* gif_ferriswheel3@2x.png */; }; 34 | 2D50C64B20D8E4B200458561 /* gif_ferriswheel4@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C64520D8E4B200458561 /* gif_ferriswheel4@2x.png */; }; 35 | 2D50C64C20D8E4B200458561 /* gif_ferriswheel5@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C64620D8E4B200458561 /* gif_ferriswheel5@2x.png */; }; 36 | 2D50C64D20D8E4B200458561 /* gif_ferriswheel6@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C64720D8E4B200458561 /* gif_ferriswheel6@2x.png */; }; 37 | 2D50C65020D8E7D300458561 /* LineGifViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D50C64F20D8E7D300458561 /* LineGifViewController.m */; }; 38 | 2D50C68620D8E7F700458561 /* walk_person6_01@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C66620D8E7F700458561 /* walk_person6_01@2x.png */; }; 39 | 2D50C68720D8E7F700458561 /* walk_person6_02@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C66720D8E7F700458561 /* walk_person6_02@2x.png */; }; 40 | 2D50C68820D8E7F700458561 /* walk_person6_03@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C66820D8E7F700458561 /* walk_person6_03@2x.png */; }; 41 | 2D50C68920D8E7F700458561 /* walk_person6_04@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2D50C66920D8E7F700458561 /* walk_person6_04@2x.png */; }; 42 | /* End PBXBuildFile section */ 43 | 44 | /* Begin PBXContainerItemProxy section */ 45 | 2D50C5FE20D8AB0400458561 /* PBXContainerItemProxy */ = { 46 | isa = PBXContainerItemProxy; 47 | containerPortal = 2D50C5DD20D8AAFF00458561 /* Project object */; 48 | proxyType = 1; 49 | remoteGlobalIDString = 2D50C5E420D8AAFF00458561; 50 | remoteInfo = animation_demo; 51 | }; 52 | 2D50C60920D8AB0400458561 /* PBXContainerItemProxy */ = { 53 | isa = PBXContainerItemProxy; 54 | containerPortal = 2D50C5DD20D8AAFF00458561 /* Project object */; 55 | proxyType = 1; 56 | remoteGlobalIDString = 2D50C5E420D8AAFF00458561; 57 | remoteInfo = animation_demo; 58 | }; 59 | /* End PBXContainerItemProxy section */ 60 | 61 | /* Begin PBXFileReference section */ 62 | 2D50C5E520D8AAFF00458561 /* animation_demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = animation_demo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 63 | 2D50C5E820D8AAFF00458561 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 64 | 2D50C5E920D8AAFF00458561 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 65 | 2D50C5EB20D8AAFF00458561 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 66 | 2D50C5EC20D8AAFF00458561 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 67 | 2D50C5EF20D8AAFF00458561 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 68 | 2D50C5F120D8AB0400458561 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 69 | 2D50C5F420D8AB0400458561 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 70 | 2D50C5F620D8AB0400458561 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | 2D50C5F720D8AB0400458561 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 72 | 2D50C5FD20D8AB0400458561 /* animation_demoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = animation_demoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 73 | 2D50C60120D8AB0400458561 /* animation_demoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = animation_demoTests.m; sourceTree = ""; }; 74 | 2D50C60320D8AB0400458561 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 75 | 2D50C60820D8AB0400458561 /* animation_demoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = animation_demoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 76 | 2D50C60C20D8AB0400458561 /* animation_demoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = animation_demoUITests.m; sourceTree = ""; }; 77 | 2D50C60E20D8AB0400458561 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 78 | 2D50C61A20D8B0FF00458561 /* SingleLineViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SingleLineViewController.h; sourceTree = ""; }; 79 | 2D50C61B20D8B0FF00458561 /* SingleLineViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SingleLineViewController.m; sourceTree = ""; }; 80 | 2D50C61D20D8CCCB00458561 /* AnimationModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AnimationModel.h; sourceTree = ""; }; 81 | 2D50C61E20D8CCCC00458561 /* AnimationModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnimationModel.m; sourceTree = ""; }; 82 | 2D50C62020D8CE3300458561 /* animation.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = animation.json; sourceTree = ""; }; 83 | 2D50C62620D8CFEC00458561 /* image_home_yacht@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "image_home_yacht@2x.png"; sourceTree = ""; }; 84 | 2D50C62920D8D41B00458561 /* BZFireworkAnimationButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BZFireworkAnimationButton.h; sourceTree = ""; }; 85 | 2D50C62A20D8D41B00458561 /* BZFireworkAnimationButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BZFireworkAnimationButton.m; sourceTree = ""; }; 86 | 2D50C62B20D8D41B00458561 /* BZFireworkAnimationView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BZFireworkAnimationView.h; sourceTree = ""; }; 87 | 2D50C62C20D8D41B00458561 /* BZFireworkAnimationView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BZFireworkAnimationView.m; sourceTree = ""; }; 88 | 2D50C62F20D8D45F00458561 /* FireAnimationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FireAnimationViewController.h; sourceTree = ""; }; 89 | 2D50C63020D8D45F00458561 /* FireAnimationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FireAnimationViewController.m; sourceTree = ""; }; 90 | 2D50C63220D8D5E400458561 /* button_bulletin_board_collected@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_bulletin_board_collected@2x.png"; sourceTree = ""; }; 91 | 2D50C63320D8D5E500458561 /* button_bulletin_board_uncollect@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "button_bulletin_board_uncollect@2x.png"; sourceTree = ""; }; 92 | 2D50C63620D8D77D00458561 /* HeartbeatViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HeartbeatViewController.h; sourceTree = ""; }; 93 | 2D50C63720D8D77D00458561 /* HeartbeatViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HeartbeatViewController.m; sourceTree = ""; }; 94 | 2D50C63920D8DC4900458561 /* FloatViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FloatViewController.h; sourceTree = ""; }; 95 | 2D50C63A20D8DC4900458561 /* FloatViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FloatViewController.m; sourceTree = ""; }; 96 | 2D50C63C20D8DE1400458561 /* image_city_angel_login_girl@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "image_city_angel_login_girl@2x.png"; sourceTree = ""; }; 97 | 2D50C63E20D8E45A00458561 /* GifViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GifViewController.h; sourceTree = ""; }; 98 | 2D50C63F20D8E45A00458561 /* GifViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GifViewController.m; sourceTree = ""; }; 99 | 2D50C64220D8E4B200458561 /* gif_ferriswheel1@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gif_ferriswheel1@2x.png"; sourceTree = ""; }; 100 | 2D50C64320D8E4B200458561 /* gif_ferriswheel2@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gif_ferriswheel2@2x.png"; sourceTree = ""; }; 101 | 2D50C64420D8E4B200458561 /* gif_ferriswheel3@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gif_ferriswheel3@2x.png"; sourceTree = ""; }; 102 | 2D50C64520D8E4B200458561 /* gif_ferriswheel4@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gif_ferriswheel4@2x.png"; sourceTree = ""; }; 103 | 2D50C64620D8E4B200458561 /* gif_ferriswheel5@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gif_ferriswheel5@2x.png"; sourceTree = ""; }; 104 | 2D50C64720D8E4B200458561 /* gif_ferriswheel6@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "gif_ferriswheel6@2x.png"; sourceTree = ""; }; 105 | 2D50C64E20D8E7D300458561 /* LineGifViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LineGifViewController.h; sourceTree = ""; }; 106 | 2D50C64F20D8E7D300458561 /* LineGifViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LineGifViewController.m; sourceTree = ""; }; 107 | 2D50C66620D8E7F700458561 /* walk_person6_01@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "walk_person6_01@2x.png"; sourceTree = ""; }; 108 | 2D50C66720D8E7F700458561 /* walk_person6_02@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "walk_person6_02@2x.png"; sourceTree = ""; }; 109 | 2D50C66820D8E7F700458561 /* walk_person6_03@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "walk_person6_03@2x.png"; sourceTree = ""; }; 110 | 2D50C66920D8E7F700458561 /* walk_person6_04@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "walk_person6_04@2x.png"; sourceTree = ""; }; 111 | /* End PBXFileReference section */ 112 | 113 | /* Begin PBXFrameworksBuildPhase section */ 114 | 2D50C5E220D8AAFF00458561 /* Frameworks */ = { 115 | isa = PBXFrameworksBuildPhase; 116 | buildActionMask = 2147483647; 117 | files = ( 118 | ); 119 | runOnlyForDeploymentPostprocessing = 0; 120 | }; 121 | 2D50C5FA20D8AB0400458561 /* Frameworks */ = { 122 | isa = PBXFrameworksBuildPhase; 123 | buildActionMask = 2147483647; 124 | files = ( 125 | ); 126 | runOnlyForDeploymentPostprocessing = 0; 127 | }; 128 | 2D50C60520D8AB0400458561 /* Frameworks */ = { 129 | isa = PBXFrameworksBuildPhase; 130 | buildActionMask = 2147483647; 131 | files = ( 132 | ); 133 | runOnlyForDeploymentPostprocessing = 0; 134 | }; 135 | /* End PBXFrameworksBuildPhase section */ 136 | 137 | /* Begin PBXGroup section */ 138 | 2D50C5DC20D8AAFF00458561 = { 139 | isa = PBXGroup; 140 | children = ( 141 | 2D50C5E720D8AAFF00458561 /* animation_demo */, 142 | 2D50C60020D8AB0400458561 /* animation_demoTests */, 143 | 2D50C60B20D8AB0400458561 /* animation_demoUITests */, 144 | 2D50C5E620D8AAFF00458561 /* Products */, 145 | ); 146 | sourceTree = ""; 147 | }; 148 | 2D50C5E620D8AAFF00458561 /* Products */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 2D50C5E520D8AAFF00458561 /* animation_demo.app */, 152 | 2D50C5FD20D8AB0400458561 /* animation_demoTests.xctest */, 153 | 2D50C60820D8AB0400458561 /* animation_demoUITests.xctest */, 154 | ); 155 | name = Products; 156 | sourceTree = ""; 157 | }; 158 | 2D50C5E720D8AAFF00458561 /* animation_demo */ = { 159 | isa = PBXGroup; 160 | children = ( 161 | 2D50C62820D8D41B00458561 /* BZFireworkAnimation */, 162 | 2D50C5E820D8AAFF00458561 /* AppDelegate.h */, 163 | 2D50C5E920D8AAFF00458561 /* AppDelegate.m */, 164 | 2D50C5EB20D8AAFF00458561 /* ViewController.h */, 165 | 2D50C5EC20D8AAFF00458561 /* ViewController.m */, 166 | 2D50C61D20D8CCCB00458561 /* AnimationModel.h */, 167 | 2D50C61E20D8CCCC00458561 /* AnimationModel.m */, 168 | 2D50C61A20D8B0FF00458561 /* SingleLineViewController.h */, 169 | 2D50C61B20D8B0FF00458561 /* SingleLineViewController.m */, 170 | 2D50C62F20D8D45F00458561 /* FireAnimationViewController.h */, 171 | 2D50C63020D8D45F00458561 /* FireAnimationViewController.m */, 172 | 2D50C63620D8D77D00458561 /* HeartbeatViewController.h */, 173 | 2D50C63720D8D77D00458561 /* HeartbeatViewController.m */, 174 | 2D50C63920D8DC4900458561 /* FloatViewController.h */, 175 | 2D50C63A20D8DC4900458561 /* FloatViewController.m */, 176 | 2D50C63E20D8E45A00458561 /* GifViewController.h */, 177 | 2D50C63F20D8E45A00458561 /* GifViewController.m */, 178 | 2D50C64E20D8E7D300458561 /* LineGifViewController.h */, 179 | 2D50C64F20D8E7D300458561 /* LineGifViewController.m */, 180 | 2D50C5EE20D8AAFF00458561 /* Main.storyboard */, 181 | 2D50C5F120D8AB0400458561 /* Assets.xcassets */, 182 | 2D50C5F320D8AB0400458561 /* LaunchScreen.storyboard */, 183 | 2D50C5F620D8AB0400458561 /* Info.plist */, 184 | 2D50C5F720D8AB0400458561 /* main.m */, 185 | 2D50C62020D8CE3300458561 /* animation.json */, 186 | 2D50C62620D8CFEC00458561 /* image_home_yacht@2x.png */, 187 | 2D50C63220D8D5E400458561 /* button_bulletin_board_collected@2x.png */, 188 | 2D50C63320D8D5E500458561 /* button_bulletin_board_uncollect@2x.png */, 189 | 2D50C63C20D8DE1400458561 /* image_city_angel_login_girl@2x.png */, 190 | 2D50C65120D8E7F700458561 /* walk */, 191 | 2D50C64120D8E4B200458561 /* ferriswheel */, 192 | ); 193 | path = animation_demo; 194 | sourceTree = ""; 195 | }; 196 | 2D50C60020D8AB0400458561 /* animation_demoTests */ = { 197 | isa = PBXGroup; 198 | children = ( 199 | 2D50C60120D8AB0400458561 /* animation_demoTests.m */, 200 | 2D50C60320D8AB0400458561 /* Info.plist */, 201 | ); 202 | path = animation_demoTests; 203 | sourceTree = ""; 204 | }; 205 | 2D50C60B20D8AB0400458561 /* animation_demoUITests */ = { 206 | isa = PBXGroup; 207 | children = ( 208 | 2D50C60C20D8AB0400458561 /* animation_demoUITests.m */, 209 | 2D50C60E20D8AB0400458561 /* Info.plist */, 210 | ); 211 | path = animation_demoUITests; 212 | sourceTree = ""; 213 | }; 214 | 2D50C62820D8D41B00458561 /* BZFireworkAnimation */ = { 215 | isa = PBXGroup; 216 | children = ( 217 | 2D50C62920D8D41B00458561 /* BZFireworkAnimationButton.h */, 218 | 2D50C62A20D8D41B00458561 /* BZFireworkAnimationButton.m */, 219 | 2D50C62B20D8D41B00458561 /* BZFireworkAnimationView.h */, 220 | 2D50C62C20D8D41B00458561 /* BZFireworkAnimationView.m */, 221 | ); 222 | path = BZFireworkAnimation; 223 | sourceTree = ""; 224 | }; 225 | 2D50C64120D8E4B200458561 /* ferriswheel */ = { 226 | isa = PBXGroup; 227 | children = ( 228 | 2D50C64220D8E4B200458561 /* gif_ferriswheel1@2x.png */, 229 | 2D50C64320D8E4B200458561 /* gif_ferriswheel2@2x.png */, 230 | 2D50C64420D8E4B200458561 /* gif_ferriswheel3@2x.png */, 231 | 2D50C64520D8E4B200458561 /* gif_ferriswheel4@2x.png */, 232 | 2D50C64620D8E4B200458561 /* gif_ferriswheel5@2x.png */, 233 | 2D50C64720D8E4B200458561 /* gif_ferriswheel6@2x.png */, 234 | ); 235 | path = ferriswheel; 236 | sourceTree = ""; 237 | }; 238 | 2D50C65120D8E7F700458561 /* walk */ = { 239 | isa = PBXGroup; 240 | children = ( 241 | 2D50C66620D8E7F700458561 /* walk_person6_01@2x.png */, 242 | 2D50C66720D8E7F700458561 /* walk_person6_02@2x.png */, 243 | 2D50C66820D8E7F700458561 /* walk_person6_03@2x.png */, 244 | 2D50C66920D8E7F700458561 /* walk_person6_04@2x.png */, 245 | ); 246 | path = walk; 247 | sourceTree = ""; 248 | }; 249 | /* End PBXGroup section */ 250 | 251 | /* Begin PBXNativeTarget section */ 252 | 2D50C5E420D8AAFF00458561 /* animation_demo */ = { 253 | isa = PBXNativeTarget; 254 | buildConfigurationList = 2D50C61120D8AB0400458561 /* Build configuration list for PBXNativeTarget "animation_demo" */; 255 | buildPhases = ( 256 | 2D50C5E120D8AAFF00458561 /* Sources */, 257 | 2D50C5E220D8AAFF00458561 /* Frameworks */, 258 | 2D50C5E320D8AAFF00458561 /* Resources */, 259 | ); 260 | buildRules = ( 261 | ); 262 | dependencies = ( 263 | ); 264 | name = animation_demo; 265 | productName = animation_demo; 266 | productReference = 2D50C5E520D8AAFF00458561 /* animation_demo.app */; 267 | productType = "com.apple.product-type.application"; 268 | }; 269 | 2D50C5FC20D8AB0400458561 /* animation_demoTests */ = { 270 | isa = PBXNativeTarget; 271 | buildConfigurationList = 2D50C61420D8AB0400458561 /* Build configuration list for PBXNativeTarget "animation_demoTests" */; 272 | buildPhases = ( 273 | 2D50C5F920D8AB0400458561 /* Sources */, 274 | 2D50C5FA20D8AB0400458561 /* Frameworks */, 275 | 2D50C5FB20D8AB0400458561 /* Resources */, 276 | ); 277 | buildRules = ( 278 | ); 279 | dependencies = ( 280 | 2D50C5FF20D8AB0400458561 /* PBXTargetDependency */, 281 | ); 282 | name = animation_demoTests; 283 | productName = animation_demoTests; 284 | productReference = 2D50C5FD20D8AB0400458561 /* animation_demoTests.xctest */; 285 | productType = "com.apple.product-type.bundle.unit-test"; 286 | }; 287 | 2D50C60720D8AB0400458561 /* animation_demoUITests */ = { 288 | isa = PBXNativeTarget; 289 | buildConfigurationList = 2D50C61720D8AB0400458561 /* Build configuration list for PBXNativeTarget "animation_demoUITests" */; 290 | buildPhases = ( 291 | 2D50C60420D8AB0400458561 /* Sources */, 292 | 2D50C60520D8AB0400458561 /* Frameworks */, 293 | 2D50C60620D8AB0400458561 /* Resources */, 294 | ); 295 | buildRules = ( 296 | ); 297 | dependencies = ( 298 | 2D50C60A20D8AB0400458561 /* PBXTargetDependency */, 299 | ); 300 | name = animation_demoUITests; 301 | productName = animation_demoUITests; 302 | productReference = 2D50C60820D8AB0400458561 /* animation_demoUITests.xctest */; 303 | productType = "com.apple.product-type.bundle.ui-testing"; 304 | }; 305 | /* End PBXNativeTarget section */ 306 | 307 | /* Begin PBXProject section */ 308 | 2D50C5DD20D8AAFF00458561 /* Project object */ = { 309 | isa = PBXProject; 310 | attributes = { 311 | LastUpgradeCheck = 0930; 312 | ORGANIZATIONNAME = zhanqin; 313 | TargetAttributes = { 314 | 2D50C5E420D8AAFF00458561 = { 315 | CreatedOnToolsVersion = 9.3.1; 316 | }; 317 | 2D50C5FC20D8AB0400458561 = { 318 | CreatedOnToolsVersion = 9.3.1; 319 | TestTargetID = 2D50C5E420D8AAFF00458561; 320 | }; 321 | 2D50C60720D8AB0400458561 = { 322 | CreatedOnToolsVersion = 9.3.1; 323 | TestTargetID = 2D50C5E420D8AAFF00458561; 324 | }; 325 | }; 326 | }; 327 | buildConfigurationList = 2D50C5E020D8AAFF00458561 /* Build configuration list for PBXProject "animation_demo" */; 328 | compatibilityVersion = "Xcode 9.3"; 329 | developmentRegion = en; 330 | hasScannedForEncodings = 0; 331 | knownRegions = ( 332 | en, 333 | Base, 334 | ); 335 | mainGroup = 2D50C5DC20D8AAFF00458561; 336 | productRefGroup = 2D50C5E620D8AAFF00458561 /* Products */; 337 | projectDirPath = ""; 338 | projectRoot = ""; 339 | targets = ( 340 | 2D50C5E420D8AAFF00458561 /* animation_demo */, 341 | 2D50C5FC20D8AB0400458561 /* animation_demoTests */, 342 | 2D50C60720D8AB0400458561 /* animation_demoUITests */, 343 | ); 344 | }; 345 | /* End PBXProject section */ 346 | 347 | /* Begin PBXResourcesBuildPhase section */ 348 | 2D50C5E320D8AAFF00458561 /* Resources */ = { 349 | isa = PBXResourcesBuildPhase; 350 | buildActionMask = 2147483647; 351 | files = ( 352 | 2D50C63420D8D5E500458561 /* button_bulletin_board_collected@2x.png in Resources */, 353 | 2D50C63D20D8DE1400458561 /* image_city_angel_login_girl@2x.png in Resources */, 354 | 2D50C5F520D8AB0400458561 /* LaunchScreen.storyboard in Resources */, 355 | 2D50C68920D8E7F700458561 /* walk_person6_04@2x.png in Resources */, 356 | 2D50C64920D8E4B200458561 /* gif_ferriswheel2@2x.png in Resources */, 357 | 2D50C64820D8E4B200458561 /* gif_ferriswheel1@2x.png in Resources */, 358 | 2D50C64D20D8E4B200458561 /* gif_ferriswheel6@2x.png in Resources */, 359 | 2D50C68720D8E7F700458561 /* walk_person6_02@2x.png in Resources */, 360 | 2D50C63520D8D5E500458561 /* button_bulletin_board_uncollect@2x.png in Resources */, 361 | 2D50C64A20D8E4B200458561 /* gif_ferriswheel3@2x.png in Resources */, 362 | 2D50C68820D8E7F700458561 /* walk_person6_03@2x.png in Resources */, 363 | 2D50C5F220D8AB0400458561 /* Assets.xcassets in Resources */, 364 | 2D50C68620D8E7F700458561 /* walk_person6_01@2x.png in Resources */, 365 | 2D50C64C20D8E4B200458561 /* gif_ferriswheel5@2x.png in Resources */, 366 | 2D50C62720D8CFEC00458561 /* image_home_yacht@2x.png in Resources */, 367 | 2D50C64B20D8E4B200458561 /* gif_ferriswheel4@2x.png in Resources */, 368 | 2D50C62120D8CE3300458561 /* animation.json in Resources */, 369 | 2D50C5F020D8AAFF00458561 /* Main.storyboard in Resources */, 370 | ); 371 | runOnlyForDeploymentPostprocessing = 0; 372 | }; 373 | 2D50C5FB20D8AB0400458561 /* Resources */ = { 374 | isa = PBXResourcesBuildPhase; 375 | buildActionMask = 2147483647; 376 | files = ( 377 | ); 378 | runOnlyForDeploymentPostprocessing = 0; 379 | }; 380 | 2D50C60620D8AB0400458561 /* Resources */ = { 381 | isa = PBXResourcesBuildPhase; 382 | buildActionMask = 2147483647; 383 | files = ( 384 | ); 385 | runOnlyForDeploymentPostprocessing = 0; 386 | }; 387 | /* End PBXResourcesBuildPhase section */ 388 | 389 | /* Begin PBXSourcesBuildPhase section */ 390 | 2D50C5E120D8AAFF00458561 /* Sources */ = { 391 | isa = PBXSourcesBuildPhase; 392 | buildActionMask = 2147483647; 393 | files = ( 394 | 2D50C5ED20D8AAFF00458561 /* ViewController.m in Sources */, 395 | 2D50C62D20D8D41B00458561 /* BZFireworkAnimationButton.m in Sources */, 396 | 2D50C5F820D8AB0400458561 /* main.m in Sources */, 397 | 2D50C63B20D8DC4900458561 /* FloatViewController.m in Sources */, 398 | 2D50C64020D8E45A00458561 /* GifViewController.m in Sources */, 399 | 2D50C61C20D8B0FF00458561 /* SingleLineViewController.m in Sources */, 400 | 2D50C5EA20D8AAFF00458561 /* AppDelegate.m in Sources */, 401 | 2D50C63120D8D45F00458561 /* FireAnimationViewController.m in Sources */, 402 | 2D50C62E20D8D41B00458561 /* BZFireworkAnimationView.m in Sources */, 403 | 2D50C61F20D8CCCC00458561 /* AnimationModel.m in Sources */, 404 | 2D50C63820D8D77D00458561 /* HeartbeatViewController.m in Sources */, 405 | 2D50C65020D8E7D300458561 /* LineGifViewController.m in Sources */, 406 | ); 407 | runOnlyForDeploymentPostprocessing = 0; 408 | }; 409 | 2D50C5F920D8AB0400458561 /* Sources */ = { 410 | isa = PBXSourcesBuildPhase; 411 | buildActionMask = 2147483647; 412 | files = ( 413 | 2D50C60220D8AB0400458561 /* animation_demoTests.m in Sources */, 414 | ); 415 | runOnlyForDeploymentPostprocessing = 0; 416 | }; 417 | 2D50C60420D8AB0400458561 /* Sources */ = { 418 | isa = PBXSourcesBuildPhase; 419 | buildActionMask = 2147483647; 420 | files = ( 421 | 2D50C60D20D8AB0400458561 /* animation_demoUITests.m in Sources */, 422 | ); 423 | runOnlyForDeploymentPostprocessing = 0; 424 | }; 425 | /* End PBXSourcesBuildPhase section */ 426 | 427 | /* Begin PBXTargetDependency section */ 428 | 2D50C5FF20D8AB0400458561 /* PBXTargetDependency */ = { 429 | isa = PBXTargetDependency; 430 | target = 2D50C5E420D8AAFF00458561 /* animation_demo */; 431 | targetProxy = 2D50C5FE20D8AB0400458561 /* PBXContainerItemProxy */; 432 | }; 433 | 2D50C60A20D8AB0400458561 /* PBXTargetDependency */ = { 434 | isa = PBXTargetDependency; 435 | target = 2D50C5E420D8AAFF00458561 /* animation_demo */; 436 | targetProxy = 2D50C60920D8AB0400458561 /* PBXContainerItemProxy */; 437 | }; 438 | /* End PBXTargetDependency section */ 439 | 440 | /* Begin PBXVariantGroup section */ 441 | 2D50C5EE20D8AAFF00458561 /* Main.storyboard */ = { 442 | isa = PBXVariantGroup; 443 | children = ( 444 | 2D50C5EF20D8AAFF00458561 /* Base */, 445 | ); 446 | name = Main.storyboard; 447 | sourceTree = ""; 448 | }; 449 | 2D50C5F320D8AB0400458561 /* LaunchScreen.storyboard */ = { 450 | isa = PBXVariantGroup; 451 | children = ( 452 | 2D50C5F420D8AB0400458561 /* Base */, 453 | ); 454 | name = LaunchScreen.storyboard; 455 | sourceTree = ""; 456 | }; 457 | /* End PBXVariantGroup section */ 458 | 459 | /* Begin XCBuildConfiguration section */ 460 | 2D50C60F20D8AB0400458561 /* Debug */ = { 461 | isa = XCBuildConfiguration; 462 | buildSettings = { 463 | ALWAYS_SEARCH_USER_PATHS = NO; 464 | CLANG_ANALYZER_NONNULL = YES; 465 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 466 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 467 | CLANG_CXX_LIBRARY = "libc++"; 468 | CLANG_ENABLE_MODULES = YES; 469 | CLANG_ENABLE_OBJC_ARC = YES; 470 | CLANG_ENABLE_OBJC_WEAK = YES; 471 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 472 | CLANG_WARN_BOOL_CONVERSION = YES; 473 | CLANG_WARN_COMMA = YES; 474 | CLANG_WARN_CONSTANT_CONVERSION = YES; 475 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 476 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 477 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 478 | CLANG_WARN_EMPTY_BODY = YES; 479 | CLANG_WARN_ENUM_CONVERSION = YES; 480 | CLANG_WARN_INFINITE_RECURSION = YES; 481 | CLANG_WARN_INT_CONVERSION = YES; 482 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 483 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 484 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 485 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 486 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 487 | CLANG_WARN_STRICT_PROTOTYPES = YES; 488 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 489 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 490 | CLANG_WARN_UNREACHABLE_CODE = YES; 491 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 492 | CODE_SIGN_IDENTITY = "iPhone Developer"; 493 | COPY_PHASE_STRIP = NO; 494 | DEBUG_INFORMATION_FORMAT = dwarf; 495 | ENABLE_STRICT_OBJC_MSGSEND = YES; 496 | ENABLE_TESTABILITY = YES; 497 | GCC_C_LANGUAGE_STANDARD = gnu11; 498 | GCC_DYNAMIC_NO_PIC = NO; 499 | GCC_NO_COMMON_BLOCKS = YES; 500 | GCC_OPTIMIZATION_LEVEL = 0; 501 | GCC_PREPROCESSOR_DEFINITIONS = ( 502 | "DEBUG=1", 503 | "$(inherited)", 504 | ); 505 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 506 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 507 | GCC_WARN_UNDECLARED_SELECTOR = YES; 508 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 509 | GCC_WARN_UNUSED_FUNCTION = YES; 510 | GCC_WARN_UNUSED_VARIABLE = YES; 511 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 512 | MTL_ENABLE_DEBUG_INFO = YES; 513 | ONLY_ACTIVE_ARCH = YES; 514 | SDKROOT = iphoneos; 515 | }; 516 | name = Debug; 517 | }; 518 | 2D50C61020D8AB0400458561 /* Release */ = { 519 | isa = XCBuildConfiguration; 520 | buildSettings = { 521 | ALWAYS_SEARCH_USER_PATHS = NO; 522 | CLANG_ANALYZER_NONNULL = YES; 523 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 524 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 525 | CLANG_CXX_LIBRARY = "libc++"; 526 | CLANG_ENABLE_MODULES = YES; 527 | CLANG_ENABLE_OBJC_ARC = YES; 528 | CLANG_ENABLE_OBJC_WEAK = YES; 529 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 530 | CLANG_WARN_BOOL_CONVERSION = YES; 531 | CLANG_WARN_COMMA = YES; 532 | CLANG_WARN_CONSTANT_CONVERSION = YES; 533 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 534 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 535 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 536 | CLANG_WARN_EMPTY_BODY = YES; 537 | CLANG_WARN_ENUM_CONVERSION = YES; 538 | CLANG_WARN_INFINITE_RECURSION = YES; 539 | CLANG_WARN_INT_CONVERSION = YES; 540 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 541 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 542 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 543 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 544 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 545 | CLANG_WARN_STRICT_PROTOTYPES = YES; 546 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 547 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 548 | CLANG_WARN_UNREACHABLE_CODE = YES; 549 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 550 | CODE_SIGN_IDENTITY = "iPhone Developer"; 551 | COPY_PHASE_STRIP = NO; 552 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 553 | ENABLE_NS_ASSERTIONS = NO; 554 | ENABLE_STRICT_OBJC_MSGSEND = YES; 555 | GCC_C_LANGUAGE_STANDARD = gnu11; 556 | GCC_NO_COMMON_BLOCKS = YES; 557 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 558 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 559 | GCC_WARN_UNDECLARED_SELECTOR = YES; 560 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 561 | GCC_WARN_UNUSED_FUNCTION = YES; 562 | GCC_WARN_UNUSED_VARIABLE = YES; 563 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 564 | MTL_ENABLE_DEBUG_INFO = NO; 565 | SDKROOT = iphoneos; 566 | VALIDATE_PRODUCT = YES; 567 | }; 568 | name = Release; 569 | }; 570 | 2D50C61220D8AB0400458561 /* Debug */ = { 571 | isa = XCBuildConfiguration; 572 | buildSettings = { 573 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 574 | CODE_SIGN_STYLE = Automatic; 575 | DEVELOPMENT_TEAM = TJ894KSTNF; 576 | INFOPLIST_FILE = animation_demo/Info.plist; 577 | LD_RUNPATH_SEARCH_PATHS = ( 578 | "$(inherited)", 579 | "@executable_path/Frameworks", 580 | ); 581 | PRODUCT_BUNDLE_IDENTIFIER = "hzlj.animation-demo"; 582 | PRODUCT_NAME = "$(TARGET_NAME)"; 583 | TARGETED_DEVICE_FAMILY = "1,2"; 584 | }; 585 | name = Debug; 586 | }; 587 | 2D50C61320D8AB0400458561 /* Release */ = { 588 | isa = XCBuildConfiguration; 589 | buildSettings = { 590 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 591 | CODE_SIGN_STYLE = Automatic; 592 | DEVELOPMENT_TEAM = TJ894KSTNF; 593 | INFOPLIST_FILE = animation_demo/Info.plist; 594 | LD_RUNPATH_SEARCH_PATHS = ( 595 | "$(inherited)", 596 | "@executable_path/Frameworks", 597 | ); 598 | PRODUCT_BUNDLE_IDENTIFIER = "hzlj.animation-demo"; 599 | PRODUCT_NAME = "$(TARGET_NAME)"; 600 | TARGETED_DEVICE_FAMILY = "1,2"; 601 | }; 602 | name = Release; 603 | }; 604 | 2D50C61520D8AB0400458561 /* Debug */ = { 605 | isa = XCBuildConfiguration; 606 | buildSettings = { 607 | BUNDLE_LOADER = "$(TEST_HOST)"; 608 | CODE_SIGN_STYLE = Automatic; 609 | DEVELOPMENT_TEAM = TJ894KSTNF; 610 | INFOPLIST_FILE = animation_demoTests/Info.plist; 611 | LD_RUNPATH_SEARCH_PATHS = ( 612 | "$(inherited)", 613 | "@executable_path/Frameworks", 614 | "@loader_path/Frameworks", 615 | ); 616 | PRODUCT_BUNDLE_IDENTIFIER = "hzlj.animation-demoTests"; 617 | PRODUCT_NAME = "$(TARGET_NAME)"; 618 | TARGETED_DEVICE_FAMILY = "1,2"; 619 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/animation_demo.app/animation_demo"; 620 | }; 621 | name = Debug; 622 | }; 623 | 2D50C61620D8AB0400458561 /* Release */ = { 624 | isa = XCBuildConfiguration; 625 | buildSettings = { 626 | BUNDLE_LOADER = "$(TEST_HOST)"; 627 | CODE_SIGN_STYLE = Automatic; 628 | DEVELOPMENT_TEAM = TJ894KSTNF; 629 | INFOPLIST_FILE = animation_demoTests/Info.plist; 630 | LD_RUNPATH_SEARCH_PATHS = ( 631 | "$(inherited)", 632 | "@executable_path/Frameworks", 633 | "@loader_path/Frameworks", 634 | ); 635 | PRODUCT_BUNDLE_IDENTIFIER = "hzlj.animation-demoTests"; 636 | PRODUCT_NAME = "$(TARGET_NAME)"; 637 | TARGETED_DEVICE_FAMILY = "1,2"; 638 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/animation_demo.app/animation_demo"; 639 | }; 640 | name = Release; 641 | }; 642 | 2D50C61820D8AB0400458561 /* Debug */ = { 643 | isa = XCBuildConfiguration; 644 | buildSettings = { 645 | CODE_SIGN_STYLE = Automatic; 646 | DEVELOPMENT_TEAM = TJ894KSTNF; 647 | INFOPLIST_FILE = animation_demoUITests/Info.plist; 648 | LD_RUNPATH_SEARCH_PATHS = ( 649 | "$(inherited)", 650 | "@executable_path/Frameworks", 651 | "@loader_path/Frameworks", 652 | ); 653 | PRODUCT_BUNDLE_IDENTIFIER = "hzlj.animation-demoUITests"; 654 | PRODUCT_NAME = "$(TARGET_NAME)"; 655 | TARGETED_DEVICE_FAMILY = "1,2"; 656 | TEST_TARGET_NAME = animation_demo; 657 | }; 658 | name = Debug; 659 | }; 660 | 2D50C61920D8AB0400458561 /* Release */ = { 661 | isa = XCBuildConfiguration; 662 | buildSettings = { 663 | CODE_SIGN_STYLE = Automatic; 664 | DEVELOPMENT_TEAM = TJ894KSTNF; 665 | INFOPLIST_FILE = animation_demoUITests/Info.plist; 666 | LD_RUNPATH_SEARCH_PATHS = ( 667 | "$(inherited)", 668 | "@executable_path/Frameworks", 669 | "@loader_path/Frameworks", 670 | ); 671 | PRODUCT_BUNDLE_IDENTIFIER = "hzlj.animation-demoUITests"; 672 | PRODUCT_NAME = "$(TARGET_NAME)"; 673 | TARGETED_DEVICE_FAMILY = "1,2"; 674 | TEST_TARGET_NAME = animation_demo; 675 | }; 676 | name = Release; 677 | }; 678 | /* End XCBuildConfiguration section */ 679 | 680 | /* Begin XCConfigurationList section */ 681 | 2D50C5E020D8AAFF00458561 /* Build configuration list for PBXProject "animation_demo" */ = { 682 | isa = XCConfigurationList; 683 | buildConfigurations = ( 684 | 2D50C60F20D8AB0400458561 /* Debug */, 685 | 2D50C61020D8AB0400458561 /* Release */, 686 | ); 687 | defaultConfigurationIsVisible = 0; 688 | defaultConfigurationName = Release; 689 | }; 690 | 2D50C61120D8AB0400458561 /* Build configuration list for PBXNativeTarget "animation_demo" */ = { 691 | isa = XCConfigurationList; 692 | buildConfigurations = ( 693 | 2D50C61220D8AB0400458561 /* Debug */, 694 | 2D50C61320D8AB0400458561 /* Release */, 695 | ); 696 | defaultConfigurationIsVisible = 0; 697 | defaultConfigurationName = Release; 698 | }; 699 | 2D50C61420D8AB0400458561 /* Build configuration list for PBXNativeTarget "animation_demoTests" */ = { 700 | isa = XCConfigurationList; 701 | buildConfigurations = ( 702 | 2D50C61520D8AB0400458561 /* Debug */, 703 | 2D50C61620D8AB0400458561 /* Release */, 704 | ); 705 | defaultConfigurationIsVisible = 0; 706 | defaultConfigurationName = Release; 707 | }; 708 | 2D50C61720D8AB0400458561 /* Build configuration list for PBXNativeTarget "animation_demoUITests" */ = { 709 | isa = XCConfigurationList; 710 | buildConfigurations = ( 711 | 2D50C61820D8AB0400458561 /* Debug */, 712 | 2D50C61920D8AB0400458561 /* Release */, 713 | ); 714 | defaultConfigurationIsVisible = 0; 715 | defaultConfigurationName = Release; 716 | }; 717 | /* End XCConfigurationList section */ 718 | }; 719 | rootObject = 2D50C5DD20D8AAFF00458561 /* Project object */; 720 | } 721 | -------------------------------------------------------------------------------- /animation_demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /animation_demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /animation_demo.xcodeproj/xcuserdata/zhanqin.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /animation_demo.xcodeproj/xcuserdata/zhanqin.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | animation_demo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /animation_demo/AnimationModel.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationModel.h 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AnimationModel : NSObject 12 | 13 | @property(nonatomic,strong) NSArray * images; 14 | @property(nonatomic,assign) float fromX; 15 | @property(nonatomic,assign) float fromY; 16 | @property(nonatomic,assign) float toX; 17 | @property(nonatomic,assign) float toY; 18 | @property(nonatomic,assign) BOOL loop; 19 | @property(nonatomic,assign) float time; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /animation_demo/AnimationModel.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationModel.m 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import "AnimationModel.h" 10 | 11 | @implementation AnimationModel 12 | -(void)setValue:(id)value forUndefinedKey:(NSString *)key{ 13 | 14 | } 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /animation_demo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. 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 | -------------------------------------------------------------------------------- /animation_demo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | // Override point for customization after application launch. 21 | ViewController * vc = [[ViewController alloc] init]; 22 | UINavigationController * nc = [[UINavigationController alloc] initWithRootViewController:vc]; 23 | self.window.rootViewController = nc; 24 | return YES; 25 | } 26 | 27 | 28 | - (void)applicationWillResignActive:(UIApplication *)application { 29 | // 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. 30 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 31 | } 32 | 33 | 34 | - (void)applicationDidEnterBackground:(UIApplication *)application { 35 | // 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. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | 40 | - (void)applicationWillEnterForeground:(UIApplication *)application { 41 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 42 | } 43 | 44 | 45 | - (void)applicationDidBecomeActive:(UIApplication *)application { 46 | // 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. 47 | } 48 | 49 | 50 | - (void)applicationWillTerminate:(UIApplication *)application { 51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 52 | } 53 | 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /animation_demo/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /animation_demo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /animation_demo/BZFireworkAnimation/BZFireworkAnimationButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // BZFireworkAnimationButton.h 3 | // BZSaveMoney 4 | // 5 | // Created by zhanqin on 2018/2/2. 6 | // Copyright © 2018年 QQ. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BZFireworkAnimationButton : UIButton 12 | 13 | @property (nonatomic, strong) UIImage *particleImage; 14 | @property (nonatomic, assign) CGFloat particleScale; 15 | @property (nonatomic, assign) CGFloat particleScaleRange; 16 | 17 | - (void)animate; 18 | - (void)popOutsideWithDuration:(NSTimeInterval)duration; 19 | - (void)popInsideWithDuration:(NSTimeInterval)duration; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /animation_demo/BZFireworkAnimation/BZFireworkAnimationButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // BZFireworkAnimationButton.m 3 | // BZSaveMoney 4 | // 5 | // Created by zhanqin on 2018/2/2. 6 | // Copyright © 2018年 QQ. All rights reserved. 7 | // 8 | 9 | #import "BZFireworkAnimationButton.h" 10 | #import "BZFireworkAnimationView.h" 11 | 12 | @interface BZFireworkAnimationButton () 13 | 14 | @property (nonatomic, strong) BZFireworkAnimationView *fireworksView; 15 | 16 | @end 17 | 18 | @implementation BZFireworkAnimationButton 19 | 20 | - (id)initWithFrame:(CGRect)frame { 21 | self = [super initWithFrame:frame]; 22 | if (self) { 23 | [self setup]; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)setup { 29 | self.clipsToBounds = NO; 30 | _fireworksView = [[BZFireworkAnimationView alloc] init]; 31 | [self insertSubview:_fireworksView atIndex:0]; 32 | } 33 | 34 | - (void)layoutSubviews { 35 | [super layoutSubviews]; 36 | self.fireworksView.frame = self.bounds; 37 | [self insertSubview:self.fireworksView atIndex:0]; 38 | } 39 | 40 | #pragma mark - Methods 41 | - (void)animate { 42 | [self.fireworksView animate]; 43 | } 44 | 45 | //弹出 46 | - (void)popOutsideWithDuration:(NSTimeInterval)duration { 47 | 48 | self.transform = CGAffineTransformIdentity; 49 | [UIView animateKeyframesWithDuration:duration delay:0 options:0 animations: ^{ 50 | [UIView addKeyframeWithRelativeStartTime:0 relativeDuration:1 / 3.0 animations: ^{ 51 | self.transform = CGAffineTransformMakeScale(2.0f, 2.0f); // 放大 52 | }]; 53 | [UIView addKeyframeWithRelativeStartTime:1/3.0 relativeDuration:1/3.0 animations: ^{ 54 | self.transform = CGAffineTransformMakeScale(0.8f, 0.8f); // 放小 55 | }]; 56 | [UIView addKeyframeWithRelativeStartTime:2/3.0 relativeDuration:1/3.0 animations: ^{ 57 | self.transform = CGAffineTransformMakeScale(1.0f, 1.0f); //恢复原样 58 | }]; 59 | } completion:nil]; 60 | } 61 | //弹进 62 | - (void)popInsideWithDuration:(NSTimeInterval)duration { 63 | 64 | self.transform = CGAffineTransformIdentity; 65 | [UIView animateKeyframesWithDuration:duration delay:0 options:0 animations: ^{ 66 | [UIView addKeyframeWithRelativeStartTime:0 relativeDuration:1 / 2.0 animations: ^{ 67 | self.transform = CGAffineTransformMakeScale(0.7f, 0.7f); // 放小 68 | }]; 69 | [UIView addKeyframeWithRelativeStartTime:1/2.0 relativeDuration:1/2.0 animations: ^{ 70 | self.transform = CGAffineTransformMakeScale(1.0f, 1.0f); //恢复原样 71 | }]; 72 | } completion:nil]; 73 | } 74 | 75 | #pragma mark - Properties 76 | //获取粒子图像 77 | - (UIImage *)particleImage { 78 | return self.fireworksView.particleImage; 79 | } 80 | //设置粒子图像 81 | - (void)setParticleImage:(UIImage *)particleImage { 82 | self.fireworksView.particleImage = particleImage; 83 | } 84 | //获取缩放 85 | - (CGFloat)particleScale { 86 | return self.fireworksView.particleScale; 87 | } 88 | //设置缩放 89 | - (void)setParticleScale:(CGFloat)particleScale { 90 | self.fireworksView.particleScale = particleScale; 91 | } 92 | //获取缩放范围 93 | - (CGFloat)particleScaleRange { 94 | return self.fireworksView.particleScaleRange; 95 | } 96 | //设置缩放范围 97 | - (void)setParticleScaleRange:(CGFloat)particleScaleRange { 98 | self.fireworksView.particleScaleRange = particleScaleRange; 99 | } 100 | 101 | /* 102 | // Only override drawRect: if you perform custom drawing. 103 | // An empty implementation adversely affects performance during animation. 104 | - (void)drawRect:(CGRect)rect { 105 | // Drawing code 106 | } 107 | */ 108 | 109 | @end 110 | -------------------------------------------------------------------------------- /animation_demo/BZFireworkAnimation/BZFireworkAnimationView.h: -------------------------------------------------------------------------------- 1 | // 2 | // BZFireworkAnimationView.h 3 | // BZSaveMoney 4 | // 5 | // Created by zhanqin on 2018/2/2. 6 | // Copyright © 2018年 QQ. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BZFireworkAnimationView : UIView 12 | 13 | @property (nonatomic, strong) UIImage *particleImage; 14 | @property (nonatomic, assign) CGFloat particleScale; 15 | @property (nonatomic, assign) CGFloat particleScaleRange; 16 | 17 | - (void)animate; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /animation_demo/BZFireworkAnimation/BZFireworkAnimationView.m: -------------------------------------------------------------------------------- 1 | // 2 | // BZFireworkAnimationView.m 3 | // BZSaveMoney 4 | // 5 | // Created by zhanqin on 2018/2/2. 6 | // Copyright © 2018年 QQ. All rights reserved. 7 | // 8 | 9 | #import "BZFireworkAnimationView.h" 10 | 11 | @interface BZFireworkAnimationView () 12 | 13 | @property (nonatomic, strong) CAEmitterLayer *explosionLayer; 14 | @property (nonatomic, strong) CAEmitterCell *explosionCell; 15 | 16 | @end 17 | 18 | @implementation BZFireworkAnimationView 19 | 20 | - (instancetype)initWithFrame:(CGRect)frame { 21 | self = [super initWithFrame:frame]; 22 | if (self) { 23 | [self setup]; 24 | } 25 | return self; 26 | } 27 | 28 | - (void)setup { 29 | 30 | self.clipsToBounds = NO; 31 | self.userInteractionEnabled = NO; 32 | /** 33 | * 爆炸效果 34 | */ 35 | _explosionCell = [CAEmitterCell emitterCell]; 36 | _explosionCell.name = @"explosion"; 37 | _explosionCell.alphaRange = 0.2f; // 透明度改变的范围 38 | _explosionCell.alphaSpeed = -1.0f; // 透明度改变的速度 39 | _explosionCell.lifetime = 0.7f; 40 | _explosionCell.lifetimeRange = 0.3f; 41 | _explosionCell.birthRate = 0.f; // 粒子产生系数 42 | _explosionCell.velocity = 40.0f; 43 | _explosionCell.velocityRange = 10.0f; 44 | 45 | _explosionLayer = [CAEmitterLayer layer]; 46 | _explosionLayer.name = @"emitterLayer"; 47 | _explosionLayer.emitterShape = kCAEmitterLayerCircle; // 发射形状 48 | _explosionLayer.emitterMode = kCAEmitterLayerOutline; 49 | _explosionLayer.emitterSize = CGSizeMake(25.f, 0.f); 50 | _explosionLayer.emitterCells = @[_explosionCell]; 51 | _explosionLayer.renderMode = kCAEmitterLayerOldestFirst; // 渲染模式 52 | _explosionLayer.masksToBounds = NO; 53 | [self.layer addSublayer:_explosionLayer]; 54 | 55 | } 56 | 57 | //布局 58 | - (void)layoutSubviews { 59 | [super layoutSubviews]; 60 | // 设置位置 61 | CGPoint center = CGPointMake(CGRectGetMidX(self.bounds), CGRectGetMidY(self.bounds)); 62 | self.explosionLayer.emitterPosition = center; 63 | } 64 | 65 | #pragma mark - Animate Methods 66 | - (void)animate { 67 | dispatch_time_t delay = dispatch_time(DISPATCH_TIME_NOW, 0.2 * NSEC_PER_SEC); 68 | dispatch_after(delay, dispatch_get_main_queue(), ^{ 69 | self.explosionLayer.beginTime = CACurrentMediaTime(); 70 | //爆炸效果 71 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath: @"emitterCells.explosion.birthRate"]; 72 | animation.fromValue = @0; 73 | animation.toValue = @500; 74 | [self.explosionLayer addAnimation: animation forKey: nil]; 75 | }); 76 | } 77 | 78 | #pragma mark - Properties Method 79 | - (void)setParticleImage:(UIImage *)particleImage { 80 | _particleImage = particleImage; 81 | self.explosionCell.contents = (id)[particleImage CGImage]; 82 | } 83 | 84 | - (void)setParticleScale:(CGFloat)particleScale { 85 | _particleScale = particleScale; 86 | self.explosionCell.scale = particleScale; 87 | } 88 | 89 | - (void)setParticleScaleRange:(CGFloat)particleScaleRange { 90 | _particleScaleRange = particleScaleRange; 91 | self.explosionCell.scaleRange = particleScaleRange; 92 | 93 | } 94 | 95 | /* 96 | // Only override drawRect: if you perform custom drawing. 97 | // An empty implementation adversely affects performance during animation. 98 | - (void)drawRect:(CGRect)rect { 99 | // Drawing code 100 | } 101 | */ 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /animation_demo/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /animation_demo/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /animation_demo/FireAnimationViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FireAnimationViewController.h 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FireAnimationViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /animation_demo/FireAnimationViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // FireAnimationViewController.m 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import "FireAnimationViewController.h" 10 | #import "BZFireworkAnimationButton.h" 11 | 12 | @interface FireAnimationViewController () 13 | 14 | @property(nonatomic,strong) BZFireworkAnimationButton * praiseButton; 15 | 16 | @end 17 | 18 | @implementation FireAnimationViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view. 23 | self.view.backgroundColor = [UIColor whiteColor]; 24 | [self.view addSubview:self.praiseButton]; 25 | } 26 | 27 | -(void)dealloc{ 28 | NSLog(@"FireAnimationViewController dealloc"); 29 | } 30 | 31 | -(void)praiseAction:(BZFireworkAnimationButton *)button{ 32 | if (button.selected) { 33 | [button popInsideWithDuration:0.4f]; 34 | }else{ 35 | [button popOutsideWithDuration:0.4]; 36 | [button animate]; 37 | } 38 | button.selected = !button.selected; 39 | } 40 | 41 | -(BZFireworkAnimationButton *)praiseButton{ 42 | if (!_praiseButton) { 43 | _praiseButton = [[BZFireworkAnimationButton alloc] initWithFrame:CGRectMake(150, 200, 50, 50)]; 44 | _praiseButton.particleImage = [UIImage imageNamed:@"button_bulletin_board_collected"]; 45 | _praiseButton.particleScale = 0.05f; 46 | _praiseButton.particleScaleRange = 0.02f; 47 | [_praiseButton addTarget:self action:@selector(praiseAction:) forControlEvents:UIControlEventTouchUpInside]; 48 | [_praiseButton setImage:[UIImage imageNamed:@"button_bulletin_board_uncollect"] forState:UIControlStateNormal]; 49 | [_praiseButton setImage:[UIImage imageNamed:@"button_bulletin_board_collected"] forState:UIControlStateSelected]; 50 | } 51 | return _praiseButton; 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 | -------------------------------------------------------------------------------- /animation_demo/FloatViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // FloatViewController.h 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FloatViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /animation_demo/FloatViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // FloatViewController.m 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import "FloatViewController.h" 10 | 11 | @interface FloatViewController () 12 | 13 | //判断是否是当前ViewController,如果不是,则停止动画,否则动画一直在,且dealloc方法不会被调用 14 | @property(nonatomic,assign) BOOL isCurrentVC; 15 | @end 16 | 17 | @implementation FloatViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | // Do any additional setup after loading the view. 22 | self.view.backgroundColor = [UIColor orangeColor]; 23 | 24 | UIImageView * animationImageView = [[UIImageView alloc] initWithFrame:CGRectMake(30, 105, 144, 350)]; 25 | animationImageView.image = [UIImage imageNamed:@"image_city_angel_login_girl"]; 26 | [self setAnimationImageViewAnimation:animationImageView]; 27 | [self.view addSubview:animationImageView]; 28 | } 29 | 30 | -(void)dealloc{ 31 | NSLog(@"FloatViewController dealloc"); 32 | } 33 | 34 | -(void)viewWillAppear:(BOOL)animated{ 35 | [super viewWillAppear:animated]; 36 | self.isCurrentVC = YES; 37 | } 38 | 39 | -(void)viewWillDisappear:(BOOL)animated{ 40 | [super viewWillDisappear:animated]; 41 | self.isCurrentVC = NO; 42 | } 43 | 44 | -(void)setAnimationImageViewAnimation:(UIImageView *)animationImageView{ 45 | [UIView animateWithDuration:1 animations:^{ 46 | animationImageView.frame = CGRectMake(30, 90, 144, 350); 47 | }]; 48 | [UIView animateWithDuration:1 delay:1 options:UIViewAnimationOptionCurveEaseInOut animations:^{ 49 | animationImageView.frame = CGRectMake(30, 105, 144,350); 50 | 51 | } completion:^(BOOL finished) { 52 | if (self.isCurrentVC) { 53 | [self setAnimationImageViewAnimation:animationImageView]; 54 | } 55 | }]; 56 | 57 | } 58 | 59 | - (void)didReceiveMemoryWarning { 60 | [super didReceiveMemoryWarning]; 61 | // Dispose of any resources that can be recreated. 62 | } 63 | 64 | /* 65 | #pragma mark - Navigation 66 | 67 | // In a storyboard-based application, you will often want to do a little preparation before navigation 68 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 69 | // Get the new view controller using [segue destinationViewController]. 70 | // Pass the selected object to the new view controller. 71 | } 72 | */ 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /animation_demo/GifViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // GifViewController.h 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface GifViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /animation_demo/GifViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // GifViewController.m 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import "GifViewController.h" 10 | 11 | @interface GifViewController () 12 | 13 | @end 14 | 15 | @implementation GifViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | self.view.backgroundColor = [UIColor whiteColor]; 21 | 22 | NSArray * images = @[@"gif_ferriswheel1",@"gif_ferriswheel2",@"gif_ferriswheel3",@"gif_ferriswheel4",@"gif_ferriswheel5",@"gif_ferriswheel6"]; 23 | UIImageView * imageViews = [[UIImageView alloc] init]; 24 | UIImage * image = [UIImage imageNamed:images[0]]; 25 | imageViews.frame = CGRectMake(120, 200, image.size.width, image.size.height); 26 | NSMutableArray * imagesArray = [NSMutableArray array]; 27 | for (NSString * imagesName in images) { 28 | UIImage * tempImage = [UIImage imageNamed:imagesName]; 29 | [imagesArray addObject:tempImage]; 30 | } 31 | imageViews.animationImages = [imagesArray copy]; 32 | imageViews.animationDuration = 0.9; 33 | imageViews.animationRepeatCount = 1000000000; 34 | [imageViews startAnimating]; 35 | [self.view addSubview:imageViews]; 36 | } 37 | 38 | -(void)dealloc{ 39 | NSLog(@"GifViewController dealloc"); 40 | } 41 | 42 | - (void)didReceiveMemoryWarning { 43 | [super didReceiveMemoryWarning]; 44 | // Dispose of any resources that can be recreated. 45 | } 46 | 47 | /* 48 | #pragma mark - Navigation 49 | 50 | // In a storyboard-based application, you will often want to do a little preparation before navigation 51 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 52 | // Get the new view controller using [segue destinationViewController]. 53 | // Pass the selected object to the new view controller. 54 | } 55 | */ 56 | 57 | @end 58 | -------------------------------------------------------------------------------- /animation_demo/HeartbeatViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HeartbeatViewController.h 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HeartbeatViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /animation_demo/HeartbeatViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HeartbeatViewController.m 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import "HeartbeatViewController.h" 10 | 11 | @interface HeartbeatViewController () 12 | 13 | @end 14 | 15 | @implementation HeartbeatViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | // Do any additional setup after loading the view. 20 | self.view.backgroundColor = [UIColor whiteColor]; 21 | 22 | UIImageView * imageView = [[UIImageView alloc] initWithFrame:CGRectMake(150, 200, 50, 50)]; 23 | imageView.image = [UIImage imageNamed:@"button_bulletin_board_collected"]; 24 | [self.view addSubview:imageView]; 25 | [self setupHeartbeatAnimationInView:imageView]; 26 | } 27 | 28 | -(void)dealloc{ 29 | NSLog(@"HeartbeatViewController dealloc"); 30 | } 31 | 32 | -(void)setupHeartbeatAnimationInView:(UIView *)view{ 33 | // 设定为缩放 34 | CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.scale"]; 35 | // 动画选项设定 36 | animation.duration = 1.2; // 动画持续时间 37 | animation.repeatCount = 10000000000; // 重复次数 38 | animation.autoreverses = YES; // 动画结束时执行逆动画 39 | // 缩放倍数 40 | animation.fromValue = [NSNumber numberWithFloat:1.0]; // 开始时的倍率 41 | animation.toValue = [NSNumber numberWithFloat:1.4]; // 结束时的倍率 42 | animation.removedOnCompletion = NO; 43 | // 添加动画 44 | [view .layer addAnimation:animation forKey:@"scale-layer"]; 45 | } 46 | 47 | - (void)didReceiveMemoryWarning { 48 | [super didReceiveMemoryWarning]; 49 | // Dispose of any resources that can be recreated. 50 | } 51 | 52 | /* 53 | #pragma mark - Navigation 54 | 55 | // In a storyboard-based application, you will often want to do a little preparation before navigation 56 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 57 | // Get the new view controller using [segue destinationViewController]. 58 | // Pass the selected object to the new view controller. 59 | } 60 | */ 61 | 62 | @end 63 | -------------------------------------------------------------------------------- /animation_demo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /animation_demo/LineGifViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // LineGifViewController.h 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface LineGifViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /animation_demo/LineGifViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // LineGifViewController.m 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import "LineGifViewController.h" 10 | #import "AnimationModel.h" 11 | 12 | @interface LineGifViewController () 13 | 14 | @property(nonatomic,strong) NSMutableArray * lineGifArray; 15 | 16 | @end 17 | 18 | @implementation LineGifViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view. 23 | self.view.backgroundColor = [UIColor whiteColor]; 24 | [self initData]; 25 | [self setupLineGifAnimation]; 26 | } 27 | 28 | -(void)dealloc{ 29 | NSLog(@"LineGifViewController dealloc"); 30 | } 31 | 32 | -(void)initData{ 33 | NSString * jsonPath = [[NSBundle mainBundle] pathForResource:@"animation" ofType:@"json"]; 34 | NSData * data = [NSData dataWithContentsOfFile:jsonPath]; 35 | NSDictionary * dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil]; 36 | NSArray * lineGifArray = dic[@"walk_animation"]; 37 | self.lineGifArray = [NSMutableArray array]; 38 | for (NSDictionary * item in lineGifArray) { 39 | AnimationModel * model = [[AnimationModel alloc] init]; 40 | [model setValuesForKeysWithDictionary:item]; 41 | [self.lineGifArray addObject:model]; 42 | } 43 | } 44 | 45 | -(void)setupLineGifAnimation{ 46 | for (AnimationModel * model in self.lineGifArray) { 47 | UIImageView * animationImageView = [[UIImageView alloc] init]; 48 | animationImageView.image = [UIImage imageNamed:model.images[0]]; 49 | animationImageView.frame = CGRectMake(model.toX, model.toY, animationImageView.image.size.width, animationImageView.image.size.height); 50 | NSMutableArray * imagesArray = [NSMutableArray array]; 51 | for (NSString * imagesName in model.images) { 52 | UIImage * tempImage = [UIImage imageNamed:imagesName]; 53 | [imagesArray addObject:tempImage]; 54 | } 55 | animationImageView.animationImages = [imagesArray copy]; 56 | animationImageView.animationDuration = 1.2; 57 | animationImageView.animationRepeatCount = 1000000000; 58 | [animationImageView startAnimating]; 59 | [self.view addSubview:animationImageView]; 60 | [self addSingleLineAnimationToView:animationImageView animationModel:model]; 61 | } 62 | } 63 | 64 | -(void)addSingleLineAnimationToView:(UIView *)view animationModel:(AnimationModel *)model{ 65 | CABasicAnimation* moveAnimation = [CABasicAnimation animationWithKeyPath:@"position"]; 66 | moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(model.fromX,model.fromY)]; 67 | moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(model.toX,model.toY)]; 68 | moveAnimation.duration = model.time; 69 | moveAnimation.removedOnCompletion = NO; 70 | moveAnimation.repeatCount = MAXFLOAT; 71 | if (model.loop == 0) { 72 | moveAnimation.repeatCount = 1; 73 | } 74 | [view.layer addAnimation:moveAnimation forKey:@"lineGifAnimation"]; 75 | } 76 | 77 | - (void)didReceiveMemoryWarning { 78 | [super didReceiveMemoryWarning]; 79 | // Dispose of any resources that can be recreated. 80 | } 81 | 82 | /* 83 | #pragma mark - Navigation 84 | 85 | // In a storyboard-based application, you will often want to do a little preparation before navigation 86 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 87 | // Get the new view controller using [segue destinationViewController]. 88 | // Pass the selected object to the new view controller. 89 | } 90 | */ 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /animation_demo/SingleLineViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SingleLineViewController.h 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SingleLineViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /animation_demo/SingleLineViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // SingleLineViewController.m 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import "SingleLineViewController.h" 10 | #import "AnimationModel.h" 11 | 12 | @interface SingleLineViewController () 13 | 14 | @property(nonatomic,strong) NSMutableArray * lineArray; 15 | 16 | @end 17 | 18 | @implementation SingleLineViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | // Do any additional setup after loading the view. 23 | self.view.backgroundColor = [UIColor whiteColor]; 24 | [self initData]; 25 | [self setupLineAnimation]; 26 | } 27 | 28 | -(void)dealloc{ 29 | NSLog(@"SingleLineViewController dealloc"); 30 | } 31 | 32 | -(void)initData{ 33 | NSString * jsonPath = [[NSBundle mainBundle] pathForResource:@"animation" ofType:@"json"]; 34 | NSData * data = [NSData dataWithContentsOfFile:jsonPath]; 35 | NSDictionary * dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil]; 36 | NSArray * animationArray = dic[@"single_line_animations"]; 37 | self.lineArray = [NSMutableArray array]; 38 | for (NSDictionary * item in animationArray) { 39 | AnimationModel * model = [[AnimationModel alloc] init]; 40 | [model setValuesForKeysWithDictionary:item]; 41 | [self.lineArray addObject:model]; 42 | } 43 | } 44 | 45 | -(void)setupLineAnimation{ 46 | for (AnimationModel * model in self.lineArray) { 47 | UIImageView * animationImageView = [[UIImageView alloc] init]; 48 | animationImageView.image = [UIImage imageNamed:model.images[0]]; 49 | animationImageView.frame = CGRectMake(model.toX, model.toY, animationImageView.image.size.width, animationImageView.image.size.height); 50 | [self.view addSubview:animationImageView]; 51 | [self addSingleLineAnimationToView:animationImageView animationModel:model]; 52 | } 53 | } 54 | 55 | -(void)addSingleLineAnimationToView:(UIView *)view animationModel:(AnimationModel *)model{ 56 | CABasicAnimation* moveAnimation = [CABasicAnimation animationWithKeyPath:@"position"]; 57 | moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(model.fromX,model.fromY)]; 58 | moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(model.toX,model.toY)]; 59 | moveAnimation.duration = model.time; 60 | moveAnimation.removedOnCompletion = NO; 61 | moveAnimation.repeatCount = MAXFLOAT; 62 | if (model.loop == 0) { 63 | moveAnimation.repeatCount = 1; 64 | } 65 | [view.layer addAnimation:moveAnimation forKey:@"singleLineAnimation"]; 66 | } 67 | 68 | - (void)didReceiveMemoryWarning { 69 | [super didReceiveMemoryWarning]; 70 | // Dispose of any resources that can be recreated. 71 | } 72 | 73 | /* 74 | #pragma mark - Navigation 75 | 76 | // In a storyboard-based application, you will often want to do a little preparation before navigation 77 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 78 | // Get the new view controller using [segue destinationViewController]. 79 | // Pass the selected object to the new view controller. 80 | } 81 | */ 82 | 83 | @end 84 | -------------------------------------------------------------------------------- /animation_demo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /animation_demo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "SingleLineViewController.h" 11 | #import "FireAnimationViewController.h" 12 | #import "HeartbeatViewController.h" 13 | #import "FloatViewController.h" 14 | #import "GifViewController.h" 15 | #import "LineGifViewController.h" 16 | 17 | @interface ViewController () 18 | 19 | @property(nonatomic,strong) UITableView * tableView; 20 | @property(nonatomic,strong) NSArray * dataArray; 21 | 22 | @end 23 | 24 | @implementation ViewController 25 | 26 | - (void)viewDidLoad { 27 | [super viewDidLoad]; 28 | // Do any additional setup after loading the view, typically from a nib. 29 | self.title = @"动画"; 30 | self.dataArray = @[@"直线动画",@"点赞爆炸动画",@"心跳动画",@"上下浮动",@"图片轮播gif效果",@"直线+Gif效果"]; 31 | [self.view addSubview:self.tableView]; 32 | } 33 | 34 | -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 35 | return self.dataArray.count; 36 | } 37 | 38 | -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 39 | return 40; 40 | } 41 | 42 | -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 43 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"ID"]; 44 | if (!cell) { 45 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ID"]; 46 | cell.selectionStyle = UITableViewCellSelectionStyleNone; 47 | } 48 | cell.textLabel.text = self.dataArray[indexPath.row]; 49 | return cell; 50 | } 51 | 52 | -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 53 | if (indexPath.row == 0) { 54 | SingleLineViewController * vc = [[SingleLineViewController alloc] init]; 55 | [self.navigationController pushViewController:vc animated:YES]; 56 | }else if (indexPath.row == 1){ 57 | FireAnimationViewController * vc = [[FireAnimationViewController alloc] init]; 58 | [self.navigationController pushViewController:vc animated:YES]; 59 | }else if (indexPath.row == 2){ 60 | HeartbeatViewController * vc = [[HeartbeatViewController alloc] init]; 61 | [self.navigationController pushViewController:vc animated:YES]; 62 | }else if (indexPath.row == 3){ 63 | FloatViewController * vc = [[FloatViewController alloc] init]; 64 | [self.navigationController pushViewController:vc animated:YES]; 65 | }else if (indexPath.row == 4){ 66 | GifViewController * vc = [[GifViewController alloc] init]; 67 | [self.navigationController pushViewController:vc animated:YES]; 68 | }else if (indexPath.row == 5){ 69 | LineGifViewController * vc = [[LineGifViewController alloc] init]; 70 | [self.navigationController pushViewController:vc animated:YES]; 71 | } 72 | } 73 | 74 | -(UITableView *)tableView{ 75 | if (!_tableView) { 76 | _tableView = [[UITableView alloc] initWithFrame:self.view.frame style:UITableViewStylePlain]; 77 | _tableView.delegate = self; 78 | _tableView.dataSource = self; 79 | _tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine; 80 | } 81 | return _tableView; 82 | } 83 | 84 | - (void)didReceiveMemoryWarning { 85 | [super didReceiveMemoryWarning]; 86 | // Dispose of any resources that can be recreated. 87 | } 88 | 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /animation_demo/animation.json: -------------------------------------------------------------------------------- 1 | { 2 | "single_line_animations":[ 3 | {"images":["image_home_yacht"],"fromX":300, "fromY":150, "toX":30, "toY":150, "time":3,"loop":1} 4 | ], 5 | "walk_animation":[ 6 | {"images":["walk_person6_01","walk_person6_02","walk_person6_03","walk_person6_04"],"fromX":10, "fromY":250, "toX":300, "toY":250, "time":30,"loop":1} 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /animation_demo/button_bulletin_board_collected@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/button_bulletin_board_collected@2x.png -------------------------------------------------------------------------------- /animation_demo/button_bulletin_board_uncollect@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/button_bulletin_board_uncollect@2x.png -------------------------------------------------------------------------------- /animation_demo/ferriswheel/gif_ferriswheel1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/ferriswheel/gif_ferriswheel1@2x.png -------------------------------------------------------------------------------- /animation_demo/ferriswheel/gif_ferriswheel2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/ferriswheel/gif_ferriswheel2@2x.png -------------------------------------------------------------------------------- /animation_demo/ferriswheel/gif_ferriswheel3@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/ferriswheel/gif_ferriswheel3@2x.png -------------------------------------------------------------------------------- /animation_demo/ferriswheel/gif_ferriswheel4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/ferriswheel/gif_ferriswheel4@2x.png -------------------------------------------------------------------------------- /animation_demo/ferriswheel/gif_ferriswheel5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/ferriswheel/gif_ferriswheel5@2x.png -------------------------------------------------------------------------------- /animation_demo/ferriswheel/gif_ferriswheel6@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/ferriswheel/gif_ferriswheel6@2x.png -------------------------------------------------------------------------------- /animation_demo/image_city_angel_login_girl@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/image_city_angel_login_girl@2x.png -------------------------------------------------------------------------------- /animation_demo/image_home_yacht@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/image_home_yacht@2x.png -------------------------------------------------------------------------------- /animation_demo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // animation_demo 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. 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 | -------------------------------------------------------------------------------- /animation_demo/walk/walk_person6_01@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/walk/walk_person6_01@2x.png -------------------------------------------------------------------------------- /animation_demo/walk/walk_person6_02@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/walk/walk_person6_02@2x.png -------------------------------------------------------------------------------- /animation_demo/walk/walk_person6_03@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/walk/walk_person6_03@2x.png -------------------------------------------------------------------------------- /animation_demo/walk/walk_person6_04@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zhanqin/animation/356b6fcb81b632122167c162b51ddc8c83351729/animation_demo/walk/walk_person6_04@2x.png -------------------------------------------------------------------------------- /animation_demoTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /animation_demoTests/animation_demoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // animation_demoTests.m 3 | // animation_demoTests 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface animation_demoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation animation_demoTests 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 | -------------------------------------------------------------------------------- /animation_demoUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /animation_demoUITests/animation_demoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // animation_demoUITests.m 3 | // animation_demoUITests 4 | // 5 | // Created by zhanqin on 2018/6/19. 6 | // Copyright © 2018年 zhanqin. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface animation_demoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation animation_demoUITests 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 | --------------------------------------------------------------------------------