├── .gitignore ├── 20180713145214.gif ├── HDHangzhouMuseum.xcodeproj └── project.pbxproj ├── HDHangzhouMuseum ├── AppDelegate │ ├── AppDelegate.h │ └── AppDelegate.m ├── Assets.xcassets │ ├── GuideService │ │ ├── Bamboo.imageset │ │ │ ├── Contents.json │ │ │ └── 竹子2.png │ │ ├── BambooLeaves.imageset │ │ │ ├── Contents.json │ │ │ └── 竹叶3.png │ │ ├── Boat.imageset │ │ │ ├── Contents.json │ │ │ └── 船.png │ │ ├── CloudBoat.imageset │ │ │ ├── Contents.json │ │ │ └── 云船.png │ │ ├── Contents.json │ │ └── GuideBtn.imageset │ │ │ ├── Contents.json │ │ │ └── 导览服务.png │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Collection │ │ ├── CollectionBtn.imageset │ │ │ ├── Contents.json │ │ │ └── 馆藏精品.png │ │ ├── Contents.json │ │ ├── CulturalRelic.imageset │ │ │ ├── Contents.json │ │ │ └── 文物.png │ │ └── Lotus.imageset │ │ │ ├── Contents.json │ │ │ └── 荷花.png │ ├── Contents.json │ ├── Introduce │ │ ├── Cherry.imageset │ │ │ ├── Contents.json │ │ │ └── 樱花.png │ │ ├── CherryPetals.imageset │ │ │ ├── Contents.json │ │ │ └── 樱花花瓣.png │ │ ├── Contents.json │ │ ├── IntroduceBtn.imageset │ │ │ ├── Contents.json │ │ │ └── 场馆简介.png │ │ └── pagoda.imageset │ │ │ ├── Contents.json │ │ │ └── 雷峰塔.png │ ├── Logo.imageset │ │ ├── Contents.json │ │ └── 杭州博物馆1.png │ ├── VisitRaiders │ │ ├── Contents.json │ │ ├── Painting.imageset │ │ │ ├── Contents.json │ │ │ └── 画轴.png │ │ ├── PlumFlower.imageset │ │ │ ├── Contents.json │ │ │ └── 梅花.png │ │ ├── PlumPetals.imageset │ │ │ ├── Contents.json │ │ │ └── 梅花ban1.png │ │ └── VisitBtn.imageset │ │ │ ├── Contents.json │ │ │ └── 参观攻略.png │ ├── leaves.imageset │ │ ├── Contents.json │ │ └── 竹叶3.png │ ├── rootImage.imageset │ │ ├── 5S尺寸.png │ │ └── Contents.json │ └── rootImage1.imageset │ │ ├── Contents.json │ │ └── 纯色背景异步.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Controllers │ ├── HDLaunchViewController.h │ ├── HDLaunchViewController.m │ ├── HDRootViewController.h │ ├── HDRootViewController.m │ ├── TestViewController.h │ └── TestViewController.m ├── Frameworks │ └── .gitkeep ├── General │ ├── UIButton+MyButton.h │ ├── UIButton+MyButton.m │ ├── UIImageView+MyImageView.h │ └── UIImageView+MyImageView.m ├── HDHangzhouMuseum-Prefix.pch ├── Info.plist ├── Model │ ├── Transition.h │ └── Transition.m ├── Resource │ └── butterfly.gif ├── View │ ├── GIFImageView.h │ ├── GIFImageView.m │ ├── ImageContentView.h │ └── ImageContentView.m └── main.m ├── HDHangzhouMuseumTests ├── HDHangzhouMuseumTests.m └── Info.plist ├── HDHangzhouMuseumUITests ├── HDHangzhouMuseumUITests.m └── Info.plist ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | ## Playgrounds 32 | timeline.xctimeline 33 | playground.xcworkspace 34 | 35 | # Swift Package Manager 36 | # 37 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 38 | # Packages/ 39 | # Package.pins 40 | # Package.resolved 41 | .build/ 42 | 43 | # CocoaPods 44 | # 45 | # We recommend against adding the Pods directory to your .gitignore. However 46 | # you should judge for yourself, the pros and cons are mentioned at: 47 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 48 | # 49 | # Pods/ 50 | 51 | # Carthage 52 | # 53 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 54 | # Carthage/Checkouts 55 | 56 | Carthage/Build 57 | 58 | # fastlane 59 | # 60 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 61 | # screenshots whenever they are needed. 62 | # For more information about the recommended setup visit: 63 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 64 | 65 | fastlane/report.xml 66 | fastlane/Preview.html 67 | fastlane/screenshots/**/*.png 68 | fastlane/test_output 69 | -------------------------------------------------------------------------------- /20180713145214.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/20180713145214.gif -------------------------------------------------------------------------------- /HDHangzhouMuseum.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 355CE8871CA387D1000F906F /* Transition.m in Sources */ = {isa = PBXBuildFile; fileRef = 355CE8861CA387D1000F906F /* Transition.m */; }; 11 | 35751C861C85724E001F0D8C /* UIImageView+MyImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 35751C851C85724E001F0D8C /* UIImageView+MyImageView.m */; }; 12 | 35751C891C8597D0001F0D8C /* UIButton+MyButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 35751C881C8597D0001F0D8C /* UIButton+MyButton.m */; }; 13 | FB5129131C7D488500844315 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FB5129031C7D488500844315 /* AppDelegate.m */; }; 14 | FB5129141C7D488500844315 /* HDLaunchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB5129061C7D488500844315 /* HDLaunchViewController.m */; }; 15 | FB5129151C7D488500844315 /* HDRootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB5129081C7D488500844315 /* HDRootViewController.m */; }; 16 | FB51291B1C7D4B7700844315 /* ImageContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = FB51291A1C7D4B7700844315 /* ImageContentView.m */; }; 17 | FB51291E1C7D72C700844315 /* GIFImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = FB51291D1C7D72C700844315 /* GIFImageView.m */; }; 18 | FB5129201C7D731100844315 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB51291F1C7D731100844315 /* QuartzCore.framework */; }; 19 | FB5129221C7D731B00844315 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB5129211C7D731B00844315 /* ImageIO.framework */; }; 20 | FB5129241C7D78A100844315 /* butterfly.gif in Resources */ = {isa = PBXBuildFile; fileRef = FB5129231C7D78A100844315 /* butterfly.gif */; }; 21 | FB58D7531C7EE5090065ED41 /* TestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FB58D7521C7EE5090065ED41 /* TestViewController.m */; }; 22 | FB5BDEEA1C7C0C5200BB2A60 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = FB5BDEE91C7C0C5200BB2A60 /* main.m */; }; 23 | FB5BDEF31C7C0C5200BB2A60 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FB5BDEF11C7C0C5200BB2A60 /* Main.storyboard */; }; 24 | FB5BDEF51C7C0C5200BB2A60 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FB5BDEF41C7C0C5200BB2A60 /* Assets.xcassets */; }; 25 | FB5BDEF81C7C0C5200BB2A60 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FB5BDEF61C7C0C5200BB2A60 /* LaunchScreen.storyboard */; }; 26 | FB5BDF031C7C0C5200BB2A60 /* HDHangzhouMuseumTests.m in Sources */ = {isa = PBXBuildFile; fileRef = FB5BDF021C7C0C5200BB2A60 /* HDHangzhouMuseumTests.m */; }; 27 | FB5BDF0E1C7C0C5200BB2A60 /* HDHangzhouMuseumUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = FB5BDF0D1C7C0C5200BB2A60 /* HDHangzhouMuseumUITests.m */; }; 28 | FB5BDF231C7C1F7000BB2A60 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB5BDF221C7C1F7000BB2A60 /* AVFoundation.framework */; }; 29 | FB5BDF251C7C271D00BB2A60 /* MediaPlayer.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FB5BDF241C7C271D00BB2A60 /* MediaPlayer.framework */; }; 30 | /* End PBXBuildFile section */ 31 | 32 | /* Begin PBXContainerItemProxy section */ 33 | FB5BDEFF1C7C0C5200BB2A60 /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = FB5BDEDD1C7C0C5200BB2A60 /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = FB5BDEE41C7C0C5200BB2A60; 38 | remoteInfo = HDHangzhouMuseum; 39 | }; 40 | FB5BDF0A1C7C0C5200BB2A60 /* PBXContainerItemProxy */ = { 41 | isa = PBXContainerItemProxy; 42 | containerPortal = FB5BDEDD1C7C0C5200BB2A60 /* Project object */; 43 | proxyType = 1; 44 | remoteGlobalIDString = FB5BDEE41C7C0C5200BB2A60; 45 | remoteInfo = HDHangzhouMuseum; 46 | }; 47 | /* End PBXContainerItemProxy section */ 48 | 49 | /* Begin PBXFileReference section */ 50 | 355CE8841CA387AD000F906F /* HDHangzhouMuseum-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "HDHangzhouMuseum-Prefix.pch"; sourceTree = ""; }; 51 | 355CE8851CA387D1000F906F /* Transition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Transition.h; sourceTree = ""; }; 52 | 355CE8861CA387D1000F906F /* Transition.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Transition.m; sourceTree = ""; }; 53 | 35751C841C85724E001F0D8C /* UIImageView+MyImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+MyImageView.h"; sourceTree = ""; }; 54 | 35751C851C85724E001F0D8C /* UIImageView+MyImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+MyImageView.m"; sourceTree = ""; }; 55 | 35751C871C8597D0001F0D8C /* UIButton+MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+MyButton.h"; sourceTree = ""; }; 56 | 35751C881C8597D0001F0D8C /* UIButton+MyButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+MyButton.m"; sourceTree = ""; }; 57 | FB5129021C7D488500844315 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 58 | FB5129031C7D488500844315 /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 59 | FB5129051C7D488500844315 /* HDLaunchViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDLaunchViewController.h; sourceTree = ""; }; 60 | FB5129061C7D488500844315 /* HDLaunchViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HDLaunchViewController.m; sourceTree = ""; }; 61 | FB5129071C7D488500844315 /* HDRootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HDRootViewController.h; sourceTree = ""; }; 62 | FB5129081C7D488500844315 /* HDRootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HDRootViewController.m; sourceTree = ""; }; 63 | FB5129191C7D4B7700844315 /* ImageContentView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageContentView.h; sourceTree = ""; }; 64 | FB51291A1C7D4B7700844315 /* ImageContentView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageContentView.m; sourceTree = ""; }; 65 | FB51291C1C7D72C700844315 /* GIFImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GIFImageView.h; sourceTree = ""; }; 66 | FB51291D1C7D72C700844315 /* GIFImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GIFImageView.m; sourceTree = ""; }; 67 | FB51291F1C7D731100844315 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; 68 | FB5129211C7D731B00844315 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; 69 | FB5129231C7D78A100844315 /* butterfly.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = butterfly.gif; sourceTree = ""; }; 70 | FB58D7511C7EE5090065ED41 /* TestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestViewController.h; sourceTree = ""; }; 71 | FB58D7521C7EE5090065ED41 /* TestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestViewController.m; sourceTree = ""; }; 72 | FB5BDEE51C7C0C5200BB2A60 /* HDHangzhouMuseum.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HDHangzhouMuseum.app; sourceTree = BUILT_PRODUCTS_DIR; }; 73 | FB5BDEE91C7C0C5200BB2A60 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 74 | FB5BDEF21C7C0C5200BB2A60 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 75 | FB5BDEF41C7C0C5200BB2A60 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 76 | FB5BDEF71C7C0C5200BB2A60 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 77 | FB5BDEF91C7C0C5200BB2A60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 78 | FB5BDEFE1C7C0C5200BB2A60 /* HDHangzhouMuseumTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HDHangzhouMuseumTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 79 | FB5BDF021C7C0C5200BB2A60 /* HDHangzhouMuseumTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDHangzhouMuseumTests.m; sourceTree = ""; }; 80 | FB5BDF041C7C0C5200BB2A60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 81 | FB5BDF091C7C0C5200BB2A60 /* HDHangzhouMuseumUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HDHangzhouMuseumUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 82 | FB5BDF0D1C7C0C5200BB2A60 /* HDHangzhouMuseumUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HDHangzhouMuseumUITests.m; sourceTree = ""; }; 83 | FB5BDF0F1C7C0C5200BB2A60 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 84 | FB5BDF221C7C1F7000BB2A60 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; 85 | FB5BDF241C7C271D00BB2A60 /* MediaPlayer.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MediaPlayer.framework; path = System/Library/Frameworks/MediaPlayer.framework; sourceTree = SDKROOT; }; 86 | /* End PBXFileReference section */ 87 | 88 | /* Begin PBXFrameworksBuildPhase section */ 89 | FB5BDEE21C7C0C5200BB2A60 /* Frameworks */ = { 90 | isa = PBXFrameworksBuildPhase; 91 | buildActionMask = 2147483647; 92 | files = ( 93 | FB5129221C7D731B00844315 /* ImageIO.framework in Frameworks */, 94 | FB5129201C7D731100844315 /* QuartzCore.framework in Frameworks */, 95 | FB5BDF251C7C271D00BB2A60 /* MediaPlayer.framework in Frameworks */, 96 | FB5BDF231C7C1F7000BB2A60 /* AVFoundation.framework in Frameworks */, 97 | ); 98 | runOnlyForDeploymentPostprocessing = 0; 99 | }; 100 | FB5BDEFB1C7C0C5200BB2A60 /* Frameworks */ = { 101 | isa = PBXFrameworksBuildPhase; 102 | buildActionMask = 2147483647; 103 | files = ( 104 | ); 105 | runOnlyForDeploymentPostprocessing = 0; 106 | }; 107 | FB5BDF061C7C0C5200BB2A60 /* Frameworks */ = { 108 | isa = PBXFrameworksBuildPhase; 109 | buildActionMask = 2147483647; 110 | files = ( 111 | ); 112 | runOnlyForDeploymentPostprocessing = 0; 113 | }; 114 | /* End PBXFrameworksBuildPhase section */ 115 | 116 | /* Begin PBXGroup section */ 117 | 355CE8881CA387DB000F906F /* Frameworks */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | FB5129211C7D731B00844315 /* ImageIO.framework */, 121 | FB51291F1C7D731100844315 /* QuartzCore.framework */, 122 | FB5BDF241C7C271D00BB2A60 /* MediaPlayer.framework */, 123 | FB5BDF221C7C1F7000BB2A60 /* AVFoundation.framework */, 124 | ); 125 | path = Frameworks; 126 | sourceTree = ""; 127 | }; 128 | FB5129011C7D488500844315 /* AppDelegate */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | FB5129021C7D488500844315 /* AppDelegate.h */, 132 | FB5129031C7D488500844315 /* AppDelegate.m */, 133 | ); 134 | path = AppDelegate; 135 | sourceTree = ""; 136 | }; 137 | FB5129041C7D488500844315 /* Controllers */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | FB5129051C7D488500844315 /* HDLaunchViewController.h */, 141 | FB5129061C7D488500844315 /* HDLaunchViewController.m */, 142 | FB5129071C7D488500844315 /* HDRootViewController.h */, 143 | FB5129081C7D488500844315 /* HDRootViewController.m */, 144 | FB58D7511C7EE5090065ED41 /* TestViewController.h */, 145 | FB58D7521C7EE5090065ED41 /* TestViewController.m */, 146 | ); 147 | path = Controllers; 148 | sourceTree = ""; 149 | }; 150 | FB5129091C7D488500844315 /* General */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | 35751C841C85724E001F0D8C /* UIImageView+MyImageView.h */, 154 | 35751C851C85724E001F0D8C /* UIImageView+MyImageView.m */, 155 | 35751C871C8597D0001F0D8C /* UIButton+MyButton.h */, 156 | 35751C881C8597D0001F0D8C /* UIButton+MyButton.m */, 157 | ); 158 | path = General; 159 | sourceTree = ""; 160 | }; 161 | FB51290F1C7D488500844315 /* Model */ = { 162 | isa = PBXGroup; 163 | children = ( 164 | 355CE8851CA387D1000F906F /* Transition.h */, 165 | 355CE8861CA387D1000F906F /* Transition.m */, 166 | ); 167 | path = Model; 168 | sourceTree = ""; 169 | }; 170 | FB5129101C7D488500844315 /* Resource */ = { 171 | isa = PBXGroup; 172 | children = ( 173 | FB5129231C7D78A100844315 /* butterfly.gif */, 174 | ); 175 | path = Resource; 176 | sourceTree = ""; 177 | }; 178 | FB5129121C7D488500844315 /* View */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | FB5129191C7D4B7700844315 /* ImageContentView.h */, 182 | FB51291A1C7D4B7700844315 /* ImageContentView.m */, 183 | FB51291C1C7D72C700844315 /* GIFImageView.h */, 184 | FB51291D1C7D72C700844315 /* GIFImageView.m */, 185 | ); 186 | path = View; 187 | sourceTree = ""; 188 | }; 189 | FB5BDEDC1C7C0C5200BB2A60 = { 190 | isa = PBXGroup; 191 | children = ( 192 | FB5BDEE71C7C0C5200BB2A60 /* HDHangzhouMuseum */, 193 | FB5BDF011C7C0C5200BB2A60 /* HDHangzhouMuseumTests */, 194 | FB5BDF0C1C7C0C5200BB2A60 /* HDHangzhouMuseumUITests */, 195 | FB5BDEE61C7C0C5200BB2A60 /* Products */, 196 | ); 197 | sourceTree = ""; 198 | }; 199 | FB5BDEE61C7C0C5200BB2A60 /* Products */ = { 200 | isa = PBXGroup; 201 | children = ( 202 | FB5BDEE51C7C0C5200BB2A60 /* HDHangzhouMuseum.app */, 203 | FB5BDEFE1C7C0C5200BB2A60 /* HDHangzhouMuseumTests.xctest */, 204 | FB5BDF091C7C0C5200BB2A60 /* HDHangzhouMuseumUITests.xctest */, 205 | ); 206 | name = Products; 207 | sourceTree = ""; 208 | }; 209 | FB5BDEE71C7C0C5200BB2A60 /* HDHangzhouMuseum */ = { 210 | isa = PBXGroup; 211 | children = ( 212 | FB5129011C7D488500844315 /* AppDelegate */, 213 | FB5129041C7D488500844315 /* Controllers */, 214 | FB5129121C7D488500844315 /* View */, 215 | FB5129091C7D488500844315 /* General */, 216 | FB51290F1C7D488500844315 /* Model */, 217 | FB5129101C7D488500844315 /* Resource */, 218 | 355CE8881CA387DB000F906F /* Frameworks */, 219 | FB5BDEF11C7C0C5200BB2A60 /* Main.storyboard */, 220 | FB5BDEF41C7C0C5200BB2A60 /* Assets.xcassets */, 221 | FB5BDEF61C7C0C5200BB2A60 /* LaunchScreen.storyboard */, 222 | FB5BDEF91C7C0C5200BB2A60 /* Info.plist */, 223 | 355CE8841CA387AD000F906F /* HDHangzhouMuseum-Prefix.pch */, 224 | FB5BDEE81C7C0C5200BB2A60 /* Supporting Files */, 225 | ); 226 | path = HDHangzhouMuseum; 227 | sourceTree = ""; 228 | }; 229 | FB5BDEE81C7C0C5200BB2A60 /* Supporting Files */ = { 230 | isa = PBXGroup; 231 | children = ( 232 | FB5BDEE91C7C0C5200BB2A60 /* main.m */, 233 | ); 234 | name = "Supporting Files"; 235 | sourceTree = ""; 236 | }; 237 | FB5BDF011C7C0C5200BB2A60 /* HDHangzhouMuseumTests */ = { 238 | isa = PBXGroup; 239 | children = ( 240 | FB5BDF021C7C0C5200BB2A60 /* HDHangzhouMuseumTests.m */, 241 | FB5BDF041C7C0C5200BB2A60 /* Info.plist */, 242 | ); 243 | path = HDHangzhouMuseumTests; 244 | sourceTree = ""; 245 | }; 246 | FB5BDF0C1C7C0C5200BB2A60 /* HDHangzhouMuseumUITests */ = { 247 | isa = PBXGroup; 248 | children = ( 249 | FB5BDF0D1C7C0C5200BB2A60 /* HDHangzhouMuseumUITests.m */, 250 | FB5BDF0F1C7C0C5200BB2A60 /* Info.plist */, 251 | ); 252 | path = HDHangzhouMuseumUITests; 253 | sourceTree = ""; 254 | }; 255 | /* End PBXGroup section */ 256 | 257 | /* Begin PBXNativeTarget section */ 258 | FB5BDEE41C7C0C5200BB2A60 /* HDHangzhouMuseum */ = { 259 | isa = PBXNativeTarget; 260 | buildConfigurationList = FB5BDF121C7C0C5200BB2A60 /* Build configuration list for PBXNativeTarget "HDHangzhouMuseum" */; 261 | buildPhases = ( 262 | FB5BDEE11C7C0C5200BB2A60 /* Sources */, 263 | FB5BDEE21C7C0C5200BB2A60 /* Frameworks */, 264 | FB5BDEE31C7C0C5200BB2A60 /* Resources */, 265 | ); 266 | buildRules = ( 267 | ); 268 | dependencies = ( 269 | ); 270 | name = HDHangzhouMuseum; 271 | productName = HDHangzhouMuseum; 272 | productReference = FB5BDEE51C7C0C5200BB2A60 /* HDHangzhouMuseum.app */; 273 | productType = "com.apple.product-type.application"; 274 | }; 275 | FB5BDEFD1C7C0C5200BB2A60 /* HDHangzhouMuseumTests */ = { 276 | isa = PBXNativeTarget; 277 | buildConfigurationList = FB5BDF151C7C0C5200BB2A60 /* Build configuration list for PBXNativeTarget "HDHangzhouMuseumTests" */; 278 | buildPhases = ( 279 | FB5BDEFA1C7C0C5200BB2A60 /* Sources */, 280 | FB5BDEFB1C7C0C5200BB2A60 /* Frameworks */, 281 | FB5BDEFC1C7C0C5200BB2A60 /* Resources */, 282 | ); 283 | buildRules = ( 284 | ); 285 | dependencies = ( 286 | FB5BDF001C7C0C5200BB2A60 /* PBXTargetDependency */, 287 | ); 288 | name = HDHangzhouMuseumTests; 289 | productName = HDHangzhouMuseumTests; 290 | productReference = FB5BDEFE1C7C0C5200BB2A60 /* HDHangzhouMuseumTests.xctest */; 291 | productType = "com.apple.product-type.bundle.unit-test"; 292 | }; 293 | FB5BDF081C7C0C5200BB2A60 /* HDHangzhouMuseumUITests */ = { 294 | isa = PBXNativeTarget; 295 | buildConfigurationList = FB5BDF181C7C0C5200BB2A60 /* Build configuration list for PBXNativeTarget "HDHangzhouMuseumUITests" */; 296 | buildPhases = ( 297 | FB5BDF051C7C0C5200BB2A60 /* Sources */, 298 | FB5BDF061C7C0C5200BB2A60 /* Frameworks */, 299 | FB5BDF071C7C0C5200BB2A60 /* Resources */, 300 | ); 301 | buildRules = ( 302 | ); 303 | dependencies = ( 304 | FB5BDF0B1C7C0C5200BB2A60 /* PBXTargetDependency */, 305 | ); 306 | name = HDHangzhouMuseumUITests; 307 | productName = HDHangzhouMuseumUITests; 308 | productReference = FB5BDF091C7C0C5200BB2A60 /* HDHangzhouMuseumUITests.xctest */; 309 | productType = "com.apple.product-type.bundle.ui-testing"; 310 | }; 311 | /* End PBXNativeTarget section */ 312 | 313 | /* Begin PBXProject section */ 314 | FB5BDEDD1C7C0C5200BB2A60 /* Project object */ = { 315 | isa = PBXProject; 316 | attributes = { 317 | LastUpgradeCheck = 0720; 318 | ORGANIZATIONNAME = liuyi; 319 | TargetAttributes = { 320 | FB5BDEE41C7C0C5200BB2A60 = { 321 | CreatedOnToolsVersion = 7.2.1; 322 | DevelopmentTeam = B5K9YR6DRJ; 323 | SystemCapabilities = { 324 | com.apple.BackgroundModes = { 325 | enabled = 0; 326 | }; 327 | com.apple.iCloud = { 328 | enabled = 0; 329 | }; 330 | }; 331 | }; 332 | FB5BDEFD1C7C0C5200BB2A60 = { 333 | CreatedOnToolsVersion = 7.2.1; 334 | TestTargetID = FB5BDEE41C7C0C5200BB2A60; 335 | }; 336 | FB5BDF081C7C0C5200BB2A60 = { 337 | CreatedOnToolsVersion = 7.2.1; 338 | TestTargetID = FB5BDEE41C7C0C5200BB2A60; 339 | }; 340 | }; 341 | }; 342 | buildConfigurationList = FB5BDEE01C7C0C5200BB2A60 /* Build configuration list for PBXProject "HDHangzhouMuseum" */; 343 | compatibilityVersion = "Xcode 3.2"; 344 | developmentRegion = English; 345 | hasScannedForEncodings = 0; 346 | knownRegions = ( 347 | en, 348 | Base, 349 | ); 350 | mainGroup = FB5BDEDC1C7C0C5200BB2A60; 351 | productRefGroup = FB5BDEE61C7C0C5200BB2A60 /* Products */; 352 | projectDirPath = ""; 353 | projectRoot = ""; 354 | targets = ( 355 | FB5BDEE41C7C0C5200BB2A60 /* HDHangzhouMuseum */, 356 | FB5BDEFD1C7C0C5200BB2A60 /* HDHangzhouMuseumTests */, 357 | FB5BDF081C7C0C5200BB2A60 /* HDHangzhouMuseumUITests */, 358 | ); 359 | }; 360 | /* End PBXProject section */ 361 | 362 | /* Begin PBXResourcesBuildPhase section */ 363 | FB5BDEE31C7C0C5200BB2A60 /* Resources */ = { 364 | isa = PBXResourcesBuildPhase; 365 | buildActionMask = 2147483647; 366 | files = ( 367 | FB5129241C7D78A100844315 /* butterfly.gif in Resources */, 368 | FB5BDEF81C7C0C5200BB2A60 /* LaunchScreen.storyboard in Resources */, 369 | FB5BDEF51C7C0C5200BB2A60 /* Assets.xcassets in Resources */, 370 | FB5BDEF31C7C0C5200BB2A60 /* Main.storyboard in Resources */, 371 | ); 372 | runOnlyForDeploymentPostprocessing = 0; 373 | }; 374 | FB5BDEFC1C7C0C5200BB2A60 /* Resources */ = { 375 | isa = PBXResourcesBuildPhase; 376 | buildActionMask = 2147483647; 377 | files = ( 378 | ); 379 | runOnlyForDeploymentPostprocessing = 0; 380 | }; 381 | FB5BDF071C7C0C5200BB2A60 /* Resources */ = { 382 | isa = PBXResourcesBuildPhase; 383 | buildActionMask = 2147483647; 384 | files = ( 385 | ); 386 | runOnlyForDeploymentPostprocessing = 0; 387 | }; 388 | /* End PBXResourcesBuildPhase section */ 389 | 390 | /* Begin PBXSourcesBuildPhase section */ 391 | FB5BDEE11C7C0C5200BB2A60 /* Sources */ = { 392 | isa = PBXSourcesBuildPhase; 393 | buildActionMask = 2147483647; 394 | files = ( 395 | FB5129151C7D488500844315 /* HDRootViewController.m in Sources */, 396 | 355CE8871CA387D1000F906F /* Transition.m in Sources */, 397 | FB5129141C7D488500844315 /* HDLaunchViewController.m in Sources */, 398 | FB51291B1C7D4B7700844315 /* ImageContentView.m in Sources */, 399 | 35751C891C8597D0001F0D8C /* UIButton+MyButton.m in Sources */, 400 | 35751C861C85724E001F0D8C /* UIImageView+MyImageView.m in Sources */, 401 | FB5129131C7D488500844315 /* AppDelegate.m in Sources */, 402 | FB5BDEEA1C7C0C5200BB2A60 /* main.m in Sources */, 403 | FB58D7531C7EE5090065ED41 /* TestViewController.m in Sources */, 404 | FB51291E1C7D72C700844315 /* GIFImageView.m in Sources */, 405 | ); 406 | runOnlyForDeploymentPostprocessing = 0; 407 | }; 408 | FB5BDEFA1C7C0C5200BB2A60 /* Sources */ = { 409 | isa = PBXSourcesBuildPhase; 410 | buildActionMask = 2147483647; 411 | files = ( 412 | FB5BDF031C7C0C5200BB2A60 /* HDHangzhouMuseumTests.m in Sources */, 413 | ); 414 | runOnlyForDeploymentPostprocessing = 0; 415 | }; 416 | FB5BDF051C7C0C5200BB2A60 /* Sources */ = { 417 | isa = PBXSourcesBuildPhase; 418 | buildActionMask = 2147483647; 419 | files = ( 420 | FB5BDF0E1C7C0C5200BB2A60 /* HDHangzhouMuseumUITests.m in Sources */, 421 | ); 422 | runOnlyForDeploymentPostprocessing = 0; 423 | }; 424 | /* End PBXSourcesBuildPhase section */ 425 | 426 | /* Begin PBXTargetDependency section */ 427 | FB5BDF001C7C0C5200BB2A60 /* PBXTargetDependency */ = { 428 | isa = PBXTargetDependency; 429 | target = FB5BDEE41C7C0C5200BB2A60 /* HDHangzhouMuseum */; 430 | targetProxy = FB5BDEFF1C7C0C5200BB2A60 /* PBXContainerItemProxy */; 431 | }; 432 | FB5BDF0B1C7C0C5200BB2A60 /* PBXTargetDependency */ = { 433 | isa = PBXTargetDependency; 434 | target = FB5BDEE41C7C0C5200BB2A60 /* HDHangzhouMuseum */; 435 | targetProxy = FB5BDF0A1C7C0C5200BB2A60 /* PBXContainerItemProxy */; 436 | }; 437 | /* End PBXTargetDependency section */ 438 | 439 | /* Begin PBXVariantGroup section */ 440 | FB5BDEF11C7C0C5200BB2A60 /* Main.storyboard */ = { 441 | isa = PBXVariantGroup; 442 | children = ( 443 | FB5BDEF21C7C0C5200BB2A60 /* Base */, 444 | ); 445 | name = Main.storyboard; 446 | sourceTree = ""; 447 | }; 448 | FB5BDEF61C7C0C5200BB2A60 /* LaunchScreen.storyboard */ = { 449 | isa = PBXVariantGroup; 450 | children = ( 451 | FB5BDEF71C7C0C5200BB2A60 /* Base */, 452 | ); 453 | name = LaunchScreen.storyboard; 454 | sourceTree = ""; 455 | }; 456 | /* End PBXVariantGroup section */ 457 | 458 | /* Begin XCBuildConfiguration section */ 459 | FB5BDF101C7C0C5200BB2A60 /* Debug */ = { 460 | isa = XCBuildConfiguration; 461 | buildSettings = { 462 | ALWAYS_SEARCH_USER_PATHS = NO; 463 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 464 | CLANG_CXX_LIBRARY = "libc++"; 465 | CLANG_ENABLE_MODULES = YES; 466 | CLANG_ENABLE_OBJC_ARC = YES; 467 | CLANG_WARN_BOOL_CONVERSION = YES; 468 | CLANG_WARN_CONSTANT_CONVERSION = YES; 469 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 470 | CLANG_WARN_EMPTY_BODY = YES; 471 | CLANG_WARN_ENUM_CONVERSION = YES; 472 | CLANG_WARN_INT_CONVERSION = YES; 473 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 474 | CLANG_WARN_UNREACHABLE_CODE = YES; 475 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 476 | CODE_SIGN_ENTITLEMENTS = HDHangzhouMuseum/HDHangzhouMuseum.entitlements; 477 | CODE_SIGN_IDENTITY = "iPhone Developer: Li Shijieli (QBT3QBDDTY)"; 478 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Li Shijieli (QBT3QBDDTY)"; 479 | COPY_PHASE_STRIP = NO; 480 | DEBUG_INFORMATION_FORMAT = dwarf; 481 | ENABLE_STRICT_OBJC_MSGSEND = YES; 482 | ENABLE_TESTABILITY = YES; 483 | GCC_C_LANGUAGE_STANDARD = gnu99; 484 | GCC_DYNAMIC_NO_PIC = NO; 485 | GCC_NO_COMMON_BLOCKS = YES; 486 | GCC_OPTIMIZATION_LEVEL = 0; 487 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 488 | GCC_PREFIX_HEADER = "HDHangzhouMuseum/Macro/HDHangzhouMuseum-Prefix.pch"; 489 | GCC_PREPROCESSOR_DEFINITIONS = ( 490 | "DEBUG=1", 491 | "$(inherited)", 492 | ); 493 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 494 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 495 | GCC_WARN_UNDECLARED_SELECTOR = YES; 496 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 497 | GCC_WARN_UNUSED_FUNCTION = YES; 498 | GCC_WARN_UNUSED_VARIABLE = YES; 499 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 500 | MTL_ENABLE_DEBUG_INFO = YES; 501 | ONLY_ACTIVE_ARCH = YES; 502 | PROVISIONING_PROFILE = "65ab0996-e394-4c5b-bf41-eead5c273fa4"; 503 | SDKROOT = iphoneos; 504 | TARGETED_DEVICE_FAMILY = "1,2"; 505 | }; 506 | name = Debug; 507 | }; 508 | FB5BDF111C7C0C5200BB2A60 /* Release */ = { 509 | isa = XCBuildConfiguration; 510 | buildSettings = { 511 | ALWAYS_SEARCH_USER_PATHS = NO; 512 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 513 | CLANG_CXX_LIBRARY = "libc++"; 514 | CLANG_ENABLE_MODULES = YES; 515 | CLANG_ENABLE_OBJC_ARC = YES; 516 | CLANG_WARN_BOOL_CONVERSION = YES; 517 | CLANG_WARN_CONSTANT_CONVERSION = YES; 518 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 519 | CLANG_WARN_EMPTY_BODY = YES; 520 | CLANG_WARN_ENUM_CONVERSION = YES; 521 | CLANG_WARN_INT_CONVERSION = YES; 522 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 523 | CLANG_WARN_UNREACHABLE_CODE = YES; 524 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 525 | CODE_SIGN_ENTITLEMENTS = HDHangzhouMuseum/HDHangzhouMuseum.entitlements; 526 | CODE_SIGN_IDENTITY = "iPhone Developer: Li Shijieli (QBT3QBDDTY)"; 527 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Li Shijieli (QBT3QBDDTY)"; 528 | COPY_PHASE_STRIP = NO; 529 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 530 | ENABLE_NS_ASSERTIONS = NO; 531 | ENABLE_STRICT_OBJC_MSGSEND = YES; 532 | GCC_C_LANGUAGE_STANDARD = gnu99; 533 | GCC_NO_COMMON_BLOCKS = YES; 534 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 535 | GCC_PREFIX_HEADER = "HDHangzhouMuseum/Macro/HDHangzhouMuseum-Prefix.pch"; 536 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 537 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 538 | GCC_WARN_UNDECLARED_SELECTOR = YES; 539 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 540 | GCC_WARN_UNUSED_FUNCTION = YES; 541 | GCC_WARN_UNUSED_VARIABLE = YES; 542 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 543 | MTL_ENABLE_DEBUG_INFO = NO; 544 | PROVISIONING_PROFILE = "65ab0996-e394-4c5b-bf41-eead5c273fa4"; 545 | SDKROOT = iphoneos; 546 | TARGETED_DEVICE_FAMILY = "1,2"; 547 | VALIDATE_PRODUCT = YES; 548 | }; 549 | name = Release; 550 | }; 551 | FB5BDF131C7C0C5200BB2A60 /* Debug */ = { 552 | isa = XCBuildConfiguration; 553 | buildSettings = { 554 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 555 | CODE_SIGN_ENTITLEMENTS = ""; 556 | CODE_SIGN_IDENTITY = "iPhone Developer"; 557 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 558 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 559 | GCC_PREFIX_HEADER = "HDHangzhouMuseum/HDHangzhouMuseum-Prefix.pch"; 560 | INFOPLIST_FILE = HDHangzhouMuseum/Info.plist; 561 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 562 | PRODUCT_BUNDLE_IDENTIFIER = hengdawb.HDHangzhouMuseum; 563 | PRODUCT_NAME = "$(TARGET_NAME)"; 564 | PROVISIONING_PROFILE = ""; 565 | }; 566 | name = Debug; 567 | }; 568 | FB5BDF141C7C0C5200BB2A60 /* Release */ = { 569 | isa = XCBuildConfiguration; 570 | buildSettings = { 571 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 572 | CODE_SIGN_ENTITLEMENTS = ""; 573 | CODE_SIGN_IDENTITY = "iPhone Developer"; 574 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 575 | GCC_PREFIX_HEADER = "HDHangzhouMuseum/HDHangzhouMuseum-Prefix.pch"; 576 | INFOPLIST_FILE = HDHangzhouMuseum/Info.plist; 577 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 578 | PRODUCT_BUNDLE_IDENTIFIER = hengdawb.HDHangzhouMuseum; 579 | PRODUCT_NAME = "$(TARGET_NAME)"; 580 | PROVISIONING_PROFILE = ""; 581 | }; 582 | name = Release; 583 | }; 584 | FB5BDF161C7C0C5200BB2A60 /* Debug */ = { 585 | isa = XCBuildConfiguration; 586 | buildSettings = { 587 | BUNDLE_LOADER = "$(TEST_HOST)"; 588 | INFOPLIST_FILE = HDHangzhouMuseumTests/Info.plist; 589 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 590 | PRODUCT_BUNDLE_IDENTIFIER = hengdawb.HDHangzhouMuseumTests; 591 | PRODUCT_NAME = "$(TARGET_NAME)"; 592 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HDHangzhouMuseum.app/HDHangzhouMuseum"; 593 | }; 594 | name = Debug; 595 | }; 596 | FB5BDF171C7C0C5200BB2A60 /* Release */ = { 597 | isa = XCBuildConfiguration; 598 | buildSettings = { 599 | BUNDLE_LOADER = "$(TEST_HOST)"; 600 | INFOPLIST_FILE = HDHangzhouMuseumTests/Info.plist; 601 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 602 | PRODUCT_BUNDLE_IDENTIFIER = hengdawb.HDHangzhouMuseumTests; 603 | PRODUCT_NAME = "$(TARGET_NAME)"; 604 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/HDHangzhouMuseum.app/HDHangzhouMuseum"; 605 | }; 606 | name = Release; 607 | }; 608 | FB5BDF191C7C0C5200BB2A60 /* Debug */ = { 609 | isa = XCBuildConfiguration; 610 | buildSettings = { 611 | INFOPLIST_FILE = HDHangzhouMuseumUITests/Info.plist; 612 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 613 | PRODUCT_BUNDLE_IDENTIFIER = hengdawb.HDHangzhouMuseumUITests; 614 | PRODUCT_NAME = "$(TARGET_NAME)"; 615 | TEST_TARGET_NAME = HDHangzhouMuseum; 616 | USES_XCTRUNNER = YES; 617 | }; 618 | name = Debug; 619 | }; 620 | FB5BDF1A1C7C0C5200BB2A60 /* Release */ = { 621 | isa = XCBuildConfiguration; 622 | buildSettings = { 623 | INFOPLIST_FILE = HDHangzhouMuseumUITests/Info.plist; 624 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 625 | PRODUCT_BUNDLE_IDENTIFIER = hengdawb.HDHangzhouMuseumUITests; 626 | PRODUCT_NAME = "$(TARGET_NAME)"; 627 | TEST_TARGET_NAME = HDHangzhouMuseum; 628 | USES_XCTRUNNER = YES; 629 | }; 630 | name = Release; 631 | }; 632 | /* End XCBuildConfiguration section */ 633 | 634 | /* Begin XCConfigurationList section */ 635 | FB5BDEE01C7C0C5200BB2A60 /* Build configuration list for PBXProject "HDHangzhouMuseum" */ = { 636 | isa = XCConfigurationList; 637 | buildConfigurations = ( 638 | FB5BDF101C7C0C5200BB2A60 /* Debug */, 639 | FB5BDF111C7C0C5200BB2A60 /* Release */, 640 | ); 641 | defaultConfigurationIsVisible = 0; 642 | defaultConfigurationName = Release; 643 | }; 644 | FB5BDF121C7C0C5200BB2A60 /* Build configuration list for PBXNativeTarget "HDHangzhouMuseum" */ = { 645 | isa = XCConfigurationList; 646 | buildConfigurations = ( 647 | FB5BDF131C7C0C5200BB2A60 /* Debug */, 648 | FB5BDF141C7C0C5200BB2A60 /* Release */, 649 | ); 650 | defaultConfigurationIsVisible = 0; 651 | defaultConfigurationName = Release; 652 | }; 653 | FB5BDF151C7C0C5200BB2A60 /* Build configuration list for PBXNativeTarget "HDHangzhouMuseumTests" */ = { 654 | isa = XCConfigurationList; 655 | buildConfigurations = ( 656 | FB5BDF161C7C0C5200BB2A60 /* Debug */, 657 | FB5BDF171C7C0C5200BB2A60 /* Release */, 658 | ); 659 | defaultConfigurationIsVisible = 0; 660 | defaultConfigurationName = Release; 661 | }; 662 | FB5BDF181C7C0C5200BB2A60 /* Build configuration list for PBXNativeTarget "HDHangzhouMuseumUITests" */ = { 663 | isa = XCConfigurationList; 664 | buildConfigurations = ( 665 | FB5BDF191C7C0C5200BB2A60 /* Debug */, 666 | FB5BDF1A1C7C0C5200BB2A60 /* Release */, 667 | ); 668 | defaultConfigurationIsVisible = 0; 669 | defaultConfigurationName = Release; 670 | }; 671 | /* End XCConfigurationList section */ 672 | }; 673 | rootObject = FB5BDEDD1C7C0C5200BB2A60 /* Project object */; 674 | } 675 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/AppDelegate/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @property float autoSizeScaleX; 16 | 17 | @property float autoSizeScaleY; 18 | 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/AppDelegate/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. 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 | [application setStatusBarHidden:YES]; 21 | 22 | AppDelegate *myDelegate = [[UIApplication sharedApplication] delegate]; 23 | //以4.0为基础,设置比例进行适配 24 | if (ScreenHeight > 480 ) { 25 | 26 | myDelegate.autoSizeScaleX = ScreenWidth / 320; 27 | myDelegate.autoSizeScaleY = ScreenHeight / 568; 28 | 29 | }else 30 | { 31 | myDelegate.autoSizeScaleX = 1.0; 32 | myDelegate.autoSizeScaleY = 1.0; 33 | 34 | } 35 | 36 | 37 | return YES; 38 | } 39 | 40 | 41 | - (void)applicationWillResignActive:(UIApplication *)application { 42 | // 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. 43 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 44 | } 45 | 46 | - (void)applicationDidEnterBackground:(UIApplication *)application { 47 | // 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. 48 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 49 | } 50 | 51 | - (void)applicationWillEnterForeground:(UIApplication *)application { 52 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 53 | } 54 | 55 | - (void)applicationDidBecomeActive:(UIApplication *)application { 56 | // 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. 57 | } 58 | 59 | - (void)applicationWillTerminate:(UIApplication *)application { 60 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 61 | } 62 | 63 | @end 64 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/Bamboo.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" : "竹子2.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/Bamboo.imageset/竹子2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/ GuideService/Bamboo.imageset/竹子2.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/BambooLeaves.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" : "竹叶3.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/BambooLeaves.imageset/竹叶3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/ GuideService/BambooLeaves.imageset/竹叶3.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/Boat.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" : "船.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/Boat.imageset/船.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/ GuideService/Boat.imageset/船.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/CloudBoat.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" : "云船.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/CloudBoat.imageset/云船.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/ GuideService/CloudBoat.imageset/云船.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/GuideBtn.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" : "导览服务.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/ GuideService/GuideBtn.imageset/导览服务.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/ GuideService/GuideBtn.imageset/导览服务.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/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 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Collection/CollectionBtn.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" : "馆藏精品.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Collection/CollectionBtn.imageset/馆藏精品.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/Collection/CollectionBtn.imageset/馆藏精品.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Collection/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Collection/CulturalRelic.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" : "文物.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Collection/CulturalRelic.imageset/文物.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/Collection/CulturalRelic.imageset/文物.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Collection/Lotus.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" : "荷花.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Collection/Lotus.imageset/荷花.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/Collection/Lotus.imageset/荷花.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Introduce/Cherry.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" : "樱花.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Introduce/Cherry.imageset/樱花.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/Introduce/Cherry.imageset/樱花.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Introduce/CherryPetals.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" : "樱花花瓣.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Introduce/CherryPetals.imageset/樱花花瓣.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/Introduce/CherryPetals.imageset/樱花花瓣.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Introduce/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Introduce/IntroduceBtn.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" : "场馆简介.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Introduce/IntroduceBtn.imageset/场馆简介.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/Introduce/IntroduceBtn.imageset/场馆简介.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Introduce/pagoda.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" : "雷峰塔.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Introduce/pagoda.imageset/雷峰塔.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/Introduce/pagoda.imageset/雷峰塔.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Logo.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" : "杭州博物馆1.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/Logo.imageset/杭州博物馆1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/Logo.imageset/杭州博物馆1.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/VisitRaiders/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/VisitRaiders/Painting.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" : "画轴.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/VisitRaiders/Painting.imageset/画轴.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/VisitRaiders/Painting.imageset/画轴.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/VisitRaiders/PlumFlower.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" : "梅花.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/VisitRaiders/PlumFlower.imageset/梅花.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/VisitRaiders/PlumFlower.imageset/梅花.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/VisitRaiders/PlumPetals.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" : "梅花ban1.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/VisitRaiders/PlumPetals.imageset/梅花ban1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/VisitRaiders/PlumPetals.imageset/梅花ban1.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/VisitRaiders/VisitBtn.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" : "参观攻略.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/VisitRaiders/VisitBtn.imageset/参观攻略.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/VisitRaiders/VisitBtn.imageset/参观攻略.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/leaves.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "竹叶3.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/leaves.imageset/竹叶3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/leaves.imageset/竹叶3.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/rootImage.imageset/5S尺寸.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/rootImage.imageset/5S尺寸.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/rootImage.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" : "5S尺寸.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/rootImage1.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" : "纯色背景异步.png", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /HDHangzhouMuseum/Assets.xcassets/rootImage1.imageset/纯色背景异步.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Assets.xcassets/rootImage1.imageset/纯色背景异步.png -------------------------------------------------------------------------------- /HDHangzhouMuseum/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 | 27 | 28 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/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 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Controllers/HDLaunchViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HDLaunchViewController.h 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HDLaunchViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Controllers/HDLaunchViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HDLaunchViewController.m 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import "HDLaunchViewController.h" 10 | #import 11 | #import 12 | #import "Transition.h" 13 | #import "HDRootViewController.h" 14 | 15 | 16 | //考虑转屏的影响,按照实际屏幕方向(UIDeviceOrientation)的宽高 17 | #define SCREEN_WIDTH ([UIScreen mainScreen].bounds.size.width) 18 | #define SCREEN_HEIGHT ([UIScreen mainScreen].bounds.size.height) 19 | #define STATUSBAR_HEIGHT ([UIApplication sharedApplication].statusBarFrame.size.height) 20 | 21 | @interface HDLaunchViewController () 22 | 23 | @property (nonatomic, weak) IBOutlet UIView *containerView; 24 | 25 | @property (nonatomic, strong)AVPlayer *player; 26 | 27 | @end 28 | 29 | 30 | @implementation HDLaunchViewController 31 | - (void)viewWillAppear:(BOOL)animated 32 | { 33 | [super viewWillAppear:animated]; 34 | self.navigationController.delegate = self; 35 | HDRootViewController *rootVC = [[self storyboard] instantiateViewControllerWithIdentifier:@"HDRootVC"]; 36 | [self.navigationController pushViewController:rootVC animated:YES]; 37 | } 38 | 39 | - (void)viewDidLoad { 40 | [super viewDidLoad]; 41 | 42 | self.view.backgroundColor = [UIColor blackColor]; 43 | self.navigationController.navigationBarHidden = YES; 44 | // NSString *urlStr = [[NSBundle mainBundle] pathForResource:@"launchVideo" ofType:@"mp4"]; 45 | // NSURL *URL1 = [[NSURL alloc] initFileURLWithPath:urlStr]; 46 | // AVAsset *movieAsset = [AVURLAsset URLAssetWithURL:URL1 options:nil]; 47 | // AVPlayerItem *playerItem = [AVPlayerItem playerItemWithAsset:movieAsset]; 48 | // 49 | // _player = [AVPlayer playerWithPlayerItem:playerItem]; 50 | // AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:_player]; 51 | // playerLayer.videoGravity = AVLayerVideoGravityResizeAspect; 52 | // playerLayer.frame = CGRectMake(0,0, ScreenWidth, ScreenHeight); 53 | // [self.containerView.layer addSublayer:playerLayer]; 54 | // [self setAVAudioSession]; 55 | // [_player setVolume:1.0]; 56 | // [_player play]; 57 | 58 | 59 | //监控 app 活动状态,打电话/锁屏 时暂停播放 60 | [[NSNotificationCenter defaultCenter] addObserver:self 61 | selector:@selector(becomeActive) 62 | name:UIApplicationDidBecomeActiveNotification 63 | object:nil]; 64 | [[NSNotificationCenter defaultCenter] addObserver:self 65 | selector:@selector(resignActive) 66 | name:UIApplicationWillResignActiveNotification 67 | object:nil]; 68 | 69 | //注册视频播放完后的通知 70 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playerItemDidReachEnd:) name:AVPlayerItemDidPlayToEndTimeNotification object:nil]; 71 | //添加跳过按钮 72 | 73 | if(![[NSUserDefaults standardUserDefaults] boolForKey:@"firstStart"]) 74 | { 75 | // LOG(@"第一次启动"); 76 | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"firstStart"]; 77 | }else{ 78 | // LOG(@"不是第一次启动"); 79 | UIButton *tapBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 80 | tapBtn.frame = CGRectMake(ScreenWidth / 2.0 - 30, ScreenHeight - 60, 60, 40); 81 | [tapBtn addTarget:self action:@selector(playerItemDidReachEnd:) forControlEvents:UIControlEventTouchUpInside]; 82 | tapBtn.backgroundColor = [UIColor grayColor]; 83 | [tapBtn setTitle:@"跳过" forState:UIControlStateNormal]; 84 | [self.containerView addSubview:tapBtn]; 85 | } 86 | } 87 | 88 | - (void)setAVAudioSession 89 | { 90 | BOOL success = NO; 91 | NSError *error = nil; 92 | AVAudioSession *audioSessionObj = [AVAudioSession sharedInstance]; 93 | success = [audioSessionObj setCategory:AVAudioSessionCategoryPlayback error:&error]; 94 | 95 | if ([self hasMicphone] == NO) { 96 | [audioSessionObj setCategory:AVAudioSessionCategoryPlayback error:&error]; 97 | } 98 | if (!success) { 99 | //NSLog(@"Error setting category:%@",[error localizedDescription]); 100 | return; 101 | } 102 | success = [audioSessionObj setActive:true error:&error]; 103 | if (!success) { 104 | //NSLog(@"Error setting category:%@",[error localizedDescription]); 105 | return; 106 | } 107 | 108 | //监听耳机事件 109 | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(outputDeviceChanged:)name:AVAudioSessionRouteChangeNotification 110 | object:[AVAudioSession sharedInstance]]; 111 | 112 | 113 | 114 | } 115 | - (void)outputDeviceChanged:(NSNotification *)aNotification 116 | { 117 | //拔出耳机后仍播放 118 | [self.player play]; 119 | } 120 | 121 | - (BOOL)hasMicphone 122 | { 123 | if ([[AVAudioSession sharedInstance] isInputAvailable] == NO) 124 | return NO; 125 | 126 | // 判断是否有耳机 127 | AVAudioSessionRouteDescription *des = [[AVAudioSession sharedInstance] currentRoute]; 128 | NSArray *a = des.outputs; 129 | for (AVAudioSessionPortDescription *s in a) { 130 | if ([s.portType isEqualToString:AVAudioSessionPortHeadsetMic] || [s.portType isEqualToString:AVAudioSessionPortHeadphones]) { 131 | LOG(@"耳机"); 132 | return YES; 133 | } 134 | } 135 | 136 | return NO; 137 | } 138 | 139 | 140 | #pragma mark - UINavigationControllerDelegate iOS7新增的2个方法 141 | // 动画特效 142 | - (id) navigationController:(UINavigationController *)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC 143 | { 144 | return [Transition new]; 145 | } 146 | 147 | 148 | // 交互 149 | - (id )navigationController:(UINavigationController*)navigationController interactionControllerForAnimationController:(id )animationController 150 | { 151 | /** 152 | * 在非交互式动画效果中,该方法返回 nil 153 | * 交互式转场,自我理解意思是,用户能通过自己的动作来(常见:手势)控制,不同于系统缺省给定的push或者pop(非交互式) 154 | */ 155 | return nil; 156 | } 157 | 158 | #pragma mark - action 159 | /* 160 | *程序活动的动作 161 | */ 162 | - (void)becomeActive 163 | { 164 | // [self.player play]; 165 | } 166 | 167 | /* 168 | *程序不活动的动作 169 | */ 170 | - (void)resignActive 171 | { 172 | // [self.player pause]; 173 | } 174 | 175 | //视频播放到结尾 176 | - (void)playerItemDidReachEnd:(NSNotification *)notification 177 | { 178 | [UIView animateWithDuration:5.0 animations:^{ 179 | 180 | } completion:^(BOOL finished) { 181 | 182 | HDRootViewController *rootVC = [[self storyboard] instantiateViewControllerWithIdentifier:@"HDRootVC"]; 183 | [self.navigationController pushViewController:rootVC animated:YES]; 184 | // [self.player pause]; 185 | }]; 186 | } 187 | 188 | - (void)viewDidDisappear:(BOOL)animated 189 | { 190 | [super viewDidDisappear:animated]; 191 | // [self.player.currentItem cancelPendingSeeks]; 192 | // [self.player.currentItem.asset cancelLoading]; 193 | // self.player = nil; 194 | // [self.player replaceCurrentItemWithPlayerItem:nil]; 195 | } 196 | 197 | - (void)dealloc 198 | { 199 | self.containerView = nil; 200 | self.player = nil; 201 | [[NSNotificationCenter defaultCenter] removeObserver:self]; 202 | } 203 | - (void)didReceiveMemoryWarning { 204 | [super didReceiveMemoryWarning]; 205 | // Dispose of any resources that can be recreated. 206 | } 207 | 208 | /* 209 | #pragma mark - Navigation 210 | 211 | // In a storyboard-based application, you will often want to do a little preparation before navigation 212 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 213 | // Get the new view controller using [segue destinationViewController]. 214 | // Pass the selected object to the new view controller. 215 | } 216 | */ 217 | 218 | @end 219 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Controllers/HDRootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HDRootViewController.h 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HDRootViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Controllers/HDRootViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HDRootViewController.m 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import "HDRootViewController.h" 10 | #import "ImageContentView.h" 11 | #import "GIFImageView.h" 12 | #import "AppDelegate.h" 13 | #import "TestViewController.h" 14 | #import "UIButton+MyButton.h" 15 | #import "UIImageView+MyImageView.h" 16 | 17 | @interface HDRootViewController () 18 | 19 | @property (nonatomic,strong) UIScrollView *scrollView; 20 | @property (nonatomic,strong) UIView *myView; 21 | @property (nonatomic,strong) UIView *myView1; 22 | @property (nonatomic,strong) ImageContentView *Cherry; 23 | @property (nonatomic,strong) ImageContentView *Bamboo; 24 | @property (nonatomic,strong) ImageContentView *PlumFlower; 25 | @property (nonatomic,strong) GIFImageView *fly1; 26 | @property (nonatomic,strong) GIFImageView *fly2; 27 | @property (nonatomic,strong) GIFImageView *fly3; 28 | 29 | @end 30 | 31 | 32 | @implementation HDRootViewController 33 | 34 | - (void)viewWillAppear:(BOOL)animated 35 | { 36 | [super viewWillAppear:animated]; 37 | self.navigationController.navigationBarHidden = YES; 38 | // self.navigationController.delegate = self; 39 | [_fly1 startGIF]; 40 | [_fly2 startGIF]; 41 | [_fly3 startGIF]; 42 | _scrollView.delegate = self; 43 | 44 | } 45 | 46 | - (void)viewDidLoad { 47 | [super viewDidLoad]; 48 | 49 | _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, ScreenHeight)]; 50 | [self.view addSubview:_scrollView]; 51 | float picHeight = ScreenWidth * 7972 /1242.0; 52 | _scrollView.contentSize = CGSizeMake(ScreenWidth,picHeight); 53 | _scrollView.bounces = NO; 54 | _scrollView.showsHorizontalScrollIndicator = NO; 55 | _scrollView.showsVerticalScrollIndicator = NO; 56 | _scrollView.delegate = self; 57 | UIImageView *imageV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, ScreenWidth, picHeight)]; 58 | imageV.image = [UIImage imageNamed:@"rootImage1"]; 59 | [_scrollView addSubview:imageV]; 60 | 61 | [self addScrollViewSubviews]; 62 | // [self addButterflyAnimations]; 63 | [self addEmitterAnimations]; 64 | 65 | } 66 | - (void)viewDidDisappear:(BOOL)animated 67 | { 68 | [super viewDidDisappear:animated]; 69 | [_fly1 stopGIF]; 70 | [_fly2 stopGIF]; 71 | [_fly3 stopGIF]; 72 | _scrollView.delegate = nil; 73 | // _scrollView = nil; 74 | } 75 | - (void)pushAction 76 | { 77 | TestViewController *rootVC = [[self storyboard] instantiateViewControllerWithIdentifier:@"TestView"]; 78 | [self.navigationController pushViewController:rootVC animated:YES]; 79 | } 80 | - (void)addScrollViewSubviews 81 | { 82 | 83 | //蝴蝶1 84 | _fly1 = [[GIFImageView alloc] initWithFrame:CGRectMake1(204, 187, 60, 43)]; 85 | [_scrollView addSubview:_fly1]; 86 | _fly1.gifPath = [[NSBundle mainBundle] pathForResource:@"butterfly" ofType:@"gif"]; 87 | [_fly1 startGIF]; 88 | 89 | /* 90 | //得到图片的路径 91 | NSString *path = [[NSBundle mainBundle] pathForResource:@"butterfly" ofType:@"gif"]; 92 | //将图片转为NSData 93 | NSData *gifData = [NSData dataWithContentsOfFile:path]; 94 | //创建一个webView,添加到界面 95 | UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 150, 200, 200)]; 96 | [self.scrollView addSubview:webView]; 97 | //自动调整尺寸 98 | webView.scalesPageToFit = YES; 99 | //禁止滚动 100 | webView.scrollView.scrollEnabled = NO; 101 | //设置透明效果 102 | webView.backgroundColor = [UIColor clearColor]; 103 | webView.opaque = 0; 104 | //加载数据 105 | [webView loadData:gifData MIMEType:@"image/gif" textEncodingName:nil baseURL:[NSURL URLWithString:path]]; 106 | */ 107 | 108 | //关键帧动画 109 | UIBezierPath *bezierPath = [[UIBezierPath alloc] init]; 110 | [bezierPath moveToPoint:CGPointMake(ScreenWidth, 450)]; 111 | [bezierPath addCurveToPoint:CGPointMake(0, 450) controlPoint1:CGPointMake(275, 200) controlPoint2:CGPointMake(150, 550)]; 112 | CAShapeLayer *pathLayer = [CAShapeLayer layer]; 113 | pathLayer.path = bezierPath.CGPath; 114 | pathLayer.strokeColor = [UIColor clearColor].CGColor; 115 | pathLayer.fillColor = [UIColor clearColor].CGColor; 116 | pathLayer.lineWidth = 3.0f; 117 | [self.scrollView.layer addSublayer:pathLayer]; 118 | // 119 | CAKeyframeAnimation *animation = [CAKeyframeAnimation animation]; 120 | animation.keyPath = @"position"; 121 | animation.duration = 30.0; 122 | // animation.rotationMode = kCAAnimationRotateAutoReverse; 123 | animation.path = bezierPath.CGPath; 124 | animation.repeatCount = 100; 125 | [_fly1.layer addAnimation:animation forKey:nil]; 126 | 127 | //蝴蝶2 128 | _fly2 = [[GIFImageView alloc] initWithFrame:CGRectMake1(187, 229, 40, 26)]; 129 | [_scrollView addSubview:_fly2]; 130 | _fly2.gifPath = [[NSBundle mainBundle] pathForResource:@"butterfly" ofType:@"gif"]; 131 | [_fly2 startGIF]; 132 | 133 | //logo 134 | ImageContentView *logo = [[ImageContentView alloc] initWithFrame:CGRectMake1(145, 283, 55, 226) image:[UIImage imageNamed:@"Logo"]]; 135 | [_scrollView addSubview:logo]; 136 | 137 | //樱花 138 | _Cherry = [[ImageContentView alloc] initWithFrame:CGRectMake1(149, 599, 155, 245) image:[UIImage imageNamed:@"Cherry"]]; 139 | [_scrollView addSubview:_Cherry]; 140 | //雷峰塔 141 | ImageContentView *pagoda = [[ImageContentView alloc] initWithFrame:CGRectMake1(73, 700, 147, 209) image:[UIImage imageNamed:@"pagoda"]]; 142 | pagoda.isFaster = YES; 143 | pagoda.tag = 101; 144 | _myView = [[UIView alloc] initWithFrame:CGRectMake1(23, 700, 60, 160)]; 145 | _myView.backgroundColor = [UIColor clearColor]; 146 | UITextView *textView = [[UITextView alloc] initWithFrame:_myView.bounds]; 147 | [_myView addSubview:textView]; 148 | textView.editable = NO; 149 | textView.text = @"雷峰塔(Leifeng Pagoda)又名皇妃塔、西关砖塔,位于浙江省会杭州市西湖风景区岸夕照山的雷峰上。雷峰塔为吴越国王钱俶因黄妃得子建,初名“皇妃塔”因地建于雷峰,后人改称“雷峰塔”。汉族民间故事《白蛇传》中,法海和尚骗许仙至金山,白娘子水漫金山救许仙,被法海镇在雷峰塔下。后小青苦练法力,终于打败了法海,雷峰塔倒塌,白素贞才获救了。"; 150 | textView.font = [UIFont systemFontOfSize:12]; 151 | textView.directionalLockEnabled = NO; 152 | textView.backgroundColor = [UIColor clearColor]; 153 | 154 | [_scrollView addSubview:_myView]; 155 | _myView.hidden = YES; 156 | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(animatetion:)]; 157 | 158 | // UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizer alloc] init]; 159 | // [longPress addTarget:self action:@selector(animatetion:)]; 160 | 161 | // UIView *btnView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 147, 209)]; 162 | // btnView.backgroundColor = [UIColor clearColor]; 163 | // [pagoda addSubview:btnView]; 164 | // [btnView addGestureRecognizer:tap]; 165 | [pagoda addGestureRecognizer:tap]; 166 | // pagoda.index = 111; 167 | [_scrollView addSubview:pagoda]; 168 | 169 | //简介按钮 170 | UIButton *introduceBtn = [UIButton initWithFrame:CGRectMake1(50, 586, 28, 87) type:UIButtonTypeCustom backgroundImage:[UIImage imageNamed:@"IntroduceBtn"] target:self action:@selector(pushAction) tag:0]; 171 | [_scrollView addSubview:introduceBtn]; 172 | //蝴蝶3 173 | _fly3 = [[GIFImageView alloc] initWithFrame:CGRectMake1(204, 921, 63, 44)]; 174 | [_scrollView addSubview:_fly3]; 175 | _fly3.gifPath = [[NSBundle mainBundle] pathForResource:@"butterfly" ofType:@"gif"]; 176 | [_fly3 startGIF]; 177 | 178 | //荷花 179 | ImageContentView *Lotus = [[ImageContentView alloc] initWithFrame:CGRectMake1(16, 956, 176, 236) image:[UIImage imageNamed:@"Lotus"]]; 180 | Lotus.tag = 102; 181 | _myView1 = [[UIView alloc] initWithFrame:CGRectMake1(63, 900, 90, 150)]; 182 | _myView1.backgroundColor = [UIColor cyanColor]; 183 | UITextView *textView1 = [[UITextView alloc] initWithFrame:_myView1.bounds]; 184 | [_myView1 addSubview:textView1]; 185 | textView1.editable = NO; 186 | textView1.text = @"荷花(Lotus flower):属睡莲目莲科,是莲属二种植物的通称。又名莲花、水芙蓉等。是莲属多年生水生草本花卉。地下茎长而肥厚,有长节,叶盾圆形。花期6至9月,单生于花梗顶端,花瓣多数,嵌生在花托穴内,有红、粉红、白、紫等色,或有彩纹、镶边。坚果椭圆形,种子卵形。"; 187 | textView1.font = [UIFont systemFontOfSize:12]; 188 | textView1.directionalLockEnabled = NO; 189 | textView1.backgroundColor = [UIColor clearColor]; 190 | 191 | [_scrollView addSubview:_myView1]; 192 | _myView1.hidden = YES; 193 | UITapGestureRecognizer *tap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(animatetion:)]; 194 | [Lotus addGestureRecognizer:tap1]; 195 | [_scrollView addSubview:Lotus]; 196 | 197 | 198 | //馆藏精品按钮 199 | UIButton *collectionBtn = [UIButton initWithFrame:CGRectMake1(254, 970, 28, 87) type:UIButtonTypeCustom backgroundImage:[UIImage imageNamed:@"CollectionBtn"] target:self action:@selector(pushAction) tag:0]; 200 | [_scrollView addSubview:collectionBtn]; 201 | 202 | //文物 203 | ImageContentView *CulturalRelic = [[ImageContentView alloc] initWithFrame:CGRectMake1(180, 1097, 87, 115) image:[UIImage imageNamed:@"CulturalRelic"]]; 204 | CulturalRelic.isFaster = YES; 205 | [_scrollView addSubview:CulturalRelic]; 206 | 207 | //导览服务按钮 208 | UIButton *GuideBtn = [UIButton initWithFrame:CGRectMake1(60, 1290, 28, 87) type:UIButtonTypeCustom backgroundImage:[UIImage imageNamed:@"GuideBtn"] target:self action:@selector(pushAction) tag:0]; 209 | [_scrollView addSubview:GuideBtn]; 210 | 211 | //竹子 212 | _Bamboo = [[ImageContentView alloc] initWithFrame:CGRectMake1(123, 1267, 182, 296) image:[UIImage imageNamed:@"Bamboo"]]; 213 | [_scrollView addSubview:_Bamboo]; 214 | 215 | //云船 216 | UIImageView *CloudBoat = [[UIImageView alloc] initWithFrame:CGRectMake1(16, 1522, 103, 92) image:[UIImage imageNamed:@"CloudBoat"]]; 217 | [_scrollView addSubview:CloudBoat]; 218 | 219 | //船 220 | ImageContentView *Boat = [[ImageContentView alloc] initWithFrame:CGRectMake1(36, 1445, 200, 139) image:[UIImage imageNamed:@"Boat"]]; 221 | Boat.isFaster = YES; 222 | [_scrollView addSubview:Boat]; 223 | 224 | //参观攻略按钮 225 | UIButton *VisitBtn = [UIButton initWithFrame:CGRectMake1(248, 1697, 28, 87) type:UIButtonTypeCustom backgroundImage:[UIImage imageNamed:@"VisitBtn"] target:self action:@selector(pushAction) tag:0]; 226 | [_scrollView addSubview:VisitBtn]; 227 | 228 | //梅花PlumFlower 229 | _PlumFlower = [[ImageContentView alloc] initWithFrame:CGRectMake1(16, 1624, 201, 223) image:[UIImage imageNamed:@"PlumFlower"]]; 230 | [_scrollView addSubview:_PlumFlower]; 231 | 232 | //画轴 233 | ImageContentView *Painting = [[ImageContentView alloc] initWithFrame:CGRectMake1(108, 1813, 133, 123) image:[UIImage imageNamed:@"Painting"]]; 234 | Painting.isFaster = YES; 235 | [_scrollView addSubview:Painting]; 236 | 237 | 238 | } 239 | 240 | - (void)animatetion:(UITapGestureRecognizer *)sender 241 | { 242 | ImageContentView *view1 = (ImageContentView *)sender.view; 243 | NSInteger i = view1.tag; 244 | // LOG(@"tap----%ld",(long)i); 245 | switch (i) 246 | { 247 | case 101: 248 | { 249 | //创建CATransition对象 250 | CATransition *animation = [CATransition animation]; 251 | 252 | //设置运动时间 253 | animation.duration = 5; 254 | 255 | //设置运动type 256 | animation.type = kCATransitionFade; 257 | 258 | //设置子类 259 | animation.subtype = kCATransitionFromLeft; 260 | 261 | //设置运动速度 262 | animation.timingFunction = UIViewAnimationOptionCurveEaseInOut; 263 | if (_myView.hidden) { 264 | 265 | _myView.hidden = NO; 266 | [_myView.layer addAnimation:animation forKey:@"animation"]; 267 | }else 268 | { 269 | _myView.hidden = YES; 270 | } 271 | 272 | 273 | } 274 | break; 275 | /* 动画效果 276 | kCATransitionFade 淡化效果 277 | kCATransitionPush Push效果 278 | kCATransitionReveal 揭开效果 279 | kCATransitionMoveIn 覆盖效果 280 | @"cube" 3D立方效果 281 | @"suckEffect" 吮吸效果 282 | @"oglFlip" 翻转效果 283 | @"rippleEffect" 波纹效果 284 | @"pageCurl" 翻页效果 285 | @"pageUnCurl" 反翻页效果 286 | @"cameraIrisHollowOpen" 开镜头效果 287 | @"cameraIrisHollowClose"关镜头效果 288 | */ 289 | case 102: 290 | { 291 | //创建CATransition对象 292 | CATransition *animation = [CATransition animation]; 293 | 294 | //设置运动时间 295 | animation.duration = 3; 296 | 297 | //设置运动type 298 | animation.type = kCATransitionMoveIn; 299 | 300 | //设置子类 301 | animation.subtype = kCATransitionFromLeft; 302 | 303 | 304 | //设置运动速度 305 | animation.timingFunction = UIViewAnimationOptionCurveEaseInOut; 306 | if (_myView1.hidden) { 307 | 308 | _myView1.hidden = NO; 309 | [_myView1.layer addAnimation:animation forKey:@"animation"]; 310 | }else 311 | { 312 | _myView1.hidden = YES; 313 | } 314 | 315 | } 316 | break; 317 | 318 | default: 319 | break; 320 | } 321 | // //创建CATransition对象 322 | // CATransition *animation = [CATransition animation]; 323 | // 324 | // //设置运动时间 325 | // animation.duration = 5; 326 | // 327 | // //设置运动type 328 | // animation.type = kCATransitionFade; 329 | // 330 | // //设置子类 331 | // animation.subtype = kCATransitionFromLeft; 332 | // 333 | // 334 | // //设置运动速度 335 | // animation.timingFunction = UIViewAnimationOptionCurveEaseInOut; 336 | // if (_myView.hidden) { 337 | // 338 | // _myView.hidden = NO; 339 | // [_myView.layer addAnimation:animation forKey:@"animation"]; 340 | // }else 341 | // { 342 | // _myView.hidden = YES; 343 | // } 344 | // 345 | // 346 | 347 | } 348 | 349 | - (void)addEmitterAnimations 350 | { 351 | //樱花花瓣 352 | CAEmitterLayer *leavesEmitter = [CAEmitterLayer layer]; 353 | //粒子发射位置 354 | leavesEmitter.emitterPosition = _Cherry.center; 355 | //发射源的尺寸 356 | leavesEmitter.emitterSize = CGSizeMake(self.view.bounds.size.width, 0.0); 357 | //发射源的形状 358 | 359 | /* 360 | kCAEmitterLayerPoint 中心点 361 | kCAEmitterLayerLine 线型 362 | kCAEmitterLayerRectangle 矩形 363 | kCAEmitterLayerCuboid 长方体 364 | kCAEmitterLayerCircle 圆 365 | kCAEmitterLayerSphere 球面 366 | */ 367 | 368 | leavesEmitter.emitterShape = kCAEmitterLayerSphere; 369 | //随机粒子的大小 370 | CAEmitterCell *leavesflake = [CAEmitterCell emitterCell]; 371 | leavesflake.scale = 0.2; 372 | leavesflake.scaleRange = 0.5; 373 | //粒子参数的速度乘数因子 374 | leavesflake.birthRate = 1.0; 375 | //生命周期 376 | leavesflake.lifetime = 25.0; 377 | //粒子速度 378 | leavesflake.velocity = 10; 379 | leavesflake.velocityRange = 10; 380 | //粒子y方向的加速度分量 381 | leavesflake.yAcceleration = 2; 382 | //周围发射角度 383 | leavesflake.emissionRange = 0.5 * M_PI; 384 | //自动旋转 385 | leavesflake.spinRange = 0.25 * M_PI; 386 | 387 | leavesflake.contents = (id)[[UIImage imageNamed:@"CherryPetals"] CGImage]; 388 | 389 | leavesEmitter.shadowOpacity = 1.0; 390 | leavesEmitter.shadowRadius = 0.0; 391 | leavesEmitter.shadowOffset = CGSizeMake(0.0, 1.0); 392 | leavesEmitter.shadowColor = [[UIColor whiteColor] CGColor]; 393 | 394 | leavesEmitter.emitterCells = [NSArray arrayWithObject:leavesflake]; 395 | [_scrollView.layer addSublayer:leavesEmitter]; 396 | 397 | //竹叶 398 | 399 | CAEmitterLayer *leavesEmitter1 = [CAEmitterLayer layer]; 400 | //粒子发射位置 401 | leavesEmitter1.emitterPosition = _Bamboo.center; 402 | //发射源的尺寸 403 | leavesEmitter1.emitterSize = CGSizeMake(self.view.bounds.size.width/2.0 , 0.0); 404 | leavesEmitter1.emitterShape = kCAEmitterLayerRectangle; 405 | //随机粒子的大小 406 | CAEmitterCell *leavesflake1 = [CAEmitterCell emitterCell]; 407 | leavesflake1.scale = 0.2; 408 | leavesflake1.scaleRange = 0.5; 409 | //粒子参数的速度乘数因子 410 | leavesflake1.birthRate = 0.6; 411 | //生命周期 412 | leavesflake1.lifetime = 20.0; 413 | //粒子速度 414 | leavesflake1.velocity = 10; 415 | leavesflake1.velocityRange = 5; 416 | //粒子y方向的加速度分量 417 | leavesflake1.yAcceleration = 5; 418 | //周围发射角度 419 | leavesflake1.emissionRange = 0.5 * M_PI; 420 | //自动旋转 421 | leavesflake1.spinRange = 0.25 * M_PI; 422 | 423 | leavesflake1.contents = (id)[[UIImage imageNamed:@"BambooLeaves"] CGImage]; 424 | leavesEmitter1.shadowOpacity = 1.0; 425 | leavesEmitter1.shadowRadius = 0.0; 426 | leavesEmitter1.shadowOffset = CGSizeMake(0.0, 1.0); 427 | leavesEmitter1.shadowColor = [[UIColor whiteColor] CGColor]; 428 | 429 | leavesEmitter1.emitterCells = [NSArray arrayWithObject:leavesflake1]; 430 | [_scrollView.layer addSublayer:leavesEmitter1]; 431 | 432 | //梅花 433 | CAEmitterLayer *leavesEmitter2 = [CAEmitterLayer layer]; 434 | //粒子发射位置 435 | leavesEmitter2.emitterPosition = _PlumFlower.center; 436 | //发射源的尺寸 437 | leavesEmitter2.emitterSize = CGSizeMake(self.view.bounds.size.width/2.0 , 0.0); 438 | leavesEmitter2.emitterShape = kCAEmitterLayerRectangle; 439 | //随机粒子的大小 440 | CAEmitterCell *leavesflake2 = [CAEmitterCell emitterCell]; 441 | leavesflake2.scale = 0.2; 442 | leavesflake2.scaleRange = 0.5; 443 | //粒子参数的速度乘数因子 444 | leavesflake2.birthRate = 1.0; 445 | //生命周期 446 | leavesflake2.lifetime = 20.0; 447 | //粒子速度 448 | leavesflake2.velocity = 10; 449 | leavesflake2.velocityRange = 5; 450 | //粒子y方向的加速度分量 451 | leavesflake2.yAcceleration = 5; 452 | //周围发射角度 453 | leavesflake2.emissionRange = 0.5 * M_PI; 454 | //自动旋转 455 | leavesflake2.spinRange = 0.25 * M_PI; 456 | 457 | leavesflake2.contents = (id)[[UIImage imageNamed:@"PlumPetals"] CGImage]; 458 | leavesEmitter2.shadowOpacity = 1.0; 459 | leavesEmitter2.shadowRadius = 0.0; 460 | leavesEmitter2.shadowOffset = CGSizeMake(0.0, 1.0); 461 | leavesEmitter2.shadowColor = [[UIColor whiteColor] CGColor]; 462 | 463 | leavesEmitter2.emitterCells = [NSArray arrayWithObject:leavesflake2]; 464 | [_scrollView.layer addSublayer:leavesEmitter2]; 465 | 466 | 467 | } 468 | 469 | #pragma mark -------UIScrollViewDelegate----------- 470 | 471 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView 472 | { 473 | NSMutableArray *array = [NSMutableArray arrayWithCapacity:0]; 474 | NSMutableArray *array1 = [NSMutableArray arrayWithCapacity:0]; 475 | 476 | for (ImageContentView *subview in self.scrollView.subviews) 477 | { 478 | if ([subview isKindOfClass:[ImageContentView class]] && subview.isFaster) 479 | { 480 | [array addObject:subview]; 481 | 482 | }else if ([subview isKindOfClass:[ImageContentView class]] && !subview.isFaster) 483 | { 484 | [array1 addObject:subview]; 485 | } 486 | } 487 | for (GIFImageView *subview in self.scrollView.subviews) 488 | { 489 | if ([subview isKindOfClass:[GIFImageView class]]) 490 | { 491 | [array addObject:subview]; 492 | } 493 | } 494 | 495 | 496 | [array enumerateObjectsUsingBlock:^(ImageContentView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 497 | [obj imageOffset]; 498 | 499 | }]; 500 | 501 | [array1 enumerateObjectsUsingBlock:^(ImageContentView * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 502 | 503 | [obj imageOffset1]; 504 | 505 | }]; 506 | 507 | } 508 | 509 | CG_INLINE CGRect 510 | CGRectMake1(CGFloat x, CGFloat y, CGFloat width, CGFloat height) 511 | 512 | { 513 | AppDelegate *myDelegate = [[UIApplication sharedApplication] delegate]; 514 | 515 | CGRect rect; 516 | 517 | rect.origin.x = x * myDelegate.autoSizeScaleX; 518 | rect.origin.y = y * myDelegate.autoSizeScaleY; 519 | 520 | rect.size.width = width * myDelegate.autoSizeScaleX; 521 | rect.size.height = height * myDelegate.autoSizeScaleY; 522 | 523 | // NSLog(@"##########:%f",myDelegate.autoSizeScaleX); 524 | 525 | return rect; 526 | 527 | } 528 | 529 | 530 | /* 531 | - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView 532 | { 533 | NSLog(@"Begin Dragging"); 534 | } 535 | - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset 536 | { 537 | NSLog(@"End Dragging,%f",targetContentOffset->y); 538 | } 539 | 540 | - (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView 541 | { 542 | NSLog(@"**Begin Decelerating"); 543 | }// called on finger up as we are moving 544 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView 545 | { 546 | NSLog(@"**End Decelerating"); 547 | }// called when scroll view grinds to a halt 548 | 549 | - (void)scrollViewDidEndScrollingAnimation:(UIScrollView *)scrollView 550 | { 551 | NSLog(@"**End ScrollingAnimation"); 552 | } 553 | 554 | */ 555 | 556 | - (void)dealloc 557 | { 558 | _scrollView = nil; 559 | _myView = nil; 560 | _myView1 = nil; 561 | _Cherry = nil; 562 | _Bamboo = nil; 563 | _PlumFlower = nil; 564 | _fly1 = nil; 565 | _fly2 = nil; 566 | _fly3 = nil; 567 | } 568 | 569 | 570 | - (void)didReceiveMemoryWarning { 571 | [super didReceiveMemoryWarning]; 572 | } 573 | 574 | /* 575 | #pragma mark - Navigation 576 | 577 | // In a storyboard-based application, you will often want to do a little preparation before navigation 578 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 579 | // Get the new view controller using [segue destinationViewController]. 580 | // Pass the selected object to the new view controller. 581 | } 582 | */ 583 | 584 | @end 585 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Controllers/TestViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // TestViewController.h 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/25. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface TestViewController : UIViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Controllers/TestViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // TestViewController.m 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/25. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import "TestViewController.h" 10 | 11 | @interface TestViewController () 12 | 13 | @end 14 | 15 | @implementation TestViewController 16 | 17 | - (void)viewWillAppear:(BOOL)animated 18 | { 19 | [super viewWillAppear:animated]; 20 | self.navigationController.navigationBarHidden = NO; 21 | } 22 | 23 | - (void)viewDidLoad { 24 | [super viewDidLoad]; 25 | // Do any additional setup after loading the view. 26 | 27 | } 28 | 29 | - (void)didReceiveMemoryWarning { 30 | [super didReceiveMemoryWarning]; 31 | // Dispose of any resources that can be recreated. 32 | } 33 | 34 | /* 35 | 36 | #pragma mark - Navigation 37 | 38 | // In a storyboard-based application, you will often want to do a little preparation before navigation 39 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 40 | // Get the new view controller using [segue destinationViewController]. 41 | // Pass the selected object to the new view controller. 42 | } 43 | 44 | */ 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Frameworks/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Frameworks/.gitkeep -------------------------------------------------------------------------------- /HDHangzhouMuseum/General/UIButton+MyButton.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+MyButton.h 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengdaliuyi on 16/3/1. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIButton (MyButton) 12 | + (UIButton *)initWithFrame:(CGRect)frame 13 | type:(UIButtonType)type 14 | backgroundImage:(UIImage *)image 15 | target:(id)target 16 | action:(SEL)selector 17 | tag:(NSInteger)tag; 18 | @end 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/General/UIButton+MyButton.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIButton+MyButton.m 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengdaliuyi on 16/3/1. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import "UIButton+MyButton.h" 10 | 11 | @implementation UIButton (MyButton) 12 | 13 | + (UIButton *)initWithFrame:(CGRect)frame 14 | type:(UIButtonType)type 15 | backgroundImage:(UIImage *)image 16 | target:(id)target 17 | action:(SEL)selector 18 | tag:(NSInteger)tag 19 | { 20 | UIButton *button = [UIButton buttonWithType:type]; 21 | button.frame = frame; 22 | [button setBackgroundImage:image forState:UIControlStateNormal]; 23 | 24 | [button addTarget:target action:selector forControlEvents:UIControlEventTouchUpInside]; 25 | 26 | return button; 27 | } 28 | 29 | 30 | 31 | @end 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/General/UIImageView+MyImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+MyImageView.h 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengdaliuyi on 16/3/1. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImageView (MyImageView) 12 | 13 | - (instancetype)initWithFrame:(CGRect)frame image:(UIImage *)image; 14 | 15 | 16 | @end 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/General/UIImageView+MyImageView.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImageView+MyImageView.m 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengdaliuyi on 16/3/1. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import "UIImageView+MyImageView.h" 10 | 11 | @implementation UIImageView (MyImageView) 12 | - (instancetype)initWithFrame:(CGRect)frame image:(UIImage *)image 13 | { 14 | UIImageView *imageV = [[UIImageView alloc] initWithFrame:frame]; 15 | imageV.image = image; 16 | 17 | return imageV; 18 | 19 | } 20 | @end 21 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/HDHangzhouMuseum-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // HDHangzhouMuseum-Prefix.pch 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #ifndef HDHangzhouMuseum_Prefix_pch 10 | #define HDHangzhouMuseum_Prefix_pch 11 | 12 | // Include any system framework and library headers here that should be included in all compilation units. 13 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file. 14 | #import "Transition.h" 15 | #define ScreenWidth [UIScreen mainScreen].bounds.size.width 16 | #define ScreenHeight [UIScreen mainScreen].bounds.size.height 17 | 18 | // Log宏定义,在debug时输出,在release时不产生输出 19 | #ifdef DEBUG 20 | #define LOG(...) NSLog(__VA_ARGS__); 21 | #define LOG_METHOD NSLog(@"%s", __func__); 22 | #define LOG_CMETHOD NSLog(@"%@/%@", NSStringFromClass([self class]), NSStringFromSelector(_cmd)) 23 | #define COUNT(p) NSLog(@"%s(%d): count = %d\n", __func__, __LINE__, [p retainCount]); 24 | #define LOG_TRACE(x) do {printf x; putchar('\n'); fflush(stdout);} while (0) 25 | #else 26 | #define LOG(...); 27 | #define LOG_METHOD 28 | #define LOG_CMETHOD 29 | #define COUNT(p) 30 | #define LOG_TRACE(x) 31 | #endif 32 | 33 | #endif /* HDHangzhouMuseum_Prefix_pch */ 34 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_NAME) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Model/Transition.h: -------------------------------------------------------------------------------- 1 | // 2 | // Transition.h 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface Transition : NSObject 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Model/Transition.m: -------------------------------------------------------------------------------- 1 | // 2 | // Transition.m 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import "Transition.h" 10 | 11 | @implementation Transition 12 | 13 | // 转场时的动画动画设置和对View的设置都写在此方法中 14 | - (void)animateTransition:(id)transitionContext { 15 | 16 | //*****************动画效果1:渐渐消失中渐渐展现 17 | UIViewController *project = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey]; 18 | UIView *containerView = [transitionContext containerView]; 19 | project.view.alpha = 0.0; 20 | CGRect frame = containerView.bounds; 21 | project.view.frame = frame; 22 | [containerView addSubview:project.view]; 23 | 24 | [UIView animateWithDuration:0.9 animations:^{ 25 | project.view.alpha = 1.0; 26 | } completion:^(BOOL finished) { 27 | [transitionContext completeTransition:YES]; 28 | }]; 29 | 30 | } 31 | 32 | 33 | // 转场动画展现时间 34 | - (NSTimeInterval)transitionDuration:(id)transitionContext { 35 | return 0.9; 36 | } 37 | 38 | 39 | @end 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/Resource/butterfly.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ethan561/ScrollPaintingAnimation/7f7ea34041553977d597fe90e41e32052347ccf6/HDHangzhouMuseum/Resource/butterfly.gif -------------------------------------------------------------------------------- /HDHangzhouMuseum/View/GIFImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // GIFImageView.h 3 | // 新年快乐 4 | // 5 | // Created by hengda2015mini on 16/1/30. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | /******************************************************* 10 | * 依赖: 11 | * - QuartzCore.framework 12 | * - ImageIO.framework 13 | * 参数: 14 | * 以下传参2选1: 15 | * - gifData GIF图片的NSData 16 | * - gifPath GIF图片的本地路径 17 | * 调用: 18 | * - startGIF 开始播放 19 | * - stopGIF 结束播放 20 | * - isGIFPlaying 判断是否正在播放 21 | * 另外: 22 | * 想用 category?请使用 UIImageView+PlayGIF.h/m 23 | *******************************************************/ 24 | 25 | #import 26 | #import 27 | #import 28 | 29 | @interface GIFImageView : UIImageView 30 | @property (nonatomic, strong) NSString *gifPath; 31 | @property (nonatomic, strong) NSData *gifData; 32 | 33 | - (void)startGIF; 34 | - (void)stopGIF; 35 | - (BOOL)isGIFPlaying; 36 | - (void)imageOffset; 37 | 38 | @end 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/View/GIFImageView.m: -------------------------------------------------------------------------------- 1 | // 2 | // GIFImageView.m 3 | // 新年快乐 4 | // 5 | // Created by hengda2015mini on 16/1/30. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import "GIFImageView.h" 10 | #import 11 | 12 | //GIFManager 13 | @interface GIFManager : NSObject 14 | @property (nonatomic, strong) CADisplayLink *displayLink; 15 | @property (nonatomic, strong) NSHashTable *gifViewHashTable; 16 | 17 | + (GIFManager *)shared; 18 | - (void)stopGIFView:(GIFImageView *)view; 19 | 20 | @end 21 | 22 | @implementation GIFManager 23 | + (GIFManager *)shared 24 | { 25 | static GIFManager *_sharedInstance = nil; 26 | static dispatch_once_t onceToken; 27 | dispatch_once(&onceToken, ^{ 28 | _sharedInstance = [[GIFManager alloc] init]; 29 | }); 30 | return _sharedInstance; 31 | } 32 | 33 | - (id)init{ 34 | self = [super init]; 35 | if (self) 36 | { 37 | _gifViewHashTable = [NSHashTable hashTableWithOptions:NSHashTableWeakMemory]; 38 | } 39 | return self; 40 | } 41 | 42 | - (void)play{ 43 | for (GIFImageView *imageView in _gifViewHashTable) 44 | { 45 | [imageView performSelector:@selector(play)]; 46 | } 47 | } 48 | 49 | - (void)stopDisplayLink 50 | { 51 | if (self.displayLink) 52 | { 53 | [self.displayLink invalidate]; 54 | self.displayLink = nil; 55 | [self.gifViewHashTable removeAllObjects]; 56 | self.gifViewHashTable = nil; 57 | } 58 | } 59 | - (void)stopGIFView:(GIFImageView *)view 60 | { 61 | [_gifViewHashTable removeObject:view]; 62 | if (_gifViewHashTable.count < 1 && !_displayLink) 63 | { 64 | [self stopDisplayLink]; 65 | } 66 | } 67 | 68 | 69 | @end 70 | 71 | 72 | 73 | 74 | /** 75 | * ******************************************************************** 76 | */ 77 | #import "GIFImageView.h" 78 | 79 | @interface GIFImageView () 80 | 81 | { 82 | size_t _index; 83 | size_t _frameCount; 84 | float _timestamp; 85 | CGImageSourceRef _gifSourceRef; 86 | } 87 | 88 | @end 89 | 90 | @implementation GIFImageView 91 | 92 | - (void)removeFromSuperview 93 | { 94 | [super removeFromSuperview]; 95 | [self stopGIF]; 96 | } 97 | 98 | - (void)startGIF{ 99 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ 100 | if (![[GIFManager shared].gifViewHashTable containsObject:self]) { 101 | //判断路径是否存在 102 | if ((self.gifData || self.gifPath)) { 103 | // CGImageSourceRef gifSourceRef; 104 | if (self.gifData) { 105 | _gifSourceRef = CGImageSourceCreateWithData((__bridge CFDataRef)(self.gifData), NULL); 106 | // CFRelease(_gifSourceRef); 107 | }else{ 108 | _gifSourceRef = CGImageSourceCreateWithURL((__bridge CFURLRef)[NSURL fileURLWithPath:self.gifPath], NULL); 109 | // CFRelease(_gifSourceRef); 110 | } 111 | if (!_gifSourceRef) { 112 | return; 113 | } 114 | dispatch_async(dispatch_get_main_queue(), ^{ 115 | [[GIFManager shared].gifViewHashTable addObject:self]; 116 | // _gifSourceRef = gifSourceRef; 117 | _frameCount = CGImageSourceGetCount(_gifSourceRef); 118 | }); 119 | // CGImageSourceRemoveCacheAtIndex(gifSourceRef, _frameCount); 120 | 121 | } 122 | } 123 | }); 124 | if (![GIFManager shared].displayLink) { 125 | [GIFManager shared].displayLink = [CADisplayLink displayLinkWithTarget:[GIFManager shared] selector:@selector(play)]; 126 | [[GIFManager shared].displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; 127 | 128 | } 129 | } 130 | 131 | - (void)stopGIF{ 132 | if (_gifSourceRef) 133 | { 134 | CFRelease(_gifSourceRef); 135 | _gifSourceRef = nil; 136 | } 137 | [[GIFManager shared] stopGIFView:self]; 138 | } 139 | 140 | - (void)play{ 141 | float nextFrameDuration = [self frameDurationAtIndex:MIN(_index+1, _frameCount-1)]; 142 | if (_timestamp < nextFrameDuration) { 143 | _timestamp += [GIFManager shared].displayLink.duration; 144 | return; 145 | } 146 | _index ++; 147 | _index = _index % _frameCount; 148 | CGImageRef ref = CGImageSourceCreateImageAtIndex(_gifSourceRef, _index, NULL); 149 | self.layer.contents = (__bridge id)(ref); 150 | CGImageRelease(ref); 151 | _timestamp = 0; 152 | } 153 | 154 | - (float)frameDurationAtIndex:(size_t)index{ 155 | CFDictionaryRef dictRef = CGImageSourceCopyPropertiesAtIndex(_gifSourceRef, index, NULL); 156 | NSDictionary *dict = (__bridge NSDictionary *)dictRef; 157 | NSDictionary *gifDict = (dict[(NSString *)kCGImagePropertyGIFDictionary]); 158 | NSNumber *unclampedDelayTime = gifDict[(NSString *)kCGImagePropertyGIFUnclampedDelayTime]; 159 | NSNumber *delayTime = gifDict[(NSString *)kCGImagePropertyGIFDelayTime]; 160 | CFRelease(dictRef); 161 | if (unclampedDelayTime.floatValue) { 162 | return unclampedDelayTime.floatValue; 163 | }else if (delayTime.floatValue) { 164 | return delayTime.floatValue; 165 | }else{ 166 | return 1/24.0; 167 | } 168 | } 169 | 170 | - (BOOL)isGIFPlaying{ 171 | return _gifSourceRef?YES:NO; 172 | } 173 | 174 | - (void)imageOffset { 175 | 176 | CGRect centerToWindow = [self convertRect:self.bounds toView:self.window]; 177 | CGFloat centerY = CGRectGetMidY(centerToWindow); 178 | CGPoint windowCenter = self.superview.center; 179 | 180 | CGFloat cellOffsetY = centerY - windowCenter.y; 181 | 182 | CGFloat offsetDig = cellOffsetY / self.superview.frame.size.height *2; 183 | CGFloat offset = offsetDig * (ScreenHeight/1.7 - 250)/2; 184 | 185 | CGAffineTransform transY = CGAffineTransformMakeTranslation(0,offset); 186 | 187 | 188 | self.transform = transY; 189 | 190 | 191 | NSLog(@"****************"); 192 | 193 | } 194 | 195 | 196 | @end 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/View/ImageContentView.h: -------------------------------------------------------------------------------- 1 | // 2 | // ImageContentView.h 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/24. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ImageContentView : UIView 12 | 13 | @property (nonatomic, strong) UIImageView *picture; 14 | @property (nonatomic) BOOL isFaster; 15 | @property (nonatomic) NSInteger index; 16 | //- (instancetype)initWithFrame:(CGRect)frame Width:(CGFloat)width collor:(UIColor *)collor; 17 | - (instancetype)initWithFrame:(CGRect)frame image:(UIImage *)image; 18 | 19 | - (void)imageOffset; 20 | - (void)imageOffset1; 21 | 22 | 23 | 24 | @end 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/View/ImageContentView.m: -------------------------------------------------------------------------------- 1 | // 2 | // ImageContentView.m 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/24. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import "ImageContentView.h" 10 | 11 | @implementation ImageContentView 12 | 13 | - (instancetype)initWithFrame:(CGRect)frame image:(UIImage *)image 14 | { 15 | self = [super initWithFrame:frame]; 16 | if (self) 17 | { 18 | _picture = [[UIImageView alloc]initWithFrame:self.bounds]; 19 | _picture.contentMode = UIViewContentModeScaleAspectFill; 20 | _picture.image = image; 21 | [self addSubview:_picture]; 22 | } 23 | return self; 24 | 25 | } 26 | 27 | - (void)imageOffset 28 | { 29 | //将当前视图的Rect转化为在window上的Rect 30 | CGRect centerToWindow = [self convertRect:self.bounds toView:self.window]; 31 | //获取当前视图在window坐标下中心点的Y坐标 32 | CGFloat centerY = CGRectGetMidY(centerToWindow); 33 | 34 | // LOG(@"centerY:%f",centerY); 35 | 36 | //获取父视图的中心坐标,为屏幕高度的一半 37 | CGPoint windowCenter = self.superview.center; 38 | // LOG(@"self.superview:%f",self.superview.center.y); 39 | //获取y坐标下的相对偏移量 40 | CGFloat cellOffsetY = centerY - windowCenter.y; 41 | // LOG(@"cellOffsetY:%f",cellOffsetY); 42 | CGFloat offsetDig = cellOffsetY / self.superview.frame.size.height; 43 | // LOG(@"offsetDig:%f",offsetDig); 44 | 45 | CGFloat offset = offsetDig * (ScreenHeight/1.7 - 200)/2; 46 | // NSLog(@"offset:%f",offset); 47 | 48 | CGAffineTransform transY = CGAffineTransformMakeTranslation(0,offset); 49 | 50 | self.picture.transform = transY; 51 | 52 | // LOG(@"****************"); 53 | 54 | } 55 | 56 | - (void)imageOffset1 57 | { 58 | CGRect centerToWindow = [self convertRect:self.bounds toView:self.window]; 59 | CGFloat centerY = CGRectGetMidY(centerToWindow); 60 | 61 | CGPoint windowCenter = self.superview.center; 62 | CGFloat cellOffsetY = centerY - windowCenter.y; 63 | CGFloat offsetDig = cellOffsetY / self.superview.frame.size.height; 64 | 65 | CGFloat offset = offsetDig * (ScreenHeight/1.7 - 100)/2; 66 | 67 | CGAffineTransform transY = CGAffineTransformMakeTranslation(0,offset); 68 | 69 | self.picture.transform = transY; 70 | 71 | } 72 | 73 | 74 | 75 | @end 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /HDHangzhouMuseum/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // HDHangzhouMuseum 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. 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 | -------------------------------------------------------------------------------- /HDHangzhouMuseumTests/HDHangzhouMuseumTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // HDHangzhouMuseumTests.m 3 | // HDHangzhouMuseumTests 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HDHangzhouMuseumTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation HDHangzhouMuseumTests 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 | -------------------------------------------------------------------------------- /HDHangzhouMuseumTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /HDHangzhouMuseumUITests/HDHangzhouMuseumUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // HDHangzhouMuseumUITests.m 3 | // HDHangzhouMuseumUITests 4 | // 5 | // Created by hengda2015mini on 16/2/23. 6 | // Copyright © 2016年 liuyi. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HDHangzhouMuseumUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation HDHangzhouMuseumUITests 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 | -------------------------------------------------------------------------------- /HDHangzhouMuseumUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 liuyi 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ScrollPaintingAnimation 2 | 3 | > 一个基于UIScrollView 实现的画轴异步分层动画展示界面 4 | 5 | 6 | ## 示例 7 | 8 | - ![效果图](https://github.com/Ethan561/ScrollPaintingAnimation/blob/master/20180713145214.gif) 9 | 10 | 11 | 12 | --------------------------------------------------------------------------------