├── .DS_Store ├── AnimationTransitionDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── songpeng.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── songpeng.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── AnimationTransitionDemo.xcscheme │ └── xcschememanagement.plist ├── AnimationTransitionDemo ├── .DS_Store ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── 1-1.imageset │ │ ├── Contents.json │ │ └── haha bg.jpeg │ ├── 10-1.imageset │ │ ├── Contents.json │ │ └── xdBqvbba_400x400.jpg │ ├── 11-1.imageset │ │ ├── Contents.json │ │ └── MiDNqbJa_400x400.jpeg │ ├── 2-1.imageset │ │ ├── Contents.json │ │ └── LIVE FREE.png │ ├── 3-1.imageset │ │ ├── Contents.json │ │ └── lonely_traveler.jpg │ ├── 4-1.imageset │ │ ├── Contents.json │ │ └── wallpaper.jpg │ ├── 5-1.imageset │ │ ├── Contents.json │ │ └── photo-1449182325215-d517de72c42d.jpeg │ ├── 6-1.imageset │ │ ├── Contents.json │ │ └── weibo square.png │ ├── 7-1.imageset │ │ ├── Contents.json │ │ └── catch.jpg │ ├── 8-1.imageset │ │ ├── Contents.json │ │ └── IcesZKi5_400x400.jpeg │ ├── 9-1.imageset │ │ ├── Contents.json │ │ └── LlCpvQc2_400x400.jpg │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── icon_community_release.imageset │ │ ├── Contents.json │ │ └── icon_community_release@3x.png │ └── twitter.imageset │ │ ├── Contents.json │ │ └── twitter logo mask.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── CommonTransitionAnimation │ ├── MagicMove │ │ ├── CommonMagicMoveAnimationViewController.h │ │ ├── CommonMagicMoveAnimationViewController.m │ │ ├── CommonMagicMoveAnimationViewController.xib │ │ ├── CommonMagicMoveCollectionViewCell.h │ │ ├── CommonMagicMoveCollectionViewCell.m │ │ ├── CommonMagicMoveCollectionViewCell.xib │ │ ├── CommonMagicMoveDetailViewController.h │ │ ├── CommonMagicMoveDetailViewController.m │ │ └── CommonMagicMoveDetailViewController.xib │ ├── MaskAnimation │ │ ├── CommonMaskDetailViewController.h │ │ ├── CommonMaskDetailViewController.m │ │ ├── CommonMaskDetailViewController.xib │ │ ├── CommonMaskViewController.h │ │ ├── CommonMaskViewController.m │ │ └── CommonMaskViewController.xib │ ├── Smooth │ │ ├── CommonSmoothViewController.h │ │ ├── CommonSmoothViewController.m │ │ └── CommonSmoothViewController.xib │ └── TikTokComment │ │ ├── CommonTikTokCommentViewController.h │ │ ├── CommonTikTokCommentViewController.m │ │ ├── CommonTikTokCommentViewController.xib │ │ ├── CommonTikTokDetailCollectionViewCell.h │ │ ├── CommonTikTokDetailCollectionViewCell.m │ │ ├── CommonTikTokDetailCollectionViewCell.xib │ │ ├── CommonTikTokDetailViewController.h │ │ └── CommonTikTokDetailViewController.m ├── Info.plist ├── SS_AnimationTransition │ ├── SS_AnimationEffects │ │ ├── SS_AnimationEffects.h │ │ ├── SS_AnimationEffects.m │ │ ├── SS_AnimationMagicMoveEffect.h │ │ ├── SS_AnimationMagicMoveEffect.m │ │ ├── SS_AnimationMaskEffect.h │ │ ├── SS_AnimationMaskEffect.m │ │ ├── SS_AnimationSmoothEffect.h │ │ ├── SS_AnimationSmoothEffect.m │ │ ├── SS_AnimationTikTokEffect.h │ │ └── SS_AnimationTikTokEffect.m │ ├── SS_AnimationInteractiveTransition.h │ ├── SS_AnimationInteractiveTransition.m │ ├── SS_AnimationTransition.h │ ├── SS_AnimationTransitionConfig.h │ ├── UINavigationController+SS_AnimationTransition.h │ ├── UINavigationController+SS_AnimationTransition.m │ ├── UIViewController+SS_AnimationTransition.h │ └── UIViewController+SS_AnimationTransition.m ├── ViewController.h ├── ViewController.m └── main.m ├── AnimationTransitionDemoTests ├── AnimationTransitionDemoTests.m └── Info.plist ├── AnimationTransitionDemoUITests ├── AnimationTransitionDemoUITests.m └── Info.plist ├── Gif ├── 1.gif ├── 2.gif ├── 3.gif └── 4.gif └── README.md /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/.DS_Store -------------------------------------------------------------------------------- /AnimationTransitionDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 6F4A44612100930E00074E76 /* CommonMaskViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F4A445F2100930E00074E76 /* CommonMaskViewController.m */; }; 11 | 6F4A44622100930E00074E76 /* CommonMaskViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6F4A44602100930E00074E76 /* CommonMaskViewController.xib */; }; 12 | 6F4A44662100931C00074E76 /* CommonMaskDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F4A44642100931C00074E76 /* CommonMaskDetailViewController.m */; }; 13 | 6F4A44672100931C00074E76 /* CommonMaskDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6F4A44652100931C00074E76 /* CommonMaskDetailViewController.xib */; }; 14 | 6F52EC8420F844A6001E8D18 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F52EC8320F844A6001E8D18 /* AppDelegate.m */; }; 15 | 6F52EC8720F844A6001E8D18 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F52EC8620F844A6001E8D18 /* ViewController.m */; }; 16 | 6F52EC8A20F844A6001E8D18 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6F52EC8820F844A6001E8D18 /* Main.storyboard */; }; 17 | 6F52EC8C20F844A7001E8D18 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6F52EC8B20F844A7001E8D18 /* Assets.xcassets */; }; 18 | 6F52EC8F20F844A7001E8D18 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6F52EC8D20F844A7001E8D18 /* LaunchScreen.storyboard */; }; 19 | 6F52EC9220F844A7001E8D18 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F52EC9120F844A7001E8D18 /* main.m */; }; 20 | 6F52EC9C20F844A7001E8D18 /* AnimationTransitionDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F52EC9B20F844A7001E8D18 /* AnimationTransitionDemoTests.m */; }; 21 | 6F52ECA720F844A7001E8D18 /* AnimationTransitionDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F52ECA620F844A7001E8D18 /* AnimationTransitionDemoUITests.m */; }; 22 | 6F52ECC820F88089001E8D18 /* CommonMagicMoveAnimationViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F52ECC620F88089001E8D18 /* CommonMagicMoveAnimationViewController.m */; }; 23 | 6F52ECC920F88089001E8D18 /* CommonMagicMoveAnimationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6F52ECC720F88089001E8D18 /* CommonMagicMoveAnimationViewController.xib */; }; 24 | 6F52ECCE20F888E7001E8D18 /* CommonMagicMoveDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F52ECCC20F888E7001E8D18 /* CommonMagicMoveDetailViewController.m */; }; 25 | 6F52ECCF20F888E7001E8D18 /* CommonMagicMoveDetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6F52ECCD20F888E7001E8D18 /* CommonMagicMoveDetailViewController.xib */; }; 26 | 6F52ECD320F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F52ECD120F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.m */; }; 27 | 6F52ECD420F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6F52ECD220F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.xib */; }; 28 | 6F5EBC1020FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F5EBC0E20FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.m */; }; 29 | 6F5EBC1120FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6F5EBC0F20FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.xib */; }; 30 | 6F71D83020FC7C1D00C5789F /* CommonSmoothViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F71D82E20FC7C1D00C5789F /* CommonSmoothViewController.m */; }; 31 | 6F71D83120FC7C1D00C5789F /* CommonSmoothViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6F71D82F20FC7C1D00C5789F /* CommonSmoothViewController.xib */; }; 32 | 6F71D83620FC9E3800C5789F /* CommonTikTokCommentViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F71D83420FC9E3800C5789F /* CommonTikTokCommentViewController.m */; }; 33 | 6F71D83720FC9E3800C5789F /* CommonTikTokCommentViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6F71D83520FC9E3800C5789F /* CommonTikTokCommentViewController.xib */; }; 34 | 6F71D83A20FC9F2000C5789F /* CommonTikTokDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F71D83920FC9F2000C5789F /* CommonTikTokDetailViewController.m */; }; 35 | 6F7EA09921144F1C0090C500 /* UINavigationController+SS_AnimationTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7EA08721144F1B0090C500 /* UINavigationController+SS_AnimationTransition.m */; }; 36 | 6F7EA09A21144F1C0090C500 /* SS_AnimationEffects.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7EA08B21144F1B0090C500 /* SS_AnimationEffects.m */; }; 37 | 6F7EA09B21144F1C0090C500 /* SS_AnimationSmoothEffect.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7EA08C21144F1B0090C500 /* SS_AnimationSmoothEffect.m */; }; 38 | 6F7EA09C21144F1C0090C500 /* SS_AnimationMagicMoveEffect.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7EA08E21144F1B0090C500 /* SS_AnimationMagicMoveEffect.m */; }; 39 | 6F7EA09D21144F1C0090C500 /* SS_AnimationTikTokEffect.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7EA08F21144F1B0090C500 /* SS_AnimationTikTokEffect.m */; }; 40 | 6F7EA09E21144F1C0090C500 /* SS_AnimationMaskEffect.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7EA09221144F1B0090C500 /* SS_AnimationMaskEffect.m */; }; 41 | 6F7EA09F21144F1C0090C500 /* SS_AnimationInteractiveTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7EA09521144F1B0090C500 /* SS_AnimationInteractiveTransition.m */; }; 42 | 6F7EA0A021144F1C0090C500 /* UIViewController+SS_AnimationTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 6F7EA09621144F1B0090C500 /* UIViewController+SS_AnimationTransition.m */; }; 43 | /* End PBXBuildFile section */ 44 | 45 | /* Begin PBXContainerItemProxy section */ 46 | 6F52EC9820F844A7001E8D18 /* PBXContainerItemProxy */ = { 47 | isa = PBXContainerItemProxy; 48 | containerPortal = 6F52EC7720F844A6001E8D18 /* Project object */; 49 | proxyType = 1; 50 | remoteGlobalIDString = 6F52EC7E20F844A6001E8D18; 51 | remoteInfo = AnimationTransitionDemo; 52 | }; 53 | 6F52ECA320F844A7001E8D18 /* PBXContainerItemProxy */ = { 54 | isa = PBXContainerItemProxy; 55 | containerPortal = 6F52EC7720F844A6001E8D18 /* Project object */; 56 | proxyType = 1; 57 | remoteGlobalIDString = 6F52EC7E20F844A6001E8D18; 58 | remoteInfo = AnimationTransitionDemo; 59 | }; 60 | /* End PBXContainerItemProxy section */ 61 | 62 | /* Begin PBXFileReference section */ 63 | 6F4A445E2100930E00074E76 /* CommonMaskViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonMaskViewController.h; sourceTree = ""; }; 64 | 6F4A445F2100930E00074E76 /* CommonMaskViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommonMaskViewController.m; sourceTree = ""; }; 65 | 6F4A44602100930E00074E76 /* CommonMaskViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CommonMaskViewController.xib; sourceTree = ""; }; 66 | 6F4A44632100931C00074E76 /* CommonMaskDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonMaskDetailViewController.h; sourceTree = ""; }; 67 | 6F4A44642100931C00074E76 /* CommonMaskDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommonMaskDetailViewController.m; sourceTree = ""; }; 68 | 6F4A44652100931C00074E76 /* CommonMaskDetailViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CommonMaskDetailViewController.xib; sourceTree = ""; }; 69 | 6F52EC7F20F844A6001E8D18 /* AnimationTransitionDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AnimationTransitionDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 6F52EC8220F844A6001E8D18 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 71 | 6F52EC8320F844A6001E8D18 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 72 | 6F52EC8520F844A6001E8D18 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 73 | 6F52EC8620F844A6001E8D18 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 74 | 6F52EC8920F844A6001E8D18 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 75 | 6F52EC8B20F844A7001E8D18 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 76 | 6F52EC8E20F844A7001E8D18 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 77 | 6F52EC9020F844A7001E8D18 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 78 | 6F52EC9120F844A7001E8D18 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 79 | 6F52EC9720F844A7001E8D18 /* AnimationTransitionDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AnimationTransitionDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 80 | 6F52EC9B20F844A7001E8D18 /* AnimationTransitionDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnimationTransitionDemoTests.m; sourceTree = ""; }; 81 | 6F52EC9D20F844A7001E8D18 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 82 | 6F52ECA220F844A7001E8D18 /* AnimationTransitionDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AnimationTransitionDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 83 | 6F52ECA620F844A7001E8D18 /* AnimationTransitionDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AnimationTransitionDemoUITests.m; sourceTree = ""; }; 84 | 6F52ECA820F844A7001E8D18 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 85 | 6F52ECC520F88089001E8D18 /* CommonMagicMoveAnimationViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonMagicMoveAnimationViewController.h; sourceTree = ""; }; 86 | 6F52ECC620F88089001E8D18 /* CommonMagicMoveAnimationViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommonMagicMoveAnimationViewController.m; sourceTree = ""; }; 87 | 6F52ECC720F88089001E8D18 /* CommonMagicMoveAnimationViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CommonMagicMoveAnimationViewController.xib; sourceTree = ""; }; 88 | 6F52ECCB20F888E7001E8D18 /* CommonMagicMoveDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonMagicMoveDetailViewController.h; sourceTree = ""; }; 89 | 6F52ECCC20F888E7001E8D18 /* CommonMagicMoveDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommonMagicMoveDetailViewController.m; sourceTree = ""; }; 90 | 6F52ECCD20F888E7001E8D18 /* CommonMagicMoveDetailViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CommonMagicMoveDetailViewController.xib; sourceTree = ""; }; 91 | 6F52ECD020F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonMagicMoveCollectionViewCell.h; sourceTree = ""; }; 92 | 6F52ECD120F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommonMagicMoveCollectionViewCell.m; sourceTree = ""; }; 93 | 6F52ECD220F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CommonMagicMoveCollectionViewCell.xib; sourceTree = ""; }; 94 | 6F5EBC0D20FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonTikTokDetailCollectionViewCell.h; sourceTree = ""; }; 95 | 6F5EBC0E20FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommonTikTokDetailCollectionViewCell.m; sourceTree = ""; }; 96 | 6F5EBC0F20FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CommonTikTokDetailCollectionViewCell.xib; sourceTree = ""; }; 97 | 6F71D82D20FC7C1D00C5789F /* CommonSmoothViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonSmoothViewController.h; sourceTree = ""; }; 98 | 6F71D82E20FC7C1D00C5789F /* CommonSmoothViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommonSmoothViewController.m; sourceTree = ""; }; 99 | 6F71D82F20FC7C1D00C5789F /* CommonSmoothViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CommonSmoothViewController.xib; sourceTree = ""; }; 100 | 6F71D83320FC9E3800C5789F /* CommonTikTokCommentViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonTikTokCommentViewController.h; sourceTree = ""; }; 101 | 6F71D83420FC9E3800C5789F /* CommonTikTokCommentViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommonTikTokCommentViewController.m; sourceTree = ""; }; 102 | 6F71D83520FC9E3800C5789F /* CommonTikTokCommentViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CommonTikTokCommentViewController.xib; sourceTree = ""; }; 103 | 6F71D83820FC9F2000C5789F /* CommonTikTokDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommonTikTokDetailViewController.h; sourceTree = ""; }; 104 | 6F71D83920FC9F2000C5789F /* CommonTikTokDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommonTikTokDetailViewController.m; sourceTree = ""; }; 105 | 6F7EA08621144F1B0090C500 /* SS_AnimationInteractiveTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SS_AnimationInteractiveTransition.h; sourceTree = ""; }; 106 | 6F7EA08721144F1B0090C500 /* UINavigationController+SS_AnimationTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UINavigationController+SS_AnimationTransition.m"; sourceTree = ""; }; 107 | 6F7EA08821144F1B0090C500 /* SS_AnimationTransitionConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SS_AnimationTransitionConfig.h; sourceTree = ""; }; 108 | 6F7EA08921144F1B0090C500 /* UIViewController+SS_AnimationTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+SS_AnimationTransition.h"; sourceTree = ""; }; 109 | 6F7EA08B21144F1B0090C500 /* SS_AnimationEffects.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SS_AnimationEffects.m; sourceTree = ""; }; 110 | 6F7EA08C21144F1B0090C500 /* SS_AnimationSmoothEffect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SS_AnimationSmoothEffect.m; sourceTree = ""; }; 111 | 6F7EA08D21144F1B0090C500 /* SS_AnimationMaskEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SS_AnimationMaskEffect.h; sourceTree = ""; }; 112 | 6F7EA08E21144F1B0090C500 /* SS_AnimationMagicMoveEffect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SS_AnimationMagicMoveEffect.m; sourceTree = ""; }; 113 | 6F7EA08F21144F1B0090C500 /* SS_AnimationTikTokEffect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SS_AnimationTikTokEffect.m; sourceTree = ""; }; 114 | 6F7EA09021144F1B0090C500 /* SS_AnimationSmoothEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SS_AnimationSmoothEffect.h; sourceTree = ""; }; 115 | 6F7EA09121144F1B0090C500 /* SS_AnimationEffects.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SS_AnimationEffects.h; sourceTree = ""; }; 116 | 6F7EA09221144F1B0090C500 /* SS_AnimationMaskEffect.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SS_AnimationMaskEffect.m; sourceTree = ""; }; 117 | 6F7EA09321144F1B0090C500 /* SS_AnimationMagicMoveEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SS_AnimationMagicMoveEffect.h; sourceTree = ""; }; 118 | 6F7EA09421144F1B0090C500 /* SS_AnimationTikTokEffect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SS_AnimationTikTokEffect.h; sourceTree = ""; }; 119 | 6F7EA09521144F1B0090C500 /* SS_AnimationInteractiveTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SS_AnimationInteractiveTransition.m; sourceTree = ""; }; 120 | 6F7EA09621144F1B0090C500 /* UIViewController+SS_AnimationTransition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+SS_AnimationTransition.m"; sourceTree = ""; }; 121 | 6F7EA09721144F1B0090C500 /* UINavigationController+SS_AnimationTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UINavigationController+SS_AnimationTransition.h"; sourceTree = ""; }; 122 | 6F7EA09821144F1B0090C500 /* SS_AnimationTransition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SS_AnimationTransition.h; sourceTree = ""; }; 123 | /* End PBXFileReference section */ 124 | 125 | /* Begin PBXFrameworksBuildPhase section */ 126 | 6F52EC7C20F844A6001E8D18 /* Frameworks */ = { 127 | isa = PBXFrameworksBuildPhase; 128 | buildActionMask = 2147483647; 129 | files = ( 130 | ); 131 | runOnlyForDeploymentPostprocessing = 0; 132 | }; 133 | 6F52EC9420F844A7001E8D18 /* Frameworks */ = { 134 | isa = PBXFrameworksBuildPhase; 135 | buildActionMask = 2147483647; 136 | files = ( 137 | ); 138 | runOnlyForDeploymentPostprocessing = 0; 139 | }; 140 | 6F52EC9F20F844A7001E8D18 /* Frameworks */ = { 141 | isa = PBXFrameworksBuildPhase; 142 | buildActionMask = 2147483647; 143 | files = ( 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXFrameworksBuildPhase section */ 148 | 149 | /* Begin PBXGroup section */ 150 | 6F4A445D210092F700074E76 /* MaskAnimation */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 6F4A445E2100930E00074E76 /* CommonMaskViewController.h */, 154 | 6F4A445F2100930E00074E76 /* CommonMaskViewController.m */, 155 | 6F4A44602100930E00074E76 /* CommonMaskViewController.xib */, 156 | 6F4A44632100931C00074E76 /* CommonMaskDetailViewController.h */, 157 | 6F4A44642100931C00074E76 /* CommonMaskDetailViewController.m */, 158 | 6F4A44652100931C00074E76 /* CommonMaskDetailViewController.xib */, 159 | ); 160 | path = MaskAnimation; 161 | sourceTree = ""; 162 | }; 163 | 6F52EC7620F844A6001E8D18 = { 164 | isa = PBXGroup; 165 | children = ( 166 | 6F52EC8120F844A6001E8D18 /* AnimationTransitionDemo */, 167 | 6F52EC9A20F844A7001E8D18 /* AnimationTransitionDemoTests */, 168 | 6F52ECA520F844A7001E8D18 /* AnimationTransitionDemoUITests */, 169 | 6F52EC8020F844A6001E8D18 /* Products */, 170 | ); 171 | sourceTree = ""; 172 | }; 173 | 6F52EC8020F844A6001E8D18 /* Products */ = { 174 | isa = PBXGroup; 175 | children = ( 176 | 6F52EC7F20F844A6001E8D18 /* AnimationTransitionDemo.app */, 177 | 6F52EC9720F844A7001E8D18 /* AnimationTransitionDemoTests.xctest */, 178 | 6F52ECA220F844A7001E8D18 /* AnimationTransitionDemoUITests.xctest */, 179 | ); 180 | name = Products; 181 | sourceTree = ""; 182 | }; 183 | 6F52EC8120F844A6001E8D18 /* AnimationTransitionDemo */ = { 184 | isa = PBXGroup; 185 | children = ( 186 | 6F7EA08521144F1B0090C500 /* SS_AnimationTransition */, 187 | 6F52ECC420F8801D001E8D18 /* CommonTransitionAnimation */, 188 | 6F52EC8220F844A6001E8D18 /* AppDelegate.h */, 189 | 6F52EC8320F844A6001E8D18 /* AppDelegate.m */, 190 | 6F52EC8520F844A6001E8D18 /* ViewController.h */, 191 | 6F52EC8620F844A6001E8D18 /* ViewController.m */, 192 | 6F52EC8820F844A6001E8D18 /* Main.storyboard */, 193 | 6F52EC8B20F844A7001E8D18 /* Assets.xcassets */, 194 | 6F52EC8D20F844A7001E8D18 /* LaunchScreen.storyboard */, 195 | 6F52EC9020F844A7001E8D18 /* Info.plist */, 196 | 6F52EC9120F844A7001E8D18 /* main.m */, 197 | ); 198 | path = AnimationTransitionDemo; 199 | sourceTree = ""; 200 | }; 201 | 6F52EC9A20F844A7001E8D18 /* AnimationTransitionDemoTests */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | 6F52EC9B20F844A7001E8D18 /* AnimationTransitionDemoTests.m */, 205 | 6F52EC9D20F844A7001E8D18 /* Info.plist */, 206 | ); 207 | path = AnimationTransitionDemoTests; 208 | sourceTree = ""; 209 | }; 210 | 6F52ECA520F844A7001E8D18 /* AnimationTransitionDemoUITests */ = { 211 | isa = PBXGroup; 212 | children = ( 213 | 6F52ECA620F844A7001E8D18 /* AnimationTransitionDemoUITests.m */, 214 | 6F52ECA820F844A7001E8D18 /* Info.plist */, 215 | ); 216 | path = AnimationTransitionDemoUITests; 217 | sourceTree = ""; 218 | }; 219 | 6F52ECC420F8801D001E8D18 /* CommonTransitionAnimation */ = { 220 | isa = PBXGroup; 221 | children = ( 222 | 6F4A445D210092F700074E76 /* MaskAnimation */, 223 | 6F71D83220FC9D7100C5789F /* TikTokComment */, 224 | 6F71D82C20FC7C0400C5789F /* Smooth */, 225 | 6F52ECCA20F888B6001E8D18 /* MagicMove */, 226 | ); 227 | path = CommonTransitionAnimation; 228 | sourceTree = ""; 229 | }; 230 | 6F52ECCA20F888B6001E8D18 /* MagicMove */ = { 231 | isa = PBXGroup; 232 | children = ( 233 | 6F52ECC520F88089001E8D18 /* CommonMagicMoveAnimationViewController.h */, 234 | 6F52ECC620F88089001E8D18 /* CommonMagicMoveAnimationViewController.m */, 235 | 6F52ECC720F88089001E8D18 /* CommonMagicMoveAnimationViewController.xib */, 236 | 6F52ECCB20F888E7001E8D18 /* CommonMagicMoveDetailViewController.h */, 237 | 6F52ECCC20F888E7001E8D18 /* CommonMagicMoveDetailViewController.m */, 238 | 6F52ECCD20F888E7001E8D18 /* CommonMagicMoveDetailViewController.xib */, 239 | 6F52ECD020F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.h */, 240 | 6F52ECD120F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.m */, 241 | 6F52ECD220F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.xib */, 242 | ); 243 | path = MagicMove; 244 | sourceTree = ""; 245 | }; 246 | 6F71D82C20FC7C0400C5789F /* Smooth */ = { 247 | isa = PBXGroup; 248 | children = ( 249 | 6F71D82D20FC7C1D00C5789F /* CommonSmoothViewController.h */, 250 | 6F71D82E20FC7C1D00C5789F /* CommonSmoothViewController.m */, 251 | 6F71D82F20FC7C1D00C5789F /* CommonSmoothViewController.xib */, 252 | ); 253 | path = Smooth; 254 | sourceTree = ""; 255 | }; 256 | 6F71D83220FC9D7100C5789F /* TikTokComment */ = { 257 | isa = PBXGroup; 258 | children = ( 259 | 6F71D83320FC9E3800C5789F /* CommonTikTokCommentViewController.h */, 260 | 6F71D83420FC9E3800C5789F /* CommonTikTokCommentViewController.m */, 261 | 6F71D83520FC9E3800C5789F /* CommonTikTokCommentViewController.xib */, 262 | 6F71D83820FC9F2000C5789F /* CommonTikTokDetailViewController.h */, 263 | 6F71D83920FC9F2000C5789F /* CommonTikTokDetailViewController.m */, 264 | 6F5EBC0D20FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.h */, 265 | 6F5EBC0E20FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.m */, 266 | 6F5EBC0F20FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.xib */, 267 | ); 268 | path = TikTokComment; 269 | sourceTree = ""; 270 | }; 271 | 6F7EA08521144F1B0090C500 /* SS_AnimationTransition */ = { 272 | isa = PBXGroup; 273 | children = ( 274 | 6F7EA08A21144F1B0090C500 /* SS_AnimationEffects */, 275 | 6F7EA08621144F1B0090C500 /* SS_AnimationInteractiveTransition.h */, 276 | 6F7EA08721144F1B0090C500 /* UINavigationController+SS_AnimationTransition.m */, 277 | 6F7EA08821144F1B0090C500 /* SS_AnimationTransitionConfig.h */, 278 | 6F7EA08921144F1B0090C500 /* UIViewController+SS_AnimationTransition.h */, 279 | 6F7EA09521144F1B0090C500 /* SS_AnimationInteractiveTransition.m */, 280 | 6F7EA09621144F1B0090C500 /* UIViewController+SS_AnimationTransition.m */, 281 | 6F7EA09721144F1B0090C500 /* UINavigationController+SS_AnimationTransition.h */, 282 | 6F7EA09821144F1B0090C500 /* SS_AnimationTransition.h */, 283 | ); 284 | path = SS_AnimationTransition; 285 | sourceTree = ""; 286 | }; 287 | 6F7EA08A21144F1B0090C500 /* SS_AnimationEffects */ = { 288 | isa = PBXGroup; 289 | children = ( 290 | 6F7EA08B21144F1B0090C500 /* SS_AnimationEffects.m */, 291 | 6F7EA08C21144F1B0090C500 /* SS_AnimationSmoothEffect.m */, 292 | 6F7EA08D21144F1B0090C500 /* SS_AnimationMaskEffect.h */, 293 | 6F7EA08E21144F1B0090C500 /* SS_AnimationMagicMoveEffect.m */, 294 | 6F7EA08F21144F1B0090C500 /* SS_AnimationTikTokEffect.m */, 295 | 6F7EA09021144F1B0090C500 /* SS_AnimationSmoothEffect.h */, 296 | 6F7EA09121144F1B0090C500 /* SS_AnimationEffects.h */, 297 | 6F7EA09221144F1B0090C500 /* SS_AnimationMaskEffect.m */, 298 | 6F7EA09321144F1B0090C500 /* SS_AnimationMagicMoveEffect.h */, 299 | 6F7EA09421144F1B0090C500 /* SS_AnimationTikTokEffect.h */, 300 | ); 301 | path = SS_AnimationEffects; 302 | sourceTree = ""; 303 | }; 304 | /* End PBXGroup section */ 305 | 306 | /* Begin PBXNativeTarget section */ 307 | 6F52EC7E20F844A6001E8D18 /* AnimationTransitionDemo */ = { 308 | isa = PBXNativeTarget; 309 | buildConfigurationList = 6F52ECAB20F844A7001E8D18 /* Build configuration list for PBXNativeTarget "AnimationTransitionDemo" */; 310 | buildPhases = ( 311 | 6F52EC7B20F844A6001E8D18 /* Sources */, 312 | 6F52EC7C20F844A6001E8D18 /* Frameworks */, 313 | 6F52EC7D20F844A6001E8D18 /* Resources */, 314 | ); 315 | buildRules = ( 316 | ); 317 | dependencies = ( 318 | ); 319 | name = AnimationTransitionDemo; 320 | productName = AnimationTransitionDemo; 321 | productReference = 6F52EC7F20F844A6001E8D18 /* AnimationTransitionDemo.app */; 322 | productType = "com.apple.product-type.application"; 323 | }; 324 | 6F52EC9620F844A7001E8D18 /* AnimationTransitionDemoTests */ = { 325 | isa = PBXNativeTarget; 326 | buildConfigurationList = 6F52ECAE20F844A7001E8D18 /* Build configuration list for PBXNativeTarget "AnimationTransitionDemoTests" */; 327 | buildPhases = ( 328 | 6F52EC9320F844A7001E8D18 /* Sources */, 329 | 6F52EC9420F844A7001E8D18 /* Frameworks */, 330 | 6F52EC9520F844A7001E8D18 /* Resources */, 331 | ); 332 | buildRules = ( 333 | ); 334 | dependencies = ( 335 | 6F52EC9920F844A7001E8D18 /* PBXTargetDependency */, 336 | ); 337 | name = AnimationTransitionDemoTests; 338 | productName = AnimationTransitionDemoTests; 339 | productReference = 6F52EC9720F844A7001E8D18 /* AnimationTransitionDemoTests.xctest */; 340 | productType = "com.apple.product-type.bundle.unit-test"; 341 | }; 342 | 6F52ECA120F844A7001E8D18 /* AnimationTransitionDemoUITests */ = { 343 | isa = PBXNativeTarget; 344 | buildConfigurationList = 6F52ECB120F844A7001E8D18 /* Build configuration list for PBXNativeTarget "AnimationTransitionDemoUITests" */; 345 | buildPhases = ( 346 | 6F52EC9E20F844A7001E8D18 /* Sources */, 347 | 6F52EC9F20F844A7001E8D18 /* Frameworks */, 348 | 6F52ECA020F844A7001E8D18 /* Resources */, 349 | ); 350 | buildRules = ( 351 | ); 352 | dependencies = ( 353 | 6F52ECA420F844A7001E8D18 /* PBXTargetDependency */, 354 | ); 355 | name = AnimationTransitionDemoUITests; 356 | productName = AnimationTransitionDemoUITests; 357 | productReference = 6F52ECA220F844A7001E8D18 /* AnimationTransitionDemoUITests.xctest */; 358 | productType = "com.apple.product-type.bundle.ui-testing"; 359 | }; 360 | /* End PBXNativeTarget section */ 361 | 362 | /* Begin PBXProject section */ 363 | 6F52EC7720F844A6001E8D18 /* Project object */ = { 364 | isa = PBXProject; 365 | attributes = { 366 | LastUpgradeCheck = 0930; 367 | ORGANIZATIONNAME = "宋澎"; 368 | TargetAttributes = { 369 | 6F52EC7E20F844A6001E8D18 = { 370 | CreatedOnToolsVersion = 9.3; 371 | }; 372 | 6F52EC9620F844A7001E8D18 = { 373 | CreatedOnToolsVersion = 9.3; 374 | TestTargetID = 6F52EC7E20F844A6001E8D18; 375 | }; 376 | 6F52ECA120F844A7001E8D18 = { 377 | CreatedOnToolsVersion = 9.3; 378 | TestTargetID = 6F52EC7E20F844A6001E8D18; 379 | }; 380 | }; 381 | }; 382 | buildConfigurationList = 6F52EC7A20F844A6001E8D18 /* Build configuration list for PBXProject "AnimationTransitionDemo" */; 383 | compatibilityVersion = "Xcode 9.3"; 384 | developmentRegion = en; 385 | hasScannedForEncodings = 0; 386 | knownRegions = ( 387 | en, 388 | Base, 389 | ); 390 | mainGroup = 6F52EC7620F844A6001E8D18; 391 | productRefGroup = 6F52EC8020F844A6001E8D18 /* Products */; 392 | projectDirPath = ""; 393 | projectRoot = ""; 394 | targets = ( 395 | 6F52EC7E20F844A6001E8D18 /* AnimationTransitionDemo */, 396 | 6F52EC9620F844A7001E8D18 /* AnimationTransitionDemoTests */, 397 | 6F52ECA120F844A7001E8D18 /* AnimationTransitionDemoUITests */, 398 | ); 399 | }; 400 | /* End PBXProject section */ 401 | 402 | /* Begin PBXResourcesBuildPhase section */ 403 | 6F52EC7D20F844A6001E8D18 /* Resources */ = { 404 | isa = PBXResourcesBuildPhase; 405 | buildActionMask = 2147483647; 406 | files = ( 407 | 6F71D83120FC7C1D00C5789F /* CommonSmoothViewController.xib in Resources */, 408 | 6F4A44622100930E00074E76 /* CommonMaskViewController.xib in Resources */, 409 | 6F52EC8F20F844A7001E8D18 /* LaunchScreen.storyboard in Resources */, 410 | 6F52EC8C20F844A7001E8D18 /* Assets.xcassets in Resources */, 411 | 6F52ECD420F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.xib in Resources */, 412 | 6F52ECCF20F888E7001E8D18 /* CommonMagicMoveDetailViewController.xib in Resources */, 413 | 6F52EC8A20F844A6001E8D18 /* Main.storyboard in Resources */, 414 | 6F52ECC920F88089001E8D18 /* CommonMagicMoveAnimationViewController.xib in Resources */, 415 | 6F5EBC1120FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.xib in Resources */, 416 | 6F71D83720FC9E3800C5789F /* CommonTikTokCommentViewController.xib in Resources */, 417 | 6F4A44672100931C00074E76 /* CommonMaskDetailViewController.xib in Resources */, 418 | ); 419 | runOnlyForDeploymentPostprocessing = 0; 420 | }; 421 | 6F52EC9520F844A7001E8D18 /* Resources */ = { 422 | isa = PBXResourcesBuildPhase; 423 | buildActionMask = 2147483647; 424 | files = ( 425 | ); 426 | runOnlyForDeploymentPostprocessing = 0; 427 | }; 428 | 6F52ECA020F844A7001E8D18 /* Resources */ = { 429 | isa = PBXResourcesBuildPhase; 430 | buildActionMask = 2147483647; 431 | files = ( 432 | ); 433 | runOnlyForDeploymentPostprocessing = 0; 434 | }; 435 | /* End PBXResourcesBuildPhase section */ 436 | 437 | /* Begin PBXSourcesBuildPhase section */ 438 | 6F52EC7B20F844A6001E8D18 /* Sources */ = { 439 | isa = PBXSourcesBuildPhase; 440 | buildActionMask = 2147483647; 441 | files = ( 442 | 6F71D83A20FC9F2000C5789F /* CommonTikTokDetailViewController.m in Sources */, 443 | 6F4A44612100930E00074E76 /* CommonMaskViewController.m in Sources */, 444 | 6F7EA09C21144F1C0090C500 /* SS_AnimationMagicMoveEffect.m in Sources */, 445 | 6F52EC8720F844A6001E8D18 /* ViewController.m in Sources */, 446 | 6F52EC9220F844A7001E8D18 /* main.m in Sources */, 447 | 6F52ECC820F88089001E8D18 /* CommonMagicMoveAnimationViewController.m in Sources */, 448 | 6F4A44662100931C00074E76 /* CommonMaskDetailViewController.m in Sources */, 449 | 6F7EA09F21144F1C0090C500 /* SS_AnimationInteractiveTransition.m in Sources */, 450 | 6F52EC8420F844A6001E8D18 /* AppDelegate.m in Sources */, 451 | 6F7EA09921144F1C0090C500 /* UINavigationController+SS_AnimationTransition.m in Sources */, 452 | 6F5EBC1020FDDCAF0052F8EA /* CommonTikTokDetailCollectionViewCell.m in Sources */, 453 | 6F71D83620FC9E3800C5789F /* CommonTikTokCommentViewController.m in Sources */, 454 | 6F71D83020FC7C1D00C5789F /* CommonSmoothViewController.m in Sources */, 455 | 6F7EA09B21144F1C0090C500 /* SS_AnimationSmoothEffect.m in Sources */, 456 | 6F7EA09A21144F1C0090C500 /* SS_AnimationEffects.m in Sources */, 457 | 6F7EA09D21144F1C0090C500 /* SS_AnimationTikTokEffect.m in Sources */, 458 | 6F7EA0A021144F1C0090C500 /* UIViewController+SS_AnimationTransition.m in Sources */, 459 | 6F52ECD320F88AD1001E8D18 /* CommonMagicMoveCollectionViewCell.m in Sources */, 460 | 6F52ECCE20F888E7001E8D18 /* CommonMagicMoveDetailViewController.m in Sources */, 461 | 6F7EA09E21144F1C0090C500 /* SS_AnimationMaskEffect.m in Sources */, 462 | ); 463 | runOnlyForDeploymentPostprocessing = 0; 464 | }; 465 | 6F52EC9320F844A7001E8D18 /* Sources */ = { 466 | isa = PBXSourcesBuildPhase; 467 | buildActionMask = 2147483647; 468 | files = ( 469 | 6F52EC9C20F844A7001E8D18 /* AnimationTransitionDemoTests.m in Sources */, 470 | ); 471 | runOnlyForDeploymentPostprocessing = 0; 472 | }; 473 | 6F52EC9E20F844A7001E8D18 /* Sources */ = { 474 | isa = PBXSourcesBuildPhase; 475 | buildActionMask = 2147483647; 476 | files = ( 477 | 6F52ECA720F844A7001E8D18 /* AnimationTransitionDemoUITests.m in Sources */, 478 | ); 479 | runOnlyForDeploymentPostprocessing = 0; 480 | }; 481 | /* End PBXSourcesBuildPhase section */ 482 | 483 | /* Begin PBXTargetDependency section */ 484 | 6F52EC9920F844A7001E8D18 /* PBXTargetDependency */ = { 485 | isa = PBXTargetDependency; 486 | target = 6F52EC7E20F844A6001E8D18 /* AnimationTransitionDemo */; 487 | targetProxy = 6F52EC9820F844A7001E8D18 /* PBXContainerItemProxy */; 488 | }; 489 | 6F52ECA420F844A7001E8D18 /* PBXTargetDependency */ = { 490 | isa = PBXTargetDependency; 491 | target = 6F52EC7E20F844A6001E8D18 /* AnimationTransitionDemo */; 492 | targetProxy = 6F52ECA320F844A7001E8D18 /* PBXContainerItemProxy */; 493 | }; 494 | /* End PBXTargetDependency section */ 495 | 496 | /* Begin PBXVariantGroup section */ 497 | 6F52EC8820F844A6001E8D18 /* Main.storyboard */ = { 498 | isa = PBXVariantGroup; 499 | children = ( 500 | 6F52EC8920F844A6001E8D18 /* Base */, 501 | ); 502 | name = Main.storyboard; 503 | sourceTree = ""; 504 | }; 505 | 6F52EC8D20F844A7001E8D18 /* LaunchScreen.storyboard */ = { 506 | isa = PBXVariantGroup; 507 | children = ( 508 | 6F52EC8E20F844A7001E8D18 /* Base */, 509 | ); 510 | name = LaunchScreen.storyboard; 511 | sourceTree = ""; 512 | }; 513 | /* End PBXVariantGroup section */ 514 | 515 | /* Begin XCBuildConfiguration section */ 516 | 6F52ECA920F844A7001E8D18 /* Debug */ = { 517 | isa = XCBuildConfiguration; 518 | buildSettings = { 519 | ALWAYS_SEARCH_USER_PATHS = NO; 520 | CLANG_ANALYZER_NONNULL = YES; 521 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 522 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 523 | CLANG_CXX_LIBRARY = "libc++"; 524 | CLANG_ENABLE_MODULES = YES; 525 | CLANG_ENABLE_OBJC_ARC = YES; 526 | CLANG_ENABLE_OBJC_WEAK = YES; 527 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 528 | CLANG_WARN_BOOL_CONVERSION = YES; 529 | CLANG_WARN_COMMA = YES; 530 | CLANG_WARN_CONSTANT_CONVERSION = YES; 531 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 532 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 533 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 534 | CLANG_WARN_EMPTY_BODY = YES; 535 | CLANG_WARN_ENUM_CONVERSION = YES; 536 | CLANG_WARN_INFINITE_RECURSION = YES; 537 | CLANG_WARN_INT_CONVERSION = YES; 538 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 539 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 540 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 541 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 542 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 543 | CLANG_WARN_STRICT_PROTOTYPES = YES; 544 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 545 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 546 | CLANG_WARN_UNREACHABLE_CODE = YES; 547 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 548 | CODE_SIGN_IDENTITY = "iPhone Developer"; 549 | COPY_PHASE_STRIP = NO; 550 | DEBUG_INFORMATION_FORMAT = dwarf; 551 | ENABLE_STRICT_OBJC_MSGSEND = YES; 552 | ENABLE_TESTABILITY = YES; 553 | GCC_C_LANGUAGE_STANDARD = gnu11; 554 | GCC_DYNAMIC_NO_PIC = NO; 555 | GCC_NO_COMMON_BLOCKS = YES; 556 | GCC_OPTIMIZATION_LEVEL = 0; 557 | GCC_PREPROCESSOR_DEFINITIONS = ( 558 | "DEBUG=1", 559 | "$(inherited)", 560 | ); 561 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 562 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 563 | GCC_WARN_UNDECLARED_SELECTOR = YES; 564 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 565 | GCC_WARN_UNUSED_FUNCTION = YES; 566 | GCC_WARN_UNUSED_VARIABLE = YES; 567 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 568 | MTL_ENABLE_DEBUG_INFO = YES; 569 | ONLY_ACTIVE_ARCH = YES; 570 | SDKROOT = iphoneos; 571 | }; 572 | name = Debug; 573 | }; 574 | 6F52ECAA20F844A7001E8D18 /* Release */ = { 575 | isa = XCBuildConfiguration; 576 | buildSettings = { 577 | ALWAYS_SEARCH_USER_PATHS = NO; 578 | CLANG_ANALYZER_NONNULL = YES; 579 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 580 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; 581 | CLANG_CXX_LIBRARY = "libc++"; 582 | CLANG_ENABLE_MODULES = YES; 583 | CLANG_ENABLE_OBJC_ARC = YES; 584 | CLANG_ENABLE_OBJC_WEAK = YES; 585 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 586 | CLANG_WARN_BOOL_CONVERSION = YES; 587 | CLANG_WARN_COMMA = YES; 588 | CLANG_WARN_CONSTANT_CONVERSION = YES; 589 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 590 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 591 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 592 | CLANG_WARN_EMPTY_BODY = YES; 593 | CLANG_WARN_ENUM_CONVERSION = YES; 594 | CLANG_WARN_INFINITE_RECURSION = YES; 595 | CLANG_WARN_INT_CONVERSION = YES; 596 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 597 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 598 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 599 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 600 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 601 | CLANG_WARN_STRICT_PROTOTYPES = YES; 602 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 603 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 604 | CLANG_WARN_UNREACHABLE_CODE = YES; 605 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 606 | CODE_SIGN_IDENTITY = "iPhone Developer"; 607 | COPY_PHASE_STRIP = NO; 608 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 609 | ENABLE_NS_ASSERTIONS = NO; 610 | ENABLE_STRICT_OBJC_MSGSEND = YES; 611 | GCC_C_LANGUAGE_STANDARD = gnu11; 612 | GCC_NO_COMMON_BLOCKS = YES; 613 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 614 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 615 | GCC_WARN_UNDECLARED_SELECTOR = YES; 616 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 617 | GCC_WARN_UNUSED_FUNCTION = YES; 618 | GCC_WARN_UNUSED_VARIABLE = YES; 619 | IPHONEOS_DEPLOYMENT_TARGET = 11.3; 620 | MTL_ENABLE_DEBUG_INFO = NO; 621 | SDKROOT = iphoneos; 622 | VALIDATE_PRODUCT = YES; 623 | }; 624 | name = Release; 625 | }; 626 | 6F52ECAC20F844A7001E8D18 /* Debug */ = { 627 | isa = XCBuildConfiguration; 628 | buildSettings = { 629 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 630 | CODE_SIGN_STYLE = Automatic; 631 | DEVELOPMENT_TEAM = KG6ZTEXK44; 632 | INFOPLIST_FILE = AnimationTransitionDemo/Info.plist; 633 | LD_RUNPATH_SEARCH_PATHS = ( 634 | "$(inherited)", 635 | "@executable_path/Frameworks", 636 | ); 637 | PRODUCT_BUNDLE_IDENTIFIER = songpeng.AnimationTransitionDemo; 638 | PRODUCT_NAME = "$(TARGET_NAME)"; 639 | TARGETED_DEVICE_FAMILY = "1,2"; 640 | }; 641 | name = Debug; 642 | }; 643 | 6F52ECAD20F844A7001E8D18 /* Release */ = { 644 | isa = XCBuildConfiguration; 645 | buildSettings = { 646 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 647 | CODE_SIGN_STYLE = Automatic; 648 | DEVELOPMENT_TEAM = KG6ZTEXK44; 649 | INFOPLIST_FILE = AnimationTransitionDemo/Info.plist; 650 | LD_RUNPATH_SEARCH_PATHS = ( 651 | "$(inherited)", 652 | "@executable_path/Frameworks", 653 | ); 654 | PRODUCT_BUNDLE_IDENTIFIER = songpeng.AnimationTransitionDemo; 655 | PRODUCT_NAME = "$(TARGET_NAME)"; 656 | TARGETED_DEVICE_FAMILY = "1,2"; 657 | }; 658 | name = Release; 659 | }; 660 | 6F52ECAF20F844A7001E8D18 /* Debug */ = { 661 | isa = XCBuildConfiguration; 662 | buildSettings = { 663 | BUNDLE_LOADER = "$(TEST_HOST)"; 664 | CODE_SIGN_STYLE = Automatic; 665 | INFOPLIST_FILE = AnimationTransitionDemoTests/Info.plist; 666 | LD_RUNPATH_SEARCH_PATHS = ( 667 | "$(inherited)", 668 | "@executable_path/Frameworks", 669 | "@loader_path/Frameworks", 670 | ); 671 | PRODUCT_BUNDLE_IDENTIFIER = songpeng.AnimationTransitionDemoTests; 672 | PRODUCT_NAME = "$(TARGET_NAME)"; 673 | TARGETED_DEVICE_FAMILY = "1,2"; 674 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AnimationTransitionDemo.app/AnimationTransitionDemo"; 675 | }; 676 | name = Debug; 677 | }; 678 | 6F52ECB020F844A7001E8D18 /* Release */ = { 679 | isa = XCBuildConfiguration; 680 | buildSettings = { 681 | BUNDLE_LOADER = "$(TEST_HOST)"; 682 | CODE_SIGN_STYLE = Automatic; 683 | INFOPLIST_FILE = AnimationTransitionDemoTests/Info.plist; 684 | LD_RUNPATH_SEARCH_PATHS = ( 685 | "$(inherited)", 686 | "@executable_path/Frameworks", 687 | "@loader_path/Frameworks", 688 | ); 689 | PRODUCT_BUNDLE_IDENTIFIER = songpeng.AnimationTransitionDemoTests; 690 | PRODUCT_NAME = "$(TARGET_NAME)"; 691 | TARGETED_DEVICE_FAMILY = "1,2"; 692 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AnimationTransitionDemo.app/AnimationTransitionDemo"; 693 | }; 694 | name = Release; 695 | }; 696 | 6F52ECB220F844A7001E8D18 /* Debug */ = { 697 | isa = XCBuildConfiguration; 698 | buildSettings = { 699 | CODE_SIGN_STYLE = Automatic; 700 | INFOPLIST_FILE = AnimationTransitionDemoUITests/Info.plist; 701 | LD_RUNPATH_SEARCH_PATHS = ( 702 | "$(inherited)", 703 | "@executable_path/Frameworks", 704 | "@loader_path/Frameworks", 705 | ); 706 | PRODUCT_BUNDLE_IDENTIFIER = songpeng.AnimationTransitionDemoUITests; 707 | PRODUCT_NAME = "$(TARGET_NAME)"; 708 | TARGETED_DEVICE_FAMILY = "1,2"; 709 | TEST_TARGET_NAME = AnimationTransitionDemo; 710 | }; 711 | name = Debug; 712 | }; 713 | 6F52ECB320F844A7001E8D18 /* Release */ = { 714 | isa = XCBuildConfiguration; 715 | buildSettings = { 716 | CODE_SIGN_STYLE = Automatic; 717 | INFOPLIST_FILE = AnimationTransitionDemoUITests/Info.plist; 718 | LD_RUNPATH_SEARCH_PATHS = ( 719 | "$(inherited)", 720 | "@executable_path/Frameworks", 721 | "@loader_path/Frameworks", 722 | ); 723 | PRODUCT_BUNDLE_IDENTIFIER = songpeng.AnimationTransitionDemoUITests; 724 | PRODUCT_NAME = "$(TARGET_NAME)"; 725 | TARGETED_DEVICE_FAMILY = "1,2"; 726 | TEST_TARGET_NAME = AnimationTransitionDemo; 727 | }; 728 | name = Release; 729 | }; 730 | /* End XCBuildConfiguration section */ 731 | 732 | /* Begin XCConfigurationList section */ 733 | 6F52EC7A20F844A6001E8D18 /* Build configuration list for PBXProject "AnimationTransitionDemo" */ = { 734 | isa = XCConfigurationList; 735 | buildConfigurations = ( 736 | 6F52ECA920F844A7001E8D18 /* Debug */, 737 | 6F52ECAA20F844A7001E8D18 /* Release */, 738 | ); 739 | defaultConfigurationIsVisible = 0; 740 | defaultConfigurationName = Release; 741 | }; 742 | 6F52ECAB20F844A7001E8D18 /* Build configuration list for PBXNativeTarget "AnimationTransitionDemo" */ = { 743 | isa = XCConfigurationList; 744 | buildConfigurations = ( 745 | 6F52ECAC20F844A7001E8D18 /* Debug */, 746 | 6F52ECAD20F844A7001E8D18 /* Release */, 747 | ); 748 | defaultConfigurationIsVisible = 0; 749 | defaultConfigurationName = Release; 750 | }; 751 | 6F52ECAE20F844A7001E8D18 /* Build configuration list for PBXNativeTarget "AnimationTransitionDemoTests" */ = { 752 | isa = XCConfigurationList; 753 | buildConfigurations = ( 754 | 6F52ECAF20F844A7001E8D18 /* Debug */, 755 | 6F52ECB020F844A7001E8D18 /* Release */, 756 | ); 757 | defaultConfigurationIsVisible = 0; 758 | defaultConfigurationName = Release; 759 | }; 760 | 6F52ECB120F844A7001E8D18 /* Build configuration list for PBXNativeTarget "AnimationTransitionDemoUITests" */ = { 761 | isa = XCConfigurationList; 762 | buildConfigurations = ( 763 | 6F52ECB220F844A7001E8D18 /* Debug */, 764 | 6F52ECB320F844A7001E8D18 /* Release */, 765 | ); 766 | defaultConfigurationIsVisible = 0; 767 | defaultConfigurationName = Release; 768 | }; 769 | /* End XCConfigurationList section */ 770 | }; 771 | rootObject = 6F52EC7720F844A6001E8D18 /* Project object */; 772 | } 773 | -------------------------------------------------------------------------------- /AnimationTransitionDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AnimationTransitionDemo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /AnimationTransitionDemo.xcodeproj/project.xcworkspace/xcuserdata/songpeng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo.xcodeproj/project.xcworkspace/xcuserdata/songpeng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AnimationTransitionDemo.xcodeproj/xcuserdata/songpeng.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /AnimationTransitionDemo.xcodeproj/xcuserdata/songpeng.xcuserdatad/xcschemes/AnimationTransitionDemo.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 | -------------------------------------------------------------------------------- /AnimationTransitionDemo.xcodeproj/xcuserdata/songpeng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AnimationTransitionDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 6F52EC7E20F844A6001E8D18 16 | 17 | primary 18 | 19 | 20 | 6F52EC9620F844A7001E8D18 21 | 22 | primary 23 | 24 | 25 | 6F52ECA120F844A7001E8D18 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/.DS_Store -------------------------------------------------------------------------------- /AnimationTransitionDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 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 | return YES; 21 | } 22 | 23 | 24 | - (void)applicationWillResignActive:(UIApplication *)application { 25 | // 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. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | 30 | - (void)applicationDidEnterBackground:(UIApplication *)application { 31 | // 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. 32 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 33 | } 34 | 35 | 36 | - (void)applicationWillEnterForeground:(UIApplication *)application { 37 | // 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. 38 | } 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 | 46 | - (void)applicationWillTerminate:(UIApplication *)application { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | 51 | @end 52 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/1-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "haha bg.jpeg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/1-1.imageset/haha bg.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/1-1.imageset/haha bg.jpeg -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/10-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "xdBqvbba_400x400.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/10-1.imageset/xdBqvbba_400x400.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/10-1.imageset/xdBqvbba_400x400.jpg -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/11-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "MiDNqbJa_400x400.jpeg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/11-1.imageset/MiDNqbJa_400x400.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/11-1.imageset/MiDNqbJa_400x400.jpeg -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/2-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "LIVE FREE.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/2-1.imageset/LIVE FREE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/2-1.imageset/LIVE FREE.png -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/3-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "lonely_traveler.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/3-1.imageset/lonely_traveler.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/3-1.imageset/lonely_traveler.jpg -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/4-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "wallpaper.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/4-1.imageset/wallpaper.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/4-1.imageset/wallpaper.jpg -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/5-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "photo-1449182325215-d517de72c42d.jpeg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/5-1.imageset/photo-1449182325215-d517de72c42d.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/5-1.imageset/photo-1449182325215-d517de72c42d.jpeg -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/6-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "weibo square.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/6-1.imageset/weibo square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/6-1.imageset/weibo square.png -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/7-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "catch.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/7-1.imageset/catch.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/7-1.imageset/catch.jpg -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/8-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "IcesZKi5_400x400.jpeg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/8-1.imageset/IcesZKi5_400x400.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/8-1.imageset/IcesZKi5_400x400.jpeg -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/9-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "LlCpvQc2_400x400.jpg", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/9-1.imageset/LlCpvQc2_400x400.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/9-1.imageset/LlCpvQc2_400x400.jpg -------------------------------------------------------------------------------- /AnimationTransitionDemo/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 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/icon_community_release.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "filename" : "icon_community_release@3x.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/icon_community_release.imageset/icon_community_release@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/icon_community_release.imageset/icon_community_release@3x.png -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/twitter.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "twitter logo mask.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /AnimationTransitionDemo/Assets.xcassets/twitter.imageset/twitter logo mask.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/AnimationTransitionDemo/Assets.xcassets/twitter.imageset/twitter logo mask.png -------------------------------------------------------------------------------- /AnimationTransitionDemo/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 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/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 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MagicMove/CommonMagicMoveAnimationViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommonMagicMoveAnimationViewController.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CommonMagicMoveAnimationViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MagicMove/CommonMagicMoveAnimationViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommonMagicMoveAnimationViewController.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "CommonMagicMoveAnimationViewController.h" 10 | #import "CommonMagicMoveCollectionViewCell.h" 11 | #import "CommonMagicMoveDetailViewController.h" 12 | #import "SS_AnimationTransition.h" 13 | 14 | @interface CommonMagicMoveAnimationViewController () 15 | 16 | @property (nonatomic,strong) NSMutableArray * dataSource; 17 | @property (nonatomic,strong) UIView * targetView; 18 | @property (weak, nonatomic) IBOutlet UICollectionView *collectionView; 19 | 20 | @end 21 | 22 | @implementation CommonMagicMoveAnimationViewController 23 | 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | 27 | self.title = @"神奇移动效果"; 28 | self.dataSource = [NSMutableArray array]; 29 | 30 | UICollectionViewFlowLayout * flowLayout = [[UICollectionViewFlowLayout alloc] init]; 31 | flowLayout.minimumLineSpacing = 15; 32 | flowLayout.minimumInteritemSpacing = 15; 33 | flowLayout.sectionInset = UIEdgeInsetsMake(15, 15, 15, 15); 34 | 35 | CGFloat itemWith = (self.view.frame.size.width - 15 * 3)/2; 36 | flowLayout.itemSize = CGSizeMake(itemWith, itemWith); 37 | 38 | self.collectionView.collectionViewLayout = flowLayout; 39 | [self.collectionView registerNib:[UINib nibWithNibName:NSStringFromClass(CommonMagicMoveCollectionViewCell.class) bundle:nil] forCellWithReuseIdentifier:CommonMagicMoveCollectionViewCellID]; 40 | 41 | for(int i = 1; i < 12; i++){ 42 | NSString * tempString = [NSString stringWithFormat:@"%d-1",i]; 43 | [self.dataSource addObject:tempString]; 44 | } 45 | } 46 | 47 | #pragma mark - collectionDelegate 48 | 49 | - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{ 50 | return 1; 51 | } 52 | 53 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ 54 | return self.dataSource.count; 55 | } 56 | 57 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ 58 | CommonMagicMoveCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:CommonMagicMoveCollectionViewCellID forIndexPath:indexPath]; 59 | cell.currentImageName = self.dataSource[indexPath.item]; 60 | return cell; 61 | } 62 | 63 | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{ 64 | CommonMagicMoveCollectionViewCell * cell = [collectionView cellForItemAtIndexPath:indexPath]; 65 | self.targetView = cell.bgImageView; 66 | CommonMagicMoveDetailViewController * detailVC = [[CommonMagicMoveDetailViewController alloc] init]; 67 | detailVC.currentImageName = self.dataSource[indexPath.item]; 68 | [self.navigationController ss_pushViewController:detailVC type:KAnimationTransitionTypeMagicMove]; 69 | } 70 | 71 | #pragma mark - targetView 72 | 73 | - (UIView *)SS_AnimationTransitionTargetView{ 74 | return self.targetView; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MagicMove/CommonMagicMoveAnimationViewController.xib: -------------------------------------------------------------------------------- 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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MagicMove/CommonMagicMoveCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommonMagicMoveCollectionViewCell.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString * const CommonMagicMoveCollectionViewCellID; 12 | 13 | @interface CommonMagicMoveCollectionViewCell : UICollectionViewCell 14 | 15 | @property (weak, nonatomic) IBOutlet UIImageView *bgImageView; 16 | @property (nonatomic,copy) NSString * currentImageName; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MagicMove/CommonMagicMoveCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommonMagicMoveCollectionViewCell.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "CommonMagicMoveCollectionViewCell.h" 10 | 11 | NSString * const CommonMagicMoveCollectionViewCellID = @"CommonMagicMoveCollectionViewCellID"; 12 | 13 | @interface CommonMagicMoveCollectionViewCell () 14 | 15 | @property (weak, nonatomic) IBOutlet UILabel *currentLabel; 16 | 17 | @end 18 | 19 | @implementation CommonMagicMoveCollectionViewCell 20 | 21 | - (void)awakeFromNib { 22 | [super awakeFromNib]; 23 | } 24 | 25 | - (void)setCurrentImageName:(NSString *)currentImageName{ 26 | _currentImageName = currentImageName; 27 | self.bgImageView.image = [UIImage imageNamed:currentImageName]; 28 | self.currentLabel.text = currentImageName; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MagicMove/CommonMagicMoveCollectionViewCell.xib: -------------------------------------------------------------------------------- 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 | 27 | 28 | 29 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MagicMove/CommonMagicMoveDetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommonMagicMoveDetailViewController.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CommonMagicMoveDetailViewController : UIViewController 12 | 13 | @property (nonatomic,copy) NSString * currentImageName; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MagicMove/CommonMagicMoveDetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommonMagicMoveDetailViewController.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "CommonMagicMoveDetailViewController.h" 10 | #import "CommonSmoothViewController.h" 11 | #import "SS_AnimationTransition.h" 12 | 13 | @interface CommonMagicMoveDetailViewController () 14 | 15 | @property (weak, nonatomic) IBOutlet UIImageView *topImageView; 16 | @property (weak, nonatomic) IBOutlet UILabel *centerLabel; 17 | 18 | @end 19 | 20 | @implementation CommonMagicMoveDetailViewController 21 | 22 | - (void)viewDidLoad { 23 | [super viewDidLoad]; 24 | self.title = @"图片详情"; 25 | self.topImageView.image = [UIImage imageNamed:_currentImageName]; 26 | self.centerLabel.text = _currentImageName; 27 | } 28 | 29 | - (IBAction)clickNextButton:(id)sender { 30 | CommonSmoothViewController * smoothVC = [[CommonSmoothViewController alloc] init]; 31 | [self.navigationController ss_pushViewController:smoothVC type:KAnimationTransitionTypeSmooth]; 32 | } 33 | 34 | - (void)dealloc{ 35 | 36 | } 37 | 38 | #pragma mark - targetView 39 | 40 | - (UIView *)SS_AnimationTransitionTargetView{ 41 | return self.topImageView; 42 | } 43 | 44 | @end 45 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MagicMove/CommonMagicMoveDetailViewController.xib: -------------------------------------------------------------------------------- 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 | 27 | 28 | 29 | 30 | 31 | 32 | 38 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MaskAnimation/CommonMaskDetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommonMaskDetailViewController.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/19. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CommonMaskDetailViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MaskAnimation/CommonMaskDetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommonMaskDetailViewController.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/19. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "CommonMaskDetailViewController.h" 10 | 11 | @interface CommonMaskDetailViewController () 12 | 13 | @end 14 | 15 | @implementation CommonMaskDetailViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | NSLog(@"maskDetailVC : \n self = %@ \n self.view = %@",self,self.view); 20 | } 21 | 22 | - (void)dealloc{ 23 | NSLog(@"MaksDetailVC销毁了"); 24 | } 25 | 26 | - (void)didReceiveMemoryWarning { 27 | [super didReceiveMemoryWarning]; 28 | // Dispose of any resources that can be recreated. 29 | } 30 | 31 | /* 32 | #pragma mark - Navigation 33 | 34 | // In a storyboard-based application, you will often want to do a little preparation before navigation 35 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 36 | // Get the new view controller using [segue destinationViewController]. 37 | // Pass the selected object to the new view controller. 38 | } 39 | */ 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MaskAnimation/CommonMaskDetailViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MaskAnimation/CommonMaskViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommonMaskViewController.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/19. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CommonMaskViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MaskAnimation/CommonMaskViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommonMaskViewController.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/19. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "CommonMaskViewController.h" 10 | #import "CommonMaskDetailViewController.h" 11 | #import "SS_AnimationTransition.h" 12 | 13 | @interface CommonMaskViewController () 14 | 15 | @property (weak, nonatomic) IBOutlet UIImageView *targetImageView; 16 | @property (weak, nonatomic) IBOutlet UIButton *otherTargetButton; 17 | 18 | @end 19 | 20 | @implementation CommonMaskViewController{ 21 | BOOL _isClickOtherTargetButton; 22 | } 23 | 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | } 27 | 28 | - (void)didReceiveMemoryWarning { 29 | [super didReceiveMemoryWarning]; 30 | // Dispose of any resources that can be recreated. 31 | } 32 | 33 | //点击底部的"点击跳转"按钮 34 | - (IBAction)clickNextButton:(id)sender { 35 | _isClickOtherTargetButton = NO; 36 | CommonMaskDetailViewController * detailVC = [[CommonMaskDetailViewController alloc] init]; 37 | [self.navigationController ss_pushViewController:detailVC type:KAnimationTransitionTypeMask]; 38 | } 39 | 40 | //点击顶部的"发帖"按钮 41 | - (IBAction)clickOtherTargetButton:(id)sender { 42 | _isClickOtherTargetButton = YES; 43 | CommonMaskDetailViewController * detailVC = [[CommonMaskDetailViewController alloc] init]; 44 | [self.navigationController ss_pushViewController:detailVC type:KAnimationTransitionTypeMask]; 45 | } 46 | 47 | - (UIView *)SS_AnimationTransitionTargetView{ 48 | if (_isClickOtherTargetButton) { 49 | UIImageView * imageView = [[UIImageView alloc] init]; 50 | imageView.image = self.otherTargetButton.imageView.image; 51 | imageView.frame = CGRectMake(self.otherTargetButton.frame.origin.x, self.otherTargetButton.frame.origin.y, self.otherTargetButton.frame.size.width, self.otherTargetButton.frame.size.height); 52 | return imageView; 53 | }else{ 54 | return self.targetImageView; 55 | } 56 | } 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/MaskAnimation/CommonMaskViewController.xib: -------------------------------------------------------------------------------- 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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 43 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/Smooth/CommonSmoothViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommonSmoothViewController.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/16. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CommonSmoothViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/Smooth/CommonSmoothViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommonSmoothViewController.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/16. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "CommonSmoothViewController.h" 10 | #import "SS_AnimationTransition.h" 11 | 12 | @interface CommonSmoothViewController () 13 | 14 | @end 15 | 16 | @implementation CommonSmoothViewController 17 | 18 | - (void)viewDidLoad { 19 | [super viewDidLoad]; 20 | self.title = @"平滑移动效果"; 21 | } 22 | 23 | #pragma mark - targetView 24 | 25 | - (UIView *)SS_AnimationTransitionTargetView{ 26 | return [UIView new]; 27 | } 28 | 29 | - (void)didReceiveMemoryWarning { 30 | [super didReceiveMemoryWarning]; 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/Smooth/CommonSmoothViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/TikTokComment/CommonTikTokCommentViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommonTikTokCommentViewController.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/16. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CommonTikTokCommentViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/TikTokComment/CommonTikTokCommentViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommonTikTokCommentViewController.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/16. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "CommonTikTokCommentViewController.h" 10 | #import "CommonTikTokDetailViewController.h" 11 | #import "SS_AnimationTransition.h" 12 | 13 | @interface CommonTikTokCommentViewController () 14 | 15 | @end 16 | 17 | @implementation CommonTikTokCommentViewController 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | self.title = @"抖音评论效果"; 22 | } 23 | 24 | - (IBAction)clickCommentButton:(id)sender { 25 | CommonTikTokDetailViewController * detailVC = [[CommonTikTokDetailViewController alloc] init]; 26 | [self ss_presentVC:detailVC type:KAnimationTransitionTypeTikTokComment]; 27 | } 28 | 29 | - (void)didReceiveMemoryWarning { 30 | [super didReceiveMemoryWarning]; 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/TikTokComment/CommonTikTokCommentViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/TikTokComment/CommonTikTokDetailCollectionViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommonTikTokDetailCollectionViewCell.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/17. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | extern NSString * const CommonTikTokDetailCollectionViewCellID; 12 | 13 | @interface CommonTikTokDetailCollectionViewCell : UICollectionViewCell 14 | 15 | @property (nonatomic,copy) NSString * currentImageName; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/TikTokComment/CommonTikTokDetailCollectionViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommonTikTokDetailCollectionViewCell.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/17. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "CommonTikTokDetailCollectionViewCell.h" 10 | 11 | NSString * const CommonTikTokDetailCollectionViewCellID = @"CommonTikTokDetailCollectionViewCellID"; 12 | 13 | @interface CommonTikTokDetailCollectionViewCell () 14 | 15 | @property (weak, nonatomic) IBOutlet UIImageView *userImageView; 16 | @property (weak, nonatomic) IBOutlet UILabel *userNickNameLabel; 17 | @property (weak, nonatomic) IBOutlet UILabel *userCommentLabel; 18 | 19 | @end 20 | 21 | @implementation CommonTikTokDetailCollectionViewCell 22 | 23 | - (void)awakeFromNib { 24 | [super awakeFromNib]; 25 | // Initialization code 26 | } 27 | 28 | - (void)setCurrentImageName:(NSString *)currentImageName{ 29 | _currentImageName = currentImageName; 30 | self.userImageView.image = [UIImage imageNamed:currentImageName]; 31 | self.userNickNameLabel.text = [NSString stringWithFormat:@"昵称%@",currentImageName]; 32 | self.userCommentLabel.text = [NSString stringWithFormat:@"评论%@",currentImageName]; 33 | } 34 | 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/TikTokComment/CommonTikTokDetailCollectionViewCell.xib: -------------------------------------------------------------------------------- 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 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 40 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/TikTokComment/CommonTikTokDetailViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // CommonTikTokDetailViewController.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/16. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface CommonTikTokDetailViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/CommonTransitionAnimation/TikTokComment/CommonTikTokDetailViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // CommonTikTokDetailViewController.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/16. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "CommonTikTokDetailViewController.h" 10 | #import "SS_AnimationTransition.h" 11 | #import "CommonTikTokDetailCollectionViewCell.h" 12 | 13 | @interface CommonTikTokDetailViewController () 14 | 15 | @property (nonatomic,strong) NSMutableArray * dataSource; 16 | @property (strong, nonatomic) UICollectionView *collectionView; 17 | @property (nonatomic,strong) UIPanGestureRecognizer * panGesture; 18 | 19 | @end 20 | 21 | @implementation CommonTikTokDetailViewController 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | 26 | self.title = @"抖音评论详情"; 27 | self.view.backgroundColor = [UIColor clearColor]; 28 | self.view.layer.cornerRadius = 13; 29 | self.view.clipsToBounds = YES; 30 | 31 | self.dataSource = [NSMutableArray array]; 32 | 33 | UICollectionViewFlowLayout * flowLayout = [[UICollectionViewFlowLayout alloc] init]; 34 | flowLayout.minimumLineSpacing = 0; 35 | flowLayout.minimumInteritemSpacing = 15; 36 | flowLayout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0); 37 | 38 | CGFloat itemWith = self.view.frame.size.width; 39 | flowLayout.itemSize = CGSizeMake(itemWith, 100); 40 | 41 | self.collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height*2/3) collectionViewLayout:flowLayout]; 42 | self.collectionView.backgroundColor = [UIColor clearColor]; 43 | self.collectionView.showsVerticalScrollIndicator = NO; 44 | self.collectionView.delegate = self; 45 | self.collectionView.dataSource = self; 46 | [self.view addSubview:self.collectionView]; 47 | [self.collectionView registerNib:[UINib nibWithNibName:NSStringFromClass(CommonTikTokDetailCollectionViewCell.class) bundle:nil] forCellWithReuseIdentifier:CommonTikTokDetailCollectionViewCellID]; 48 | 49 | for(int i = 1; i < 12; i++){ 50 | NSString * tempString = [NSString stringWithFormat:@"%d-1",i]; 51 | [self.dataSource addObject:tempString]; 52 | } 53 | 54 | [self.collectionView reloadData]; 55 | [self.collectionView.panGestureRecognizer addTarget:self.animationTransitionDelegate action:@selector(handlePanGesture:)]; 56 | 57 | //防止PanGestureRecognizer.state更新不及时,导致程序卡死 (stateh会一直在UIGestureRecognizerStateChanged,导致转场一直update) 58 | [self addObserver:self forKeyPath:@"collectionView.panGestureRecognizer.state" options:NSKeyValueObservingOptionNew context:nil]; 59 | } 60 | 61 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{ 62 | id newValue = change[NSKeyValueChangeNewKey]; 63 | if ([newValue integerValue] == 3) { 64 | [self.animationTransitionDelegate finishInteractiveTransition]; 65 | } 66 | } 67 | 68 | #pragma mark - scrollViewDelegate 69 | 70 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView{ 71 | if (scrollView.contentOffset.y <= 0) { 72 | self.animationTransitionDelegate.isOpenPanGesture = YES; 73 | }else{ 74 | self.animationTransitionDelegate.isOpenPanGesture = NO; 75 | } 76 | } 77 | 78 | #pragma mark - collectionDelegate 79 | 80 | - (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{ 81 | return 1; 82 | } 83 | 84 | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ 85 | return self.dataSource.count; 86 | } 87 | 88 | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ 89 | CommonTikTokDetailCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:CommonTikTokDetailCollectionViewCellID forIndexPath:indexPath]; 90 | cell.currentImageName = self.dataSource[indexPath.item]; 91 | return cell; 92 | } 93 | 94 | @end 95 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/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 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationEffects/SS_AnimationEffects.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationEffects.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/16. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "UIViewController+SS_AnimationTransition.h" 11 | #import "SS_AnimationTransitionConfig.h" 12 | 13 | @interface SS_AnimationEffects : NSObject 14 | 15 | @property (nonatomic,assign) BOOL isBack; 16 | @property (nonatomic,strong) NSNumber * testNumber; 17 | 18 | - (instancetype)initWithIsBack:(BOOL)isBack; 19 | - (NSInteger)test; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationEffects/SS_AnimationEffects.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationEffects.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/16. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "SS_AnimationEffects.h" 10 | 11 | @implementation SS_AnimationEffects 12 | 13 | - (instancetype)initWithIsBack:(BOOL)isBack{ 14 | if (self = [super init]) { 15 | self.isBack = isBack; 16 | } 17 | return self; 18 | } 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationEffects/SS_AnimationMagicMoveEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationMagicMove.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "SS_AnimationEffects.h" 10 | 11 | @interface SS_AnimationMagicMoveEffect : SS_AnimationEffects 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationEffects/SS_AnimationMagicMoveEffect.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationMagicMove.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "SS_AnimationMagicMoveEffect.h" 10 | 11 | @implementation SS_AnimationMagicMoveEffect 12 | 13 | - (instancetype)initWithIsBack:(BOOL)isBack{ 14 | if (self = [super init]) { 15 | self.isBack = isBack; 16 | } 17 | return self; 18 | } 19 | 20 | - (NSTimeInterval)transitionDuration:(id)transitionContext{ 21 | return SS_AnimationTransitionDuration; 22 | } 23 | 24 | - (void)animateTransition:(id)transitionContext{ 25 | if (self.isBack) { 26 | [self transitionAnimationWithBack:transitionContext]; 27 | }else{ 28 | [self transitionAnimationWithForward:transitionContext]; 29 | } 30 | } 31 | 32 | //Push或者Present时 33 | - (void)transitionAnimationWithForward:(id)transitionContext{ 34 | 35 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 36 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 37 | UIColor *containerViewColor = [transitionContext containerView].backgroundColor; 38 | 39 | [transitionContext containerView].backgroundColor = [UIColor whiteColor]; 40 | 41 | UIView *fromView = fromVC.view; 42 | UIView *toView = toVC.view; 43 | 44 | UIView *fromTargetView = [fromVC SS_AnimationTransitionTargetView]; 45 | UIView *toTargetView = [toVC SS_AnimationTransitionTargetView]; 46 | 47 | if (!fromTargetView || !toTargetView) { 48 | [[transitionContext containerView] addSubview:toView]; 49 | [[transitionContext containerView] addSubview:fromView]; 50 | [transitionContext completeTransition:YES]; 51 | return; 52 | } 53 | 54 | [[transitionContext containerView] addSubview:toView]; 55 | toView.alpha = 0.2; 56 | UIView *fromSnapShotView = [fromTargetView snapshotViewAfterScreenUpdates:NO]; 57 | [[transitionContext containerView] addSubview:fromSnapShotView]; 58 | 59 | UIWindow * keyWindow = [UIApplication sharedApplication].keyWindow; 60 | CGPoint fromTargetPoint = [fromTargetView.superview convertPoint:fromTargetView.frame.origin toView:keyWindow]; 61 | CGPoint toTargetPoint = [toTargetView.superview convertPoint:toTargetView.frame.origin toView:keyWindow]; 62 | 63 | fromSnapShotView.frame = CGRectMake(fromTargetPoint.x, fromTargetPoint.y, fromTargetView.frame.size.width, fromTargetView.frame.size.height); 64 | toTargetView.hidden = YES; 65 | 66 | [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ 67 | fromSnapShotView.frame = CGRectMake(toTargetPoint.x, toTargetPoint.y, toTargetView.frame.size.width, toTargetView.frame.size.height); 68 | toView.alpha = 1.0; 69 | } completion:^(BOOL finished) { 70 | toTargetView.hidden = NO; 71 | [transitionContext containerView].backgroundColor = containerViewColor; 72 | [fromSnapShotView removeFromSuperview]; 73 | [transitionContext completeTransition:!transitionContext.transitionWasCancelled]; 74 | }]; 75 | } 76 | 77 | //Pop或者Dismiss时 78 | - (void)transitionAnimationWithBack:(id)transitionContext{ 79 | [self transitionAnimationWithForward:transitionContext]; 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationEffects/SS_AnimationMaskEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationMask.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/19. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "SS_AnimationEffects.h" 10 | 11 | @interface SS_AnimationMaskEffect : SS_AnimationEffects 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationEffects/SS_AnimationMaskEffect.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationMask.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/19. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "SS_AnimationMaskEffect.h" 10 | 11 | @interface SS_AnimationMaskEffect () 12 | 13 | @property (nonatomic,weak) UIView * forwardToView; 14 | @property (nonatomic,weak) idtransitionContext; 15 | 16 | @end 17 | 18 | @implementation SS_AnimationMaskEffect 19 | 20 | - (NSTimeInterval)transitionDuration:(id)transitionContext{ 21 | return SS_AnimationTransitionDuration; 22 | } 23 | 24 | - (void)animateTransition:(id)transitionContext{ 25 | self.transitionContext = transitionContext; 26 | if (self.isBack) { 27 | [self transitionAnimationWithBack:transitionContext]; 28 | }else{ 29 | [self transitionAnimationWithForward:transitionContext]; 30 | } 31 | } 32 | 33 | - (void)transitionAnimationWithForward:(id)transitionContext{ 34 | 35 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 36 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 37 | UIView *fromView = fromVC.view; 38 | UIView *toView = toVC.view; 39 | [transitionContext containerView].backgroundColor = toView.backgroundColor; 40 | UIView *fromTargetView = [fromVC SS_AnimationTransitionTargetView]; 41 | if (!fromTargetView || ![fromTargetView isKindOfClass:[UIView class]]) { 42 | [[transitionContext containerView] addSubview:fromView]; 43 | [[transitionContext containerView] addSubview:toView]; 44 | [transitionContext completeTransition:YES]; 45 | return; 46 | } 47 | 48 | [[transitionContext containerView] addSubview:fromView]; 49 | [[transitionContext containerView] addSubview:toView]; 50 | 51 | CAShapeLayer * shapeLayer = [[CAShapeLayer alloc] init]; 52 | if ([fromTargetView isKindOfClass:[UIImageView class]]) { 53 | UIImageView * fromTargetImageView = fromTargetView; 54 | shapeLayer.contents = (__bridge id)fromTargetImageView.image.CGImage; 55 | }else{ 56 | NSLog(@"请在AnimationTransitionTargetView方法中,返回UIImageView类型的视图"); 57 | } 58 | 59 | shapeLayer.bounds = fromTargetView.bounds; 60 | shapeLayer.position = fromTargetView.center; 61 | toView.layer.mask = shapeLayer; 62 | self.forwardToView = toView; 63 | CAKeyframeAnimation * keyFrameAnimation = [CAKeyframeAnimation animationWithKeyPath:@"bounds"]; 64 | keyFrameAnimation.duration = SS_AnimationTransitionDuration; 65 | NSValue * startValue = [NSValue valueWithCGRect:CGRectMake(0, 0, fromTargetView.frame.size.width, fromTargetView.frame.size.height)]; 66 | NSValue * finialValue = [NSValue valueWithCGRect:CGRectMake(0, 0, 2000, 2000)]; 67 | keyFrameAnimation.values = @[startValue,finialValue]; 68 | keyFrameAnimation.keyTimes = @[@0,@1]; 69 | keyFrameAnimation.fillMode = kCAFillModeForwards; 70 | keyFrameAnimation.removedOnCompletion = NO; 71 | keyFrameAnimation.delegate = self; 72 | [shapeLayer addAnimation:keyFrameAnimation forKey:@"keyFrameAnimation"]; 73 | } 74 | 75 | - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag{ 76 | [self.transitionContext completeTransition:YES]; 77 | self.forwardToView.layer.mask = nil; 78 | } 79 | 80 | - (void)transitionAnimationWithBack:(id)transitionContext{ 81 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 82 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 83 | [transitionContext containerView].backgroundColor = [UIColor whiteColor]; 84 | UIView *fromView = fromVC.view; 85 | UIView *toView = toVC.view; 86 | UIView *toTargetView = [toVC SS_AnimationTransitionTargetView]; 87 | if (!toTargetView || ![toTargetView isKindOfClass:[UIView class]]) { 88 | [[transitionContext containerView] addSubview:fromView]; 89 | [[transitionContext containerView] addSubview:toView]; 90 | [transitionContext completeTransition:YES]; 91 | return; 92 | } 93 | [[transitionContext containerView] addSubview:toView]; 94 | [[transitionContext containerView] addSubview:fromView]; 95 | self.forwardToView = fromView; 96 | CAShapeLayer * shapeLayer = [[CAShapeLayer alloc] init]; 97 | if ([toTargetView isKindOfClass:[UIImageView class]]) { 98 | UIImageView * toTargetImageView = toTargetView; 99 | shapeLayer.contents = (__bridge id)toTargetImageView.image.CGImage; 100 | }else{ 101 | NSLog(@"请在AnimationTransitionTargetView方法中,返回UIImageView类型的视图"); 102 | } 103 | 104 | shapeLayer.bounds = toTargetView.bounds; 105 | shapeLayer.position = toTargetView.center; 106 | fromView.layer.mask = shapeLayer; 107 | CAKeyframeAnimation * keyFrameAnimation = [CAKeyframeAnimation animationWithKeyPath:@"bounds"]; 108 | keyFrameAnimation.duration = SS_AnimationTransitionDuration; 109 | NSValue * startValue = [NSValue valueWithCGRect:CGRectMake(0, 0, 2000, 2000)]; 110 | NSValue * finialValue = [NSValue valueWithCGRect:CGRectMake(0, 0, toTargetView.frame.size.width, toTargetView.frame.size.height)]; 111 | keyFrameAnimation.values = @[startValue,finialValue]; 112 | keyFrameAnimation.delegate = self; 113 | [shapeLayer addAnimation:keyFrameAnimation forKey:@"keyFrameAnimation2"]; 114 | } 115 | 116 | @end 117 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationEffects/SS_AnimationSmoothEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationSmooth.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/16. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "SS_AnimationEffects.h" 10 | 11 | @interface SS_AnimationSmoothEffect : SS_AnimationEffects 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationEffects/SS_AnimationSmoothEffect.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationSmooth.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/16. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "SS_AnimationSmoothEffect.h" 10 | 11 | @implementation SS_AnimationSmoothEffect 12 | 13 | - (NSTimeInterval)transitionDuration:(id)transitionContext{ 14 | return SS_AnimationTransitionDuration; 15 | } 16 | 17 | - (void)animateTransition:(id)transitionContext{ 18 | 19 | if (self.isBack) { 20 | [self transitionAnimationWithBack:transitionContext]; 21 | }else{ 22 | [self transitionAnimationWithForward:transitionContext]; 23 | } 24 | } 25 | 26 | - (void)transitionAnimationWithForward:(id)transitionContext{ 27 | 28 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 29 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 30 | UIColor *containerViewColor = [transitionContext containerView].backgroundColor; 31 | 32 | [transitionContext containerView].backgroundColor = [UIColor whiteColor]; 33 | 34 | UIView *fromView = fromVC.view; 35 | UIView *toView = toVC.view; 36 | 37 | [[transitionContext containerView] addSubview:fromView]; 38 | 39 | [[transitionContext containerView] addSubview:toView]; 40 | 41 | UIWindow * keyWindow = [UIApplication sharedApplication].keyWindow; 42 | 43 | toView.frame = CGRectMake(keyWindow.frame.size.width, 0, keyWindow.frame.size.width, keyWindow.frame.size.height); 44 | 45 | [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ 46 | 47 | toView.frame = CGRectMake(0, 0, keyWindow.frame.size.width, keyWindow.frame.size.height); 48 | 49 | } completion:^(BOOL finished) { 50 | 51 | [transitionContext containerView].backgroundColor = containerViewColor; 52 | [transitionContext completeTransition:!transitionContext.transitionWasCancelled]; 53 | }]; 54 | } 55 | 56 | - (void)transitionAnimationWithBack:(id)transitionContext{ 57 | 58 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 59 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 60 | UIColor *containerViewColor = [transitionContext containerView].backgroundColor; 61 | 62 | [transitionContext containerView].backgroundColor = [UIColor whiteColor]; 63 | 64 | UIView *fromView = fromVC.view; 65 | UIView *toView = toVC.view; 66 | 67 | [[transitionContext containerView] addSubview:fromView]; 68 | 69 | [[transitionContext containerView] addSubview:toView]; 70 | 71 | UIView *fromSnapShotView = [fromView snapshotViewAfterScreenUpdates:NO]; 72 | 73 | [[transitionContext containerView] addSubview:fromSnapShotView]; 74 | 75 | UIWindow * keyWindow = [UIApplication sharedApplication].keyWindow; 76 | 77 | fromSnapShotView.frame = CGRectMake(0, 0, keyWindow.frame.size.width, keyWindow.frame.size.height); 78 | 79 | [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ 80 | 81 | fromSnapShotView.frame = CGRectMake(keyWindow.frame.size.width, 0, keyWindow.frame.size.width, keyWindow.frame.size.height); 82 | 83 | } completion:^(BOOL finished) { 84 | 85 | [transitionContext containerView].backgroundColor = containerViewColor; 86 | [fromSnapShotView removeFromSuperview]; 87 | [transitionContext completeTransition:!transitionContext.transitionWasCancelled]; 88 | }]; 89 | } 90 | 91 | @end 92 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationEffects/SS_AnimationTikTokEffect.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationTikTok.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/17. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "SS_AnimationEffects.h" 10 | 11 | @interface SS_AnimationTikTokEffect : SS_AnimationEffects 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationEffects/SS_AnimationTikTokEffect.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationTikTok.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/17. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "SS_AnimationTikTokEffect.h" 10 | 11 | @implementation SS_AnimationTikTokEffect 12 | 13 | - (NSTimeInterval)transitionDuration:(id)transitionContext{ 14 | return SS_AnimationTransitionDuration; 15 | } 16 | 17 | - (void)animateTransition:(id)transitionContext{ 18 | if (self.isBack) { 19 | [self transitionAnimationWithBack:transitionContext]; 20 | }else{ 21 | [self transitionAnimationWithForward:transitionContext]; 22 | } 23 | } 24 | 25 | - (void)transitionAnimationWithForward:(id)transitionContext{ 26 | 27 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 28 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 29 | UIColor *containerViewColor = [transitionContext containerView].backgroundColor; 30 | [transitionContext containerView].backgroundColor = [UIColor whiteColor]; 31 | 32 | UIView *fromView = fromVC.view; 33 | UIView *toView = toVC.view; 34 | 35 | UIView * fromSnapView = [fromView snapshotViewAfterScreenUpdates:NO]; 36 | [[transitionContext containerView] addSubview:fromSnapView]; 37 | [[transitionContext containerView] addSubview:toView]; 38 | 39 | UIWindow * keyWindow = [UIApplication sharedApplication].keyWindow; 40 | toView.frame = CGRectMake(0, keyWindow.frame.size.height, keyWindow.frame.size.width, keyWindow.frame.size.height); 41 | [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ 42 | toView.frame = CGRectMake(0, keyWindow.frame.size.height/3, keyWindow.frame.size.width, keyWindow.frame.size.height); 43 | } completion:^(BOOL finished) { 44 | [transitionContext containerView].backgroundColor = containerViewColor; 45 | [fromSnapView removeFromSuperview]; 46 | [transitionContext completeTransition:!transitionContext.transitionWasCancelled]; 47 | }]; 48 | } 49 | 50 | - (void)transitionAnimationWithBack:(id)transitionContext{ 51 | 52 | UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey]; 53 | UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 54 | UIColor *containerViewColor = [transitionContext containerView].backgroundColor; 55 | [transitionContext containerView].backgroundColor = [UIColor whiteColor]; 56 | UIView *fromView = fromVC.view; 57 | UIView *toView = toVC.view; 58 | 59 | /* 60 | Custom 模式:presentation 结束后,presentingView(fromView) 未被主动移出视图结构,在 dismissal 中,注意不要像其他转场中那样将 presentingView(toView) 加入 containerView 中,否则 dismissal 结束后本来可见的 presentingView 将会随着 containerView 一起被移除。如果你在 Custom 模式下没有注意到这点,很容易出现黑屏之类的现象而不知道问题所在。 61 | */ 62 | UIView * toSnapView = [toView snapshotViewAfterScreenUpdates:NO]; 63 | [[transitionContext containerView] addSubview:toSnapView]; 64 | [[transitionContext containerView] addSubview:fromView]; 65 | 66 | UIWindow * keyWindow = [UIApplication sharedApplication].keyWindow; 67 | fromView.frame = CGRectMake(0, keyWindow.frame.size.height/3, keyWindow.frame.size.width, keyWindow.frame.size.height); 68 | [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{ 69 | fromView.frame = CGRectMake(0, keyWindow.frame.size.height, keyWindow.frame.size.width, keyWindow.frame.size.height); 70 | } completion:^(BOOL finished) { 71 | [toSnapView removeFromSuperview]; 72 | [transitionContext containerView].backgroundColor = containerViewColor; 73 | [transitionContext completeTransition:!transitionContext.transitionWasCancelled]; 74 | }]; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationInteractiveTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationInteractiveTransition.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SS_AnimationTransitionConfig.h" 11 | 12 | typedef NS_ENUM(NSInteger,PanDirectionStyle){ 13 | DirectionStyleNone = 1, //不增加滑动手势 14 | DirectionStyleLeft, //响应左滑手势 15 | DirectionStyleRight, //响应右滑手势 16 | DirectionStyleUp, //响应上滑手势 17 | DirectionStyleDown //响应下滑手势 18 | }; 19 | 20 | @interface SS_AnimationInteractiveTransition : UIPercentDrivenInteractiveTransition 21 | 22 | @property (nonatomic,weak) UINavigationController * navigationController; //使用Push转场时使用,其它情况应为nil 23 | @property (nonatomic,weak) UIViewController * currentViewController; //使用Present转场时使用,其它情况应为nil 24 | @property (nonatomic,weak) UIView * targetView; //增加手势的目标视图 25 | @property (nonatomic,assign) BOOL isOpenScreenEdgePanGesture; //是否开启侧滑返回手势 26 | //利用此参数,可以自定义滑动时机,例如:当contenOffset=0时,在开启滑动手势 27 | @property (nonatomic,assign) BOOL isOpenPanGesture; //是否开启整体滑动手势 28 | @property (nonatomic,assign) PanDirectionStyle directionStyle; //是否开启整体滑动手势 29 | @property (nonatomic,assign) KSS_AnimationTransitionType type; //动画类型 30 | 31 | + (instancetype)shareInteractiveTransition; 32 | - (void)handlePanGesture:(UIPanGestureRecognizer *)panGesture; 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationInteractiveTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationInteractiveTransition.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "SS_AnimationInteractiveTransition.h" 10 | #import "SS_AnimationTransitionConfig.h" 11 | #import "SS_AnimationMagicMoveEffect.h" 12 | #import "SS_AnimationSmoothEffect.h" 13 | #import "SS_AnimationTikTokEffect.h" 14 | #import "SS_AnimationMaskEffect.h" 15 | 16 | @interface SS_AnimationInteractiveTransition () 17 | 18 | @property (nonatomic,assign) BOOL isBack; //是否是Pop或者Dismiss 19 | @property (nonatomic,assign) BOOL isInteractive; //是否手势过渡 20 | 21 | @end 22 | 23 | @implementation SS_AnimationInteractiveTransition{ 24 | id _animtedTransitioning; 25 | } 26 | 27 | + (instancetype)shareInteractiveTransition{ 28 | 29 | static SS_AnimationInteractiveTransition * _shareInteractiveTransition = nil; 30 | static dispatch_once_t onceToken; 31 | dispatch_once(&onceToken, ^{ 32 | _shareInteractiveTransition = [SS_AnimationInteractiveTransition new]; 33 | }); 34 | return _shareInteractiveTransition; 35 | } 36 | 37 | #pragma mark - UINavigationControllerDelegate 38 | 39 | - (nullable id )navigationController:(UINavigationController *)navigationController 40 | interactionControllerForAnimationController:(id ) animationController{ 41 | 42 | //仅在Pop和Dismiss的时候启用手势交互,一般情况下Push和Present的时候不需要手势交互 43 | return self.isInteractive ? self.isBack ? self : nil : nil; 44 | } 45 | 46 | - (nullable id )navigationController:(UINavigationController *)navigationController 47 | animationControllerForOperation:(UINavigationControllerOperation)operation 48 | fromViewController:(UIViewController *)fromVC 49 | toViewController:(UIViewController *)toVC{ 50 | 51 | if(operation == UINavigationControllerOperationPush){ 52 | self.isBack = NO; 53 | }else if(operation == UINavigationControllerOperationPop){ 54 | self.isBack = YES; 55 | } 56 | [self handleAnimatedTransitioning]; 57 | return _animtedTransitioning; 58 | } 59 | 60 | #pragma mark - UIViewControllerTransitioningDelegate 61 | 62 | - (nullable id )animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source{ 63 | self.isBack = NO; 64 | [self handleAnimatedTransitioning]; 65 | return _animtedTransitioning; 66 | } 67 | 68 | - (nullable id )animationControllerForDismissedController:(UIViewController *)dismissed{ 69 | self.isBack = YES; 70 | [self handleAnimatedTransitioning]; 71 | return _animtedTransitioning; 72 | } 73 | 74 | - (nullable id )interactionControllerForPresentation:(id )animator{ 75 | return nil; 76 | } 77 | 78 | - (nullable id )interactionControllerForDismissal:(id )animator{ 79 | return self.isInteractive ? self.isBack ? self : nil : nil;//仅在Pop和Dismiss的时候启用手势交互,一般情况下Push和Present的时候不需要手势交互 80 | } 81 | 82 | #pragma mark - return UIViewControllerInteractiveTransitioning 83 | 84 | - (void)handleAnimatedTransitioning{ 85 | if (self.type == KAnimationTransitionTypeNone){ 86 | _animtedTransitioning = nil; 87 | }else if (self.type == KAnimationTransitionTypeSmooth) { 88 | _animtedTransitioning = [[SS_AnimationSmoothEffect alloc] initWithIsBack:self.isBack]; 89 | }else if(self.type == KAnimationTransitionTypeMagicMove){ 90 | _animtedTransitioning = [[SS_AnimationMagicMoveEffect alloc] initWithIsBack:self.isBack]; 91 | }else if(self.type == KAnimationTransitionTypeTikTokComment){ 92 | _animtedTransitioning = [[SS_AnimationTikTokEffect alloc] initWithIsBack:self.isBack]; 93 | }else if(self.type == KAnimationTransitionTypeMask){ 94 | _animtedTransitioning = [[SS_AnimationMaskEffect alloc] initWithIsBack:self.isBack]; 95 | } 96 | } 97 | 98 | #pragma mark - setter 99 | 100 | - (void)setIsOpenScreenEdgePanGesture:(BOOL)isOpenScreenEdgePanGesture{ 101 | _isOpenScreenEdgePanGesture = isOpenScreenEdgePanGesture; 102 | if (isOpenScreenEdgePanGesture){ 103 | UIScreenEdgePanGestureRecognizer * edgePanGesture = [[UIScreenEdgePanGestureRecognizer alloc] initWithTarget:self action:@selector(handleEdgePanGesture:)]; 104 | edgePanGesture.edges = UIRectEdgeLeft; 105 | edgePanGesture.delegate = self; 106 | [self.targetView addGestureRecognizer:edgePanGesture]; 107 | } 108 | } 109 | 110 | - (void)handleEdgePanGesture:(UIScreenEdgePanGestureRecognizer *)edgePanGesture{ 111 | UIWindow * keyWindow = [UIApplication sharedApplication].keyWindow; 112 | CGFloat rate = [edgePanGesture translationInView:keyWindow].x / [UIScreen mainScreen].bounds.size.width; 113 | CGFloat velocity = [edgePanGesture velocityInView:keyWindow].x; 114 | [self handleGesture:edgePanGesture rate:rate velocity:velocity]; 115 | } 116 | 117 | - (void)setDirectionStyle:(PanDirectionStyle)directionStyle{ 118 | _directionStyle = directionStyle; 119 | if (_directionStyle != DirectionStyleNone) { 120 | UIPanGestureRecognizer * panGesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePanGesture:)]; 121 | [self.targetView addGestureRecognizer:panGesture]; 122 | } 123 | } 124 | 125 | - (void)handlePanGesture:(UIPanGestureRecognizer *)panGesture{ 126 | if(!self.isOpenPanGesture){ 127 | return; 128 | } 129 | PanDirectionStyle currentDirction = DirectionStyleNone; 130 | UIWindow * keyWindow = [UIApplication sharedApplication].keyWindow; 131 | CGFloat translationX = [panGesture translationInView:keyWindow].x; 132 | CGFloat translationY = [panGesture translationInView:keyWindow].y; 133 | 134 | CGFloat moveRangeWidth = UIScreen.mainScreen.bounds.size.width; 135 | CGFloat moveRangeHeight = UIScreen.mainScreen.bounds.size.height; 136 | 137 | if (self.type == KAnimationTransitionTypeTikTokComment) { 138 | moveRangeHeight = moveRangeHeight*2/3; 139 | } 140 | 141 | CGFloat rate = [panGesture translationInView:[[UIApplication sharedApplication] keyWindow]].x / moveRangeWidth; 142 | CGFloat velocity = [panGesture velocityInView:[[UIApplication sharedApplication] keyWindow]].x; 143 | 144 | if (fabs(translationX) > fabs(translationY)) { 145 | if(translationX > 0){ 146 | //右滑 147 | currentDirction = DirectionStyleRight; 148 | }else if(translationX < 0){ 149 | //左滑 150 | currentDirction = DirectionStyleLeft; 151 | } 152 | }else{ 153 | rate = fabs([panGesture translationInView:keyWindow].y / moveRangeHeight); 154 | velocity = fabs([panGesture velocityInView:keyWindow].y); 155 | if(translationY > 0){ 156 | //下滑 157 | currentDirction = DirectionStyleDown; 158 | }else if(translationY < 0){ 159 | //上滑 160 | currentDirction = DirectionStyleUp; 161 | } 162 | } 163 | if(currentDirction == self.directionStyle){ 164 | [self handleGesture:panGesture rate:MIN(1.0, rate) velocity:velocity]; 165 | } 166 | } 167 | 168 | - (void)handleGesture:(UIGestureRecognizer *)gesture rate:(CGFloat)rate velocity:(CGFloat)velocity{ 169 | // NSLog(@"state = %ld \n",(long)gesture.state); 170 | 171 | switch (gesture.state){ 172 | case UIGestureRecognizerStateBegan:{ 173 | self.isInteractive = YES; 174 | if (self.navigationController) { 175 | [self.navigationController popViewControllerAnimated:YES]; 176 | }else{ 177 | [self.currentViewController dismissViewControllerAnimated:YES completion:nil]; 178 | } 179 | break; 180 | } 181 | case UIGestureRecognizerStateChanged:{ 182 | self.isInteractive = NO; 183 | [self updateInteractiveTransition:rate]; 184 | break; 185 | } 186 | default:{ 187 | self.isInteractive = NO; 188 | if (rate >= SS_ScreenEdgePanMoveScale) 189 | [self finishInteractiveTransition]; 190 | else 191 | if (velocity > SS_ScreenEdgePanMoveVelocity) 192 | [self finishInteractiveTransition]; 193 | else 194 | [self cancelInteractiveTransition]; 195 | break; 196 | } 197 | } 198 | } 199 | 200 | - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{ 201 | CGPoint point = [touch locationInView:self.targetView]; 202 | if (point.x < 100) { 203 | return YES; 204 | }else{ 205 | return NO; 206 | } 207 | } 208 | 209 | @end 210 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationTransition.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+SS_AnimationTransition.h" 10 | #import "UINavigationController+SS_AnimationTransition.h" 11 | #import "SS_AnimationInteractiveTransition.h" 12 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/SS_AnimationTransitionConfig.h: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationTransitionConfig.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #ifndef SS_AnimationTransitionConfig_h 10 | #define SS_AnimationTransitionConfig_h 11 | 12 | //转场动画的时间 13 | static CGFloat SS_AnimationTransitionDuration = 0.5; 14 | //屏幕边缘侧滑手势的移动比例,超出则触发转场 15 | static CGFloat SS_ScreenEdgePanMoveScale = 0.4; 16 | //屏幕边缘侧滑手势的移动速度,超过则触发转场 17 | static CGFloat SS_ScreenEdgePanMoveVelocity = 1000.0; 18 | //页面整体滑动手势的移动比例,超过则触发转场 19 | static CGFloat SS_PanGestureMoveScale = 0.4; 20 | //页面整体滑动手势的移动速度,超过则触发转场 21 | static CGFloat SS_PanGestureMoveVelocity = 1000.0; 22 | 23 | typedef NS_ENUM(NSInteger,KSS_AnimationTransitionType){ 24 | KAnimationTransitionTypeNone = 1, //不自定义动画,使用系统的 -不需要实现SS_AnimationTransitionTargetView 25 | KAnimationTransitionTypeSmooth, //平滑的转场,支持Push和Present -不需要实现SS_AnimationTransitionTargetView 26 | KAnimationTransitionTypeMagicMove, //神奇移动转场,仅支持Push -fromVC和toVC都必须实现SS_AnimationTransitionTargetView 27 | KAnimationTransitionTypeTikTokComment, //抖音的评论,仅支持Present -不需要实现SS_AnimationTransitionTargetView 28 | KAnimationTransitionTypeMask //Mask转场,仅支持Push -fromVC实现SS_AnimationTransitionTargetView,且必须返回UIImageView 29 | }; 30 | 31 | #endif /* SS_AnimationTransitionConfig_h */ 32 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/UINavigationController+SS_AnimationTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+AnimationTransition.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SS_AnimationTransitionConfig.h" 11 | 12 | @interface UINavigationController (SS_AnimationTransition) 13 | 14 | - (void)ss_pushViewController:(UIViewController *)viewController type:(KSS_AnimationTransitionType)type; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/UINavigationController+SS_AnimationTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // UINavigationController+AnimationTransition.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "UINavigationController+SS_AnimationTransition.h" 10 | #import "SS_AnimationInteractiveTransition.h" 11 | #import "UIViewController+SS_AnimationTransition.h" 12 | 13 | @implementation UINavigationController (SS_AnimationTransition) 14 | 15 | - (void)ss_pushViewController:(UIViewController *)viewController type:(KSS_AnimationTransitionType)type{ 16 | if (type == KAnimationTransitionTypeNone) { 17 | [self none_pushViewController:viewController]; 18 | }else if (type == KAnimationTransitionTypeSmooth) { 19 | [self smooth_pushViewController:viewController]; 20 | }else if (type == KAnimationTransitionTypeMagicMove){ 21 | [self magicMove_pushViewController:viewController]; 22 | }else if(type == KAnimationTransitionTypeMask){ 23 | [self mask_pushViewController:viewController]; 24 | }else{ 25 | [self none_pushViewController:viewController]; 26 | } 27 | } 28 | 29 | - (void)none_pushViewController:(UIViewController *)viewController{ 30 | self.delegate = nil; 31 | viewController.animationTransitionDelegate = nil; 32 | [self pushViewController:viewController animated:true]; 33 | } 34 | 35 | - (void)smooth_pushViewController:(UIViewController *)viewController{ 36 | self.animationTransitionDelegate = [[SS_AnimationInteractiveTransition alloc] init]; 37 | self.animationTransitionDelegate.type = KAnimationTransitionTypeSmooth; 38 | self.animationTransitionDelegate.targetView = viewController.view; //增加手势 39 | self.animationTransitionDelegate.navigationController = self; //手势控制返回 40 | self.animationTransitionDelegate.isOpenPanGesture = NO; //开启滑动手势 41 | self.animationTransitionDelegate.directionStyle = DirectionStyleNone; //设置侧滑方向 42 | self.animationTransitionDelegate.isOpenScreenEdgePanGesture = YES; //开启侧滑返回,注意:手势重叠问题 43 | self.delegate = self.animationTransitionDelegate; 44 | 45 | viewController.animationTransitionDelegate = self.animationTransitionDelegate; 46 | [self pushViewController:viewController animated:YES]; 47 | } 48 | 49 | - (void)magicMove_pushViewController:(UIViewController *)viewController{ 50 | self.animationTransitionDelegate = [[SS_AnimationInteractiveTransition alloc] init]; 51 | self.animationTransitionDelegate.type = KAnimationTransitionTypeMagicMove; 52 | self.animationTransitionDelegate.targetView = viewController.view; //增加手势 53 | self.animationTransitionDelegate.navigationController = self; //手势控制返回 54 | self.animationTransitionDelegate.isOpenPanGesture = YES; //开启滑动手势 55 | self.animationTransitionDelegate.directionStyle = DirectionStyleUp; //设置侧滑方向 56 | self.animationTransitionDelegate.isOpenScreenEdgePanGesture = YES; //开启侧滑返回,注意:手势重叠问题 57 | self.delegate = self.animationTransitionDelegate; 58 | 59 | viewController.animationTransitionDelegate = self.animationTransitionDelegate; 60 | [self pushViewController:viewController animated:YES]; 61 | } 62 | 63 | - (void)mask_pushViewController:(UIViewController *)viewController{ 64 | self.animationTransitionDelegate = [[SS_AnimationInteractiveTransition alloc] init]; 65 | self.animationTransitionDelegate.type = KAnimationTransitionTypeMask; 66 | self.animationTransitionDelegate.targetView = viewController.view; //增加手势 67 | self.animationTransitionDelegate.navigationController = self; //手势控制返回 68 | self.animationTransitionDelegate.isOpenPanGesture = NO; //开启滑动手势 69 | self.animationTransitionDelegate.directionStyle = DirectionStyleNone; //设置侧滑方向 70 | self.animationTransitionDelegate.isOpenScreenEdgePanGesture = YES; //开启侧滑返回,注意:手势重叠问题 71 | self.delegate = self.animationTransitionDelegate; 72 | 73 | viewController.animationTransitionDelegate = self.animationTransitionDelegate; 74 | [self pushViewController:viewController animated:YES]; 75 | } 76 | 77 | @end 78 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/UIViewController+SS_AnimationTransition.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+AnimationTransition.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SS_AnimationTransitionConfig.h" 11 | 12 | @class SS_AnimationInteractiveTransition; 13 | 14 | @interface UIViewController (SS_AnimationTransition) 15 | 16 | @property (nonatomic,strong) SS_AnimationInteractiveTransition * animationTransitionDelegate; 17 | 18 | //返回转场的目标视图,某些转场中必须实现这个方法 19 | - (UIView *)SS_AnimationTransitionTargetView; 20 | - (void)ss_presentVC:(UIViewController *)viewController type:(KSS_AnimationTransitionType)type; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/SS_AnimationTransition/UIViewController+SS_AnimationTransition.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIViewController+AnimationTransition.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "UIViewController+SS_AnimationTransition.h" 10 | #import "SS_AnimationInteractiveTransition.h" 11 | #import 12 | 13 | static char * const InteractiveTransitionKey = "InteractiveTransitionKey"; 14 | 15 | @implementation UIViewController (SS_AnimationTransition) 16 | 17 | - (void)setAnimationTransitionDelegate:(SS_AnimationInteractiveTransition *)animationTransitionDelegate{ 18 | objc_setAssociatedObject(self, InteractiveTransitionKey, animationTransitionDelegate, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 19 | } 20 | 21 | - (SS_AnimationInteractiveTransition *)animationTransitionDelegate{ 22 | return objc_getAssociatedObject(self, InteractiveTransitionKey); 23 | } 24 | 25 | + (void)load{ 26 | Method oldMethod = class_getInstanceMethod([self class], @selector(viewWillAppear:)); 27 | Method newMethod = class_getInstanceMethod([self class], @selector(newViewWillAppear:)); 28 | static dispatch_once_t onceToken; 29 | dispatch_once(&onceToken, ^{ 30 | method_exchangeImplementations(oldMethod, newMethod); 31 | }); 32 | } 33 | 34 | - (void)newViewWillAppear:(BOOL)animated{ 35 | if (self.navigationController.delegate == nil || [self.navigationController.delegate isKindOfClass:[SS_AnimationInteractiveTransition class]]) { 36 | self.navigationController.delegate = self.animationTransitionDelegate; 37 | } 38 | [self newViewWillAppear:animated]; 39 | } 40 | 41 | - (UIView *)SS_AnimationTransitionTargetView{ 42 | return nil; 43 | } 44 | 45 | 46 | - (void)ss_presentVC:(UIViewController *)viewController type:(KSS_AnimationTransitionType)type{ 47 | if (type == KAnimationTransitionTypeNone) { 48 | [self none_presentViewController:viewController]; 49 | }else if (type == KAnimationTransitionTypeSmooth) { 50 | [self smooth_presentViewController:viewController]; 51 | }else if (type == KAnimationTransitionTypeTikTokComment){ 52 | [self tikTokComment_presentViewController:viewController]; 53 | }else{ 54 | [self none_presentViewController:viewController]; 55 | } 56 | } 57 | 58 | - (void)none_presentViewController:(UIViewController *)viewController{ 59 | viewController.transitioningDelegate = nil; 60 | viewController.animationTransitionDelegate = nil; 61 | [self presentViewController:viewController animated:YES completion:nil]; 62 | } 63 | 64 | - (void)smooth_presentViewController:(UIViewController *)viewController{ 65 | self.animationTransitionDelegate = [[SS_AnimationInteractiveTransition alloc] init]; 66 | self.animationTransitionDelegate.type = KAnimationTransitionTypeSmooth; 67 | self.animationTransitionDelegate.targetView = viewController.view; //增加手势 68 | self.animationTransitionDelegate.navigationController = nil; //手势控制返回 69 | self.animationTransitionDelegate.currentViewController = viewController; //手势控制返回 70 | self.animationTransitionDelegate.isOpenPanGesture = NO; //开启滑动手势 71 | self.animationTransitionDelegate.directionStyle = DirectionStyleNone; //设置侧滑方向 72 | self.animationTransitionDelegate.isOpenScreenEdgePanGesture = YES; //开启侧滑返回,注意:手势重叠问题 73 | 74 | viewController.transitioningDelegate = self.animationTransitionDelegate; 75 | viewController.animationTransitionDelegate = self.animationTransitionDelegate; 76 | 77 | [self presentViewController:viewController animated:YES completion:nil]; 78 | } 79 | 80 | - (void)magicMove_presentViewController:(UIViewController *)viewController{ 81 | self.animationTransitionDelegate = [[SS_AnimationInteractiveTransition alloc] init]; 82 | self.animationTransitionDelegate.type = KAnimationTransitionTypeMagicMove; 83 | self.animationTransitionDelegate.targetView = viewController.view; //增加手势 84 | self.animationTransitionDelegate.navigationController = nil; //手势控制返回 85 | self.animationTransitionDelegate.currentViewController = viewController; //手势控制返回 86 | self.animationTransitionDelegate.isOpenPanGesture = YES; //开启滑动手势 87 | self.animationTransitionDelegate.directionStyle = DirectionStyleUp; //设置滑动手势方向 88 | self.animationTransitionDelegate.isOpenScreenEdgePanGesture = YES; //开启侧滑返回,注意:手势重叠问题 89 | 90 | viewController.transitioningDelegate = self.animationTransitionDelegate; 91 | viewController.animationTransitionDelegate = self.animationTransitionDelegate; 92 | 93 | [self presentViewController:viewController animated:YES completion:nil]; 94 | } 95 | 96 | - (void)tikTokComment_presentViewController:(UIViewController *)viewController{ 97 | self.animationTransitionDelegate = [[SS_AnimationInteractiveTransition alloc] init]; 98 | self.animationTransitionDelegate.type = KAnimationTransitionTypeTikTokComment; 99 | self.animationTransitionDelegate.targetView = nil; 100 | self.animationTransitionDelegate.navigationController = nil; //手势控制返回 101 | self.animationTransitionDelegate.currentViewController = viewController; //手势控制返回 102 | self.animationTransitionDelegate.isOpenPanGesture = YES; //开启滑动手势 103 | self.animationTransitionDelegate.directionStyle = DirectionStyleDown; //设置滑动手势方向 104 | self.animationTransitionDelegate.isOpenScreenEdgePanGesture = NO; //关闭侧滑返回,注意:手势重叠问题 105 | 106 | viewController.transitioningDelegate = self.animationTransitionDelegate; 107 | viewController.animationTransitionDelegate = self.animationTransitionDelegate; 108 | viewController.modalPresentationStyle = UIModalPresentationCustom; //custom下,dismiss时,fromView并未移除 109 | 110 | [self presentViewController:viewController animated:YES completion:nil]; 111 | } 112 | 113 | @end 114 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UITableViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "SS_AnimationTransition.h" 11 | #import "CommonMagicMoveAnimationViewController.h" 12 | #import "CommonSmoothViewController.h" 13 | #import "CommonTikTokCommentViewController.h" 14 | #import "CommonMaskViewController.h" 15 | 16 | @interface ViewController () 17 | 18 | @property (nonatomic,strong) NSMutableArray * animationStyleList; 19 | 20 | @end 21 | 22 | @implementation ViewController 23 | 24 | - (void)viewDidLoad { 25 | [super viewDidLoad]; 26 | 27 | self.title = @"DemoList"; 28 | self.animationStyleList = [@[@"神奇移动转场",@"平滑转场",@"高仿抖音的评论效果",@"mask转场动画"] mutableCopy]; 29 | } 30 | 31 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{ 32 | return 1; 33 | } 34 | 35 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ 36 | return self.animationStyleList.count; 37 | } 38 | 39 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ 40 | UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:nil]; 41 | cell.detailTextLabel.text = self.animationStyleList[indexPath.row]; 42 | return cell; 43 | } 44 | 45 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 46 | return 50.0f; 47 | } 48 | 49 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 50 | switch (indexPath.row) { 51 | case 0:{ 52 | CommonMagicMoveAnimationViewController * magicMoveVC = [[CommonMagicMoveAnimationViewController alloc] init]; 53 | [self.navigationController ss_pushViewController:magicMoveVC type:KAnimationTransitionTypeNone]; 54 | break; 55 | } 56 | case 1:{ 57 | CommonSmoothViewController * smoothVC = [[CommonSmoothViewController alloc] init]; 58 | [self.navigationController ss_pushViewController:smoothVC type:KAnimationTransitionTypeSmooth]; 59 | break; 60 | } 61 | case 2:{ 62 | CommonTikTokCommentViewController * commentVC = [[CommonTikTokCommentViewController alloc] init]; 63 | [self.navigationController ss_pushViewController:commentVC type:KAnimationTransitionTypeNone]; 64 | break; 65 | } 66 | case 3:{ 67 | CommonMaskViewController * maskVC = [[CommonMaskViewController alloc] init]; 68 | [self.navigationController ss_pushViewController:maskVC type:KAnimationTransitionTypeNone]; 69 | break; 70 | } 71 | default: 72 | break; 73 | } 74 | } 75 | 76 | - (UIView *)SS_AnimationTransitionTargetView{ 77 | return [UIView new]; 78 | } 79 | 80 | 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /AnimationTransitionDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AnimationTransitionDemo 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. 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 | -------------------------------------------------------------------------------- /AnimationTransitionDemoTests/AnimationTransitionDemoTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationTransitionDemoTests.m 3 | // AnimationTransitionDemoTests 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AnimationTransitionDemoTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AnimationTransitionDemoTests 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 | -------------------------------------------------------------------------------- /AnimationTransitionDemoTests/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 | -------------------------------------------------------------------------------- /AnimationTransitionDemoUITests/AnimationTransitionDemoUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationTransitionDemoUITests.m 3 | // AnimationTransitionDemoUITests 4 | // 5 | // Created by 宋澎 on 2018/7/13. 6 | // Copyright © 2018年 宋澎. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AnimationTransitionDemoUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation AnimationTransitionDemoUITests 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 | -------------------------------------------------------------------------------- /AnimationTransitionDemoUITests/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 | -------------------------------------------------------------------------------- /Gif/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/Gif/1.gif -------------------------------------------------------------------------------- /Gif/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/Gif/2.gif -------------------------------------------------------------------------------- /Gif/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/Gif/3.gif -------------------------------------------------------------------------------- /Gif/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JerryDream007/SS_AnimationTransition/ac04938f3ef7a6348f0dfc417961acfdf504fbd3/Gif/4.gif -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SS_AnimationTransition 2 | #### 一句话实现各种常见的转场动画 3 | #### 效果图如下,具体教程请看[简书](https://www.jianshu.com/p/669ee933da4b) 4 | ![神奇移动转场](https://github.com/308823810/AnimationTransitionDemo/blob/master/Gif/1.gif) 5 | ![平滑转场](https://github.com/308823810/AnimationTransitionDemo/blob/master/Gif/2.gif) 6 | ![抖音评论转场](https://github.com/308823810/AnimationTransitionDemo/blob/master/Gif/3.gif) 7 | ![mask转场](https://github.com/308823810/AnimationTransitionDemo/blob/master/Gif/4.gif) 8 | 9 | --------------------------------------------------------------------------------