├── .gitignore ├── .travis.yml ├── Example └── IntroViewDemo │ ├── IntroViewDemo.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata │ ├── IntroViewDemo.xcworkspace │ └── contents.xcworkspacedata │ ├── IntroViewDemo │ ├── 1View.xib │ ├── 1View1.png │ ├── 1View2.png │ ├── 1View3.png │ ├── 2View.xib │ ├── 2View1.png │ ├── 2View2.png │ ├── 3View.xib │ ├── 3View1.png │ ├── 3View2.png │ ├── 4View.xib │ ├── 4View1.png │ ├── 4View2.png │ ├── 5View.xib │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── FifthView.swift │ ├── FirstView.swift │ ├── FourthView.swift │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ ├── SecondView.swift │ ├── ThirdView.swift │ └── ViewController.swift │ ├── IntroViewDemoTests │ ├── Info.plist │ └── IntroViewDemoTests.swift │ ├── Podfile │ ├── Podfile.lock │ └── Pods │ ├── KDIntroView │ ├── LICENSE │ ├── Pod │ │ └── Classes │ │ │ ├── KDIntroView.swift │ │ │ └── KDIntroViewController.swift │ └── README.md │ ├── Local Podspecs │ └── KDIntroView.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ └── project.pbxproj │ └── Target Support Files │ ├── KDIntroView │ ├── Info.plist │ ├── KDIntroView-Private.xcconfig │ ├── KDIntroView-dummy.m │ ├── KDIntroView-prefix.pch │ ├── KDIntroView-umbrella.h │ ├── KDIntroView.modulemap │ └── KDIntroView.xcconfig │ └── Pods-IntroViewDemo │ ├── Info.plist │ ├── Pods-IntroViewDemo-acknowledgements.markdown │ ├── Pods-IntroViewDemo-acknowledgements.plist │ ├── Pods-IntroViewDemo-dummy.m │ ├── Pods-IntroViewDemo-frameworks.sh │ ├── Pods-IntroViewDemo-resources.sh │ ├── Pods-IntroViewDemo-umbrella.h │ ├── Pods-IntroViewDemo.debug.xcconfig │ ├── Pods-IntroViewDemo.modulemap │ └── Pods-IntroViewDemo.release.xcconfig ├── Imgs ├── inst1.png ├── inst2.jpg ├── inst3.jpg └── showup.gif ├── KDIntroView.podspec ├── LICENSE ├── Pod ├── Assets │ └── .gitkeep └── Classes │ ├── .gitkeep │ ├── KDIntroView.swift │ └── KDIntroViewController.swift ├── README.md └── _Pods.xcodeproj /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | # Pods/ 34 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # references: 2 | # * http://www.objc.io/issue-6/travis-ci.html 3 | # * https://github.com/supermarin/xcpretty#usage 4 | 5 | language: objective-c 6 | # cache: cocoapods 7 | # podfile: Example/Podfile 8 | # before_install: 9 | # - gem install cocoapods # Since Travis is not always on latest version 10 | # - pod install --project-directory=Example 11 | install: 12 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet 13 | script: 14 | - set -o pipefail && xcodebuild test -workspace Example/KDIntroView.xcworkspace -scheme KDIntroView-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty -c 15 | - pod lib lint --quick 16 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 42F139B51B49DB2F003D31A3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F139B41B49DB2F003D31A3 /* AppDelegate.swift */; }; 11 | 42F139B71B49DB2F003D31A3 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F139B61B49DB2F003D31A3 /* ViewController.swift */; }; 12 | 42F139BA1B49DB2F003D31A3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 42F139B81B49DB2F003D31A3 /* Main.storyboard */; }; 13 | 42F139BC1B49DB2F003D31A3 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 42F139BB1B49DB2F003D31A3 /* Images.xcassets */; }; 14 | 42F139BF1B49DB2F003D31A3 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42F139BD1B49DB2F003D31A3 /* LaunchScreen.xib */; }; 15 | 42F139CB1B49DB2F003D31A3 /* IntroViewDemoTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F139CA1B49DB2F003D31A3 /* IntroViewDemoTests.swift */; }; 16 | 42F139E11B49DE6C003D31A3 /* 3View.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42F139D41B49DE6C003D31A3 /* 3View.xib */; }; 17 | 42F139E21B49DE6C003D31A3 /* 3View1.png in Resources */ = {isa = PBXBuildFile; fileRef = 42F139D51B49DE6C003D31A3 /* 3View1.png */; }; 18 | 42F139E31B49DE6C003D31A3 /* 3View2.png in Resources */ = {isa = PBXBuildFile; fileRef = 42F139D61B49DE6C003D31A3 /* 3View2.png */; }; 19 | 42F139E41B49DE6C003D31A3 /* 4View.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42F139D71B49DE6C003D31A3 /* 4View.xib */; }; 20 | 42F139E51B49DE6C003D31A3 /* 4View1.png in Resources */ = {isa = PBXBuildFile; fileRef = 42F139D81B49DE6C003D31A3 /* 4View1.png */; }; 21 | 42F139E61B49DE6C003D31A3 /* 4View2.png in Resources */ = {isa = PBXBuildFile; fileRef = 42F139D91B49DE6C003D31A3 /* 4View2.png */; }; 22 | 42F139E71B49DE6C003D31A3 /* 2View.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42F139DA1B49DE6C003D31A3 /* 2View.xib */; }; 23 | 42F139E81B49DE6C003D31A3 /* 2View1.png in Resources */ = {isa = PBXBuildFile; fileRef = 42F139DB1B49DE6C003D31A3 /* 2View1.png */; }; 24 | 42F139E91B49DE6C003D31A3 /* 2View2.png in Resources */ = {isa = PBXBuildFile; fileRef = 42F139DC1B49DE6C003D31A3 /* 2View2.png */; }; 25 | 42F139EA1B49DE6C003D31A3 /* 1View.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42F139DD1B49DE6C003D31A3 /* 1View.xib */; }; 26 | 42F139EB1B49DE6C003D31A3 /* 1View1.png in Resources */ = {isa = PBXBuildFile; fileRef = 42F139DE1B49DE6C003D31A3 /* 1View1.png */; }; 27 | 42F139EC1B49DE6C003D31A3 /* 1View2.png in Resources */ = {isa = PBXBuildFile; fileRef = 42F139DF1B49DE6C003D31A3 /* 1View2.png */; }; 28 | 42F139ED1B49DE6C003D31A3 /* 1View3.png in Resources */ = {isa = PBXBuildFile; fileRef = 42F139E01B49DE6C003D31A3 /* 1View3.png */; }; 29 | 42F139EF1B49E00E003D31A3 /* FirstView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F139EE1B49E00E003D31A3 /* FirstView.swift */; }; 30 | 42F139F11B49E081003D31A3 /* SecondView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F139F01B49E081003D31A3 /* SecondView.swift */; }; 31 | 42F139F31B49E0BD003D31A3 /* ThirdView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F139F21B49E0BD003D31A3 /* ThirdView.swift */; }; 32 | 42F139F51B49E128003D31A3 /* FourthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F139F41B49E128003D31A3 /* FourthView.swift */; }; 33 | 42F139F71B49E5E2003D31A3 /* FifthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42F139F61B49E5E2003D31A3 /* FifthView.swift */; }; 34 | 42F139F91B49E64A003D31A3 /* 5View.xib in Resources */ = {isa = PBXBuildFile; fileRef = 42F139F81B49E64A003D31A3 /* 5View.xib */; }; 35 | E85D875ED388C9D7800E0571 /* Pods_IntroViewDemo.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85F34E89ED062EDC8F8863C5 /* Pods_IntroViewDemo.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 36 | /* End PBXBuildFile section */ 37 | 38 | /* Begin PBXContainerItemProxy section */ 39 | 42F139C51B49DB2F003D31A3 /* PBXContainerItemProxy */ = { 40 | isa = PBXContainerItemProxy; 41 | containerPortal = 42F139A71B49DB2F003D31A3 /* Project object */; 42 | proxyType = 1; 43 | remoteGlobalIDString = 42F139AE1B49DB2F003D31A3; 44 | remoteInfo = IntroViewDemo; 45 | }; 46 | /* End PBXContainerItemProxy section */ 47 | 48 | /* Begin PBXFileReference section */ 49 | 07ACD39D8E5AA014B5FF9EED /* Pods-IntroViewDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IntroViewDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo.release.xcconfig"; sourceTree = ""; }; 50 | 42F139AF1B49DB2F003D31A3 /* IntroViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = IntroViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 42F139B31B49DB2F003D31A3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | 42F139B41B49DB2F003D31A3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 53 | 42F139B61B49DB2F003D31A3 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 54 | 42F139B91B49DB2F003D31A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 55 | 42F139BB1B49DB2F003D31A3 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 56 | 42F139BE1B49DB2F003D31A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 57 | 42F139C41B49DB2F003D31A3 /* IntroViewDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = IntroViewDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 58 | 42F139C91B49DB2F003D31A3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | 42F139CA1B49DB2F003D31A3 /* IntroViewDemoTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IntroViewDemoTests.swift; sourceTree = ""; }; 60 | 42F139D41B49DE6C003D31A3 /* 3View.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = 3View.xib; sourceTree = ""; }; 61 | 42F139D51B49DE6C003D31A3 /* 3View1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 3View1.png; sourceTree = ""; }; 62 | 42F139D61B49DE6C003D31A3 /* 3View2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 3View2.png; sourceTree = ""; }; 63 | 42F139D71B49DE6C003D31A3 /* 4View.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = 4View.xib; sourceTree = ""; }; 64 | 42F139D81B49DE6C003D31A3 /* 4View1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 4View1.png; sourceTree = ""; }; 65 | 42F139D91B49DE6C003D31A3 /* 4View2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 4View2.png; sourceTree = ""; }; 66 | 42F139DA1B49DE6C003D31A3 /* 2View.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = 2View.xib; sourceTree = ""; }; 67 | 42F139DB1B49DE6C003D31A3 /* 2View1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 2View1.png; sourceTree = ""; }; 68 | 42F139DC1B49DE6C003D31A3 /* 2View2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 2View2.png; sourceTree = ""; }; 69 | 42F139DD1B49DE6C003D31A3 /* 1View.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = 1View.xib; sourceTree = ""; }; 70 | 42F139DE1B49DE6C003D31A3 /* 1View1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1View1.png; sourceTree = ""; }; 71 | 42F139DF1B49DE6C003D31A3 /* 1View2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1View2.png; sourceTree = ""; }; 72 | 42F139E01B49DE6C003D31A3 /* 1View3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = 1View3.png; sourceTree = ""; }; 73 | 42F139EE1B49E00E003D31A3 /* FirstView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FirstView.swift; sourceTree = ""; }; 74 | 42F139F01B49E081003D31A3 /* SecondView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SecondView.swift; sourceTree = ""; }; 75 | 42F139F21B49E0BD003D31A3 /* ThirdView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThirdView.swift; sourceTree = ""; }; 76 | 42F139F41B49E128003D31A3 /* FourthView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FourthView.swift; sourceTree = ""; }; 77 | 42F139F61B49E5E2003D31A3 /* FifthView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FifthView.swift; sourceTree = ""; }; 78 | 42F139F81B49E64A003D31A3 /* 5View.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = 5View.xib; sourceTree = ""; }; 79 | 67A80A91EEDB8B8FBE6ECF2C /* Pods-IntroViewDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-IntroViewDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo.debug.xcconfig"; sourceTree = ""; }; 80 | 85F34E89ED062EDC8F8863C5 /* Pods_IntroViewDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_IntroViewDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 81 | /* End PBXFileReference section */ 82 | 83 | /* Begin PBXFrameworksBuildPhase section */ 84 | 42F139AC1B49DB2F003D31A3 /* Frameworks */ = { 85 | isa = PBXFrameworksBuildPhase; 86 | buildActionMask = 2147483647; 87 | files = ( 88 | E85D875ED388C9D7800E0571 /* Pods_IntroViewDemo.framework in Frameworks */, 89 | ); 90 | runOnlyForDeploymentPostprocessing = 0; 91 | }; 92 | 42F139C11B49DB2F003D31A3 /* Frameworks */ = { 93 | isa = PBXFrameworksBuildPhase; 94 | buildActionMask = 2147483647; 95 | files = ( 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | /* End PBXFrameworksBuildPhase section */ 100 | 101 | /* Begin PBXGroup section */ 102 | 42F139A61B49DB2F003D31A3 = { 103 | isa = PBXGroup; 104 | children = ( 105 | 42F139B11B49DB2F003D31A3 /* IntroViewDemo */, 106 | 42F139C71B49DB2F003D31A3 /* IntroViewDemoTests */, 107 | 42F139B01B49DB2F003D31A3 /* Products */, 108 | F9E9C52EC4684F35C1B77C60 /* Pods */, 109 | EB691A8F7EDC2194EFDF6D57 /* Frameworks */, 110 | ); 111 | sourceTree = ""; 112 | }; 113 | 42F139B01B49DB2F003D31A3 /* Products */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 42F139AF1B49DB2F003D31A3 /* IntroViewDemo.app */, 117 | 42F139C41B49DB2F003D31A3 /* IntroViewDemoTests.xctest */, 118 | ); 119 | name = Products; 120 | sourceTree = ""; 121 | }; 122 | 42F139B11B49DB2F003D31A3 /* IntroViewDemo */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 42F139B41B49DB2F003D31A3 /* AppDelegate.swift */, 126 | 42F139B61B49DB2F003D31A3 /* ViewController.swift */, 127 | 42F139B81B49DB2F003D31A3 /* Main.storyboard */, 128 | 42F139BB1B49DB2F003D31A3 /* Images.xcassets */, 129 | 42F139BD1B49DB2F003D31A3 /* LaunchScreen.xib */, 130 | 42F139DD1B49DE6C003D31A3 /* 1View.xib */, 131 | 42F139EE1B49E00E003D31A3 /* FirstView.swift */, 132 | 42F139DA1B49DE6C003D31A3 /* 2View.xib */, 133 | 42F139F01B49E081003D31A3 /* SecondView.swift */, 134 | 42F139D41B49DE6C003D31A3 /* 3View.xib */, 135 | 42F139F21B49E0BD003D31A3 /* ThirdView.swift */, 136 | 42F139D71B49DE6C003D31A3 /* 4View.xib */, 137 | 42F139F41B49E128003D31A3 /* FourthView.swift */, 138 | 42F139F81B49E64A003D31A3 /* 5View.xib */, 139 | 42F139F61B49E5E2003D31A3 /* FifthView.swift */, 140 | 42F139B21B49DB2F003D31A3 /* Supporting Files */, 141 | ); 142 | path = IntroViewDemo; 143 | sourceTree = ""; 144 | }; 145 | 42F139B21B49DB2F003D31A3 /* Supporting Files */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 42F139D81B49DE6C003D31A3 /* 4View1.png */, 149 | 42F139D91B49DE6C003D31A3 /* 4View2.png */, 150 | 42F139D51B49DE6C003D31A3 /* 3View1.png */, 151 | 42F139D61B49DE6C003D31A3 /* 3View2.png */, 152 | 42F139DB1B49DE6C003D31A3 /* 2View1.png */, 153 | 42F139DC1B49DE6C003D31A3 /* 2View2.png */, 154 | 42F139DE1B49DE6C003D31A3 /* 1View1.png */, 155 | 42F139DF1B49DE6C003D31A3 /* 1View2.png */, 156 | 42F139E01B49DE6C003D31A3 /* 1View3.png */, 157 | 42F139B31B49DB2F003D31A3 /* Info.plist */, 158 | ); 159 | name = "Supporting Files"; 160 | sourceTree = ""; 161 | }; 162 | 42F139C71B49DB2F003D31A3 /* IntroViewDemoTests */ = { 163 | isa = PBXGroup; 164 | children = ( 165 | 42F139CA1B49DB2F003D31A3 /* IntroViewDemoTests.swift */, 166 | 42F139C81B49DB2F003D31A3 /* Supporting Files */, 167 | ); 168 | path = IntroViewDemoTests; 169 | sourceTree = ""; 170 | }; 171 | 42F139C81B49DB2F003D31A3 /* Supporting Files */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 42F139C91B49DB2F003D31A3 /* Info.plist */, 175 | ); 176 | name = "Supporting Files"; 177 | sourceTree = ""; 178 | }; 179 | EB691A8F7EDC2194EFDF6D57 /* Frameworks */ = { 180 | isa = PBXGroup; 181 | children = ( 182 | 85F34E89ED062EDC8F8863C5 /* Pods_IntroViewDemo.framework */, 183 | ); 184 | name = Frameworks; 185 | sourceTree = ""; 186 | }; 187 | F9E9C52EC4684F35C1B77C60 /* Pods */ = { 188 | isa = PBXGroup; 189 | children = ( 190 | 67A80A91EEDB8B8FBE6ECF2C /* Pods-IntroViewDemo.debug.xcconfig */, 191 | 07ACD39D8E5AA014B5FF9EED /* Pods-IntroViewDemo.release.xcconfig */, 192 | ); 193 | name = Pods; 194 | sourceTree = ""; 195 | }; 196 | /* End PBXGroup section */ 197 | 198 | /* Begin PBXNativeTarget section */ 199 | 42F139AE1B49DB2F003D31A3 /* IntroViewDemo */ = { 200 | isa = PBXNativeTarget; 201 | buildConfigurationList = 42F139CE1B49DB2F003D31A3 /* Build configuration list for PBXNativeTarget "IntroViewDemo" */; 202 | buildPhases = ( 203 | 5702A2CFF0620B87FF68FF33 /* Check Pods Manifest.lock */, 204 | 42F139AB1B49DB2F003D31A3 /* Sources */, 205 | 42F139AC1B49DB2F003D31A3 /* Frameworks */, 206 | 42F139AD1B49DB2F003D31A3 /* Resources */, 207 | 2E29AC882F0ECA6464FEE6FD /* Embed Pods Frameworks */, 208 | 47283A7EE54DBD4860AFCC0F /* Copy Pods Resources */, 209 | ); 210 | buildRules = ( 211 | ); 212 | dependencies = ( 213 | ); 214 | name = IntroViewDemo; 215 | productName = IntroViewDemo; 216 | productReference = 42F139AF1B49DB2F003D31A3 /* IntroViewDemo.app */; 217 | productType = "com.apple.product-type.application"; 218 | }; 219 | 42F139C31B49DB2F003D31A3 /* IntroViewDemoTests */ = { 220 | isa = PBXNativeTarget; 221 | buildConfigurationList = 42F139D11B49DB2F003D31A3 /* Build configuration list for PBXNativeTarget "IntroViewDemoTests" */; 222 | buildPhases = ( 223 | 42F139C01B49DB2F003D31A3 /* Sources */, 224 | 42F139C11B49DB2F003D31A3 /* Frameworks */, 225 | 42F139C21B49DB2F003D31A3 /* Resources */, 226 | ); 227 | buildRules = ( 228 | ); 229 | dependencies = ( 230 | 42F139C61B49DB2F003D31A3 /* PBXTargetDependency */, 231 | ); 232 | name = IntroViewDemoTests; 233 | productName = IntroViewDemoTests; 234 | productReference = 42F139C41B49DB2F003D31A3 /* IntroViewDemoTests.xctest */; 235 | productType = "com.apple.product-type.bundle.unit-test"; 236 | }; 237 | /* End PBXNativeTarget section */ 238 | 239 | /* Begin PBXProject section */ 240 | 42F139A71B49DB2F003D31A3 /* Project object */ = { 241 | isa = PBXProject; 242 | attributes = { 243 | LastSwiftMigration = 0700; 244 | LastSwiftUpdateCheck = 0700; 245 | LastUpgradeCheck = 0800; 246 | ORGANIZATIONNAME = "TakeFive Interactive"; 247 | TargetAttributes = { 248 | 42F139AE1B49DB2F003D31A3 = { 249 | CreatedOnToolsVersion = 6.4; 250 | LastSwiftMigration = 0800; 251 | }; 252 | 42F139C31B49DB2F003D31A3 = { 253 | CreatedOnToolsVersion = 6.4; 254 | LastSwiftMigration = 0800; 255 | TestTargetID = 42F139AE1B49DB2F003D31A3; 256 | }; 257 | }; 258 | }; 259 | buildConfigurationList = 42F139AA1B49DB2F003D31A3 /* Build configuration list for PBXProject "IntroViewDemo" */; 260 | compatibilityVersion = "Xcode 3.2"; 261 | developmentRegion = English; 262 | hasScannedForEncodings = 0; 263 | knownRegions = ( 264 | en, 265 | Base, 266 | ); 267 | mainGroup = 42F139A61B49DB2F003D31A3; 268 | productRefGroup = 42F139B01B49DB2F003D31A3 /* Products */; 269 | projectDirPath = ""; 270 | projectRoot = ""; 271 | targets = ( 272 | 42F139AE1B49DB2F003D31A3 /* IntroViewDemo */, 273 | 42F139C31B49DB2F003D31A3 /* IntroViewDemoTests */, 274 | ); 275 | }; 276 | /* End PBXProject section */ 277 | 278 | /* Begin PBXResourcesBuildPhase section */ 279 | 42F139AD1B49DB2F003D31A3 /* Resources */ = { 280 | isa = PBXResourcesBuildPhase; 281 | buildActionMask = 2147483647; 282 | files = ( 283 | 42F139EB1B49DE6C003D31A3 /* 1View1.png in Resources */, 284 | 42F139E11B49DE6C003D31A3 /* 3View.xib in Resources */, 285 | 42F139BA1B49DB2F003D31A3 /* Main.storyboard in Resources */, 286 | 42F139F91B49E64A003D31A3 /* 5View.xib in Resources */, 287 | 42F139E21B49DE6C003D31A3 /* 3View1.png in Resources */, 288 | 42F139E31B49DE6C003D31A3 /* 3View2.png in Resources */, 289 | 42F139E41B49DE6C003D31A3 /* 4View.xib in Resources */, 290 | 42F139E71B49DE6C003D31A3 /* 2View.xib in Resources */, 291 | 42F139EC1B49DE6C003D31A3 /* 1View2.png in Resources */, 292 | 42F139E51B49DE6C003D31A3 /* 4View1.png in Resources */, 293 | 42F139E61B49DE6C003D31A3 /* 4View2.png in Resources */, 294 | 42F139EA1B49DE6C003D31A3 /* 1View.xib in Resources */, 295 | 42F139E91B49DE6C003D31A3 /* 2View2.png in Resources */, 296 | 42F139ED1B49DE6C003D31A3 /* 1View3.png in Resources */, 297 | 42F139E81B49DE6C003D31A3 /* 2View1.png in Resources */, 298 | 42F139BF1B49DB2F003D31A3 /* LaunchScreen.xib in Resources */, 299 | 42F139BC1B49DB2F003D31A3 /* Images.xcassets in Resources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | 42F139C21B49DB2F003D31A3 /* Resources */ = { 304 | isa = PBXResourcesBuildPhase; 305 | buildActionMask = 2147483647; 306 | files = ( 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | /* End PBXResourcesBuildPhase section */ 311 | 312 | /* Begin PBXShellScriptBuildPhase section */ 313 | 2E29AC882F0ECA6464FEE6FD /* Embed Pods Frameworks */ = { 314 | isa = PBXShellScriptBuildPhase; 315 | buildActionMask = 2147483647; 316 | files = ( 317 | ); 318 | inputPaths = ( 319 | ); 320 | name = "Embed Pods Frameworks"; 321 | outputPaths = ( 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | shellPath = /bin/sh; 325 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo-frameworks.sh\"\n"; 326 | showEnvVarsInLog = 0; 327 | }; 328 | 47283A7EE54DBD4860AFCC0F /* Copy Pods Resources */ = { 329 | isa = PBXShellScriptBuildPhase; 330 | buildActionMask = 2147483647; 331 | files = ( 332 | ); 333 | inputPaths = ( 334 | ); 335 | name = "Copy Pods Resources"; 336 | outputPaths = ( 337 | ); 338 | runOnlyForDeploymentPostprocessing = 0; 339 | shellPath = /bin/sh; 340 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo-resources.sh\"\n"; 341 | showEnvVarsInLog = 0; 342 | }; 343 | 5702A2CFF0620B87FF68FF33 /* Check Pods Manifest.lock */ = { 344 | isa = PBXShellScriptBuildPhase; 345 | buildActionMask = 2147483647; 346 | files = ( 347 | ); 348 | inputPaths = ( 349 | ); 350 | name = "Check Pods Manifest.lock"; 351 | outputPaths = ( 352 | ); 353 | runOnlyForDeploymentPostprocessing = 0; 354 | shellPath = /bin/sh; 355 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 356 | showEnvVarsInLog = 0; 357 | }; 358 | /* End PBXShellScriptBuildPhase section */ 359 | 360 | /* Begin PBXSourcesBuildPhase section */ 361 | 42F139AB1B49DB2F003D31A3 /* Sources */ = { 362 | isa = PBXSourcesBuildPhase; 363 | buildActionMask = 2147483647; 364 | files = ( 365 | 42F139B71B49DB2F003D31A3 /* ViewController.swift in Sources */, 366 | 42F139F31B49E0BD003D31A3 /* ThirdView.swift in Sources */, 367 | 42F139EF1B49E00E003D31A3 /* FirstView.swift in Sources */, 368 | 42F139F11B49E081003D31A3 /* SecondView.swift in Sources */, 369 | 42F139F51B49E128003D31A3 /* FourthView.swift in Sources */, 370 | 42F139F71B49E5E2003D31A3 /* FifthView.swift in Sources */, 371 | 42F139B51B49DB2F003D31A3 /* AppDelegate.swift in Sources */, 372 | ); 373 | runOnlyForDeploymentPostprocessing = 0; 374 | }; 375 | 42F139C01B49DB2F003D31A3 /* Sources */ = { 376 | isa = PBXSourcesBuildPhase; 377 | buildActionMask = 2147483647; 378 | files = ( 379 | 42F139CB1B49DB2F003D31A3 /* IntroViewDemoTests.swift in Sources */, 380 | ); 381 | runOnlyForDeploymentPostprocessing = 0; 382 | }; 383 | /* End PBXSourcesBuildPhase section */ 384 | 385 | /* Begin PBXTargetDependency section */ 386 | 42F139C61B49DB2F003D31A3 /* PBXTargetDependency */ = { 387 | isa = PBXTargetDependency; 388 | target = 42F139AE1B49DB2F003D31A3 /* IntroViewDemo */; 389 | targetProxy = 42F139C51B49DB2F003D31A3 /* PBXContainerItemProxy */; 390 | }; 391 | /* End PBXTargetDependency section */ 392 | 393 | /* Begin PBXVariantGroup section */ 394 | 42F139B81B49DB2F003D31A3 /* Main.storyboard */ = { 395 | isa = PBXVariantGroup; 396 | children = ( 397 | 42F139B91B49DB2F003D31A3 /* Base */, 398 | ); 399 | name = Main.storyboard; 400 | sourceTree = ""; 401 | }; 402 | 42F139BD1B49DB2F003D31A3 /* LaunchScreen.xib */ = { 403 | isa = PBXVariantGroup; 404 | children = ( 405 | 42F139BE1B49DB2F003D31A3 /* Base */, 406 | ); 407 | name = LaunchScreen.xib; 408 | sourceTree = ""; 409 | }; 410 | /* End PBXVariantGroup section */ 411 | 412 | /* Begin XCBuildConfiguration section */ 413 | 42F139CC1B49DB2F003D31A3 /* Debug */ = { 414 | isa = XCBuildConfiguration; 415 | buildSettings = { 416 | ALWAYS_SEARCH_USER_PATHS = NO; 417 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 418 | CLANG_CXX_LIBRARY = "libc++"; 419 | CLANG_ENABLE_MODULES = YES; 420 | CLANG_ENABLE_OBJC_ARC = YES; 421 | CLANG_WARN_BOOL_CONVERSION = YES; 422 | CLANG_WARN_CONSTANT_CONVERSION = YES; 423 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 424 | CLANG_WARN_EMPTY_BODY = YES; 425 | CLANG_WARN_ENUM_CONVERSION = YES; 426 | CLANG_WARN_INFINITE_RECURSION = YES; 427 | CLANG_WARN_INT_CONVERSION = YES; 428 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 429 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 430 | CLANG_WARN_UNREACHABLE_CODE = YES; 431 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 432 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 433 | COPY_PHASE_STRIP = NO; 434 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 435 | ENABLE_STRICT_OBJC_MSGSEND = YES; 436 | ENABLE_TESTABILITY = YES; 437 | GCC_C_LANGUAGE_STANDARD = gnu99; 438 | GCC_DYNAMIC_NO_PIC = NO; 439 | GCC_NO_COMMON_BLOCKS = YES; 440 | GCC_OPTIMIZATION_LEVEL = 0; 441 | GCC_PREPROCESSOR_DEFINITIONS = ( 442 | "DEBUG=1", 443 | "$(inherited)", 444 | ); 445 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 446 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 447 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 448 | GCC_WARN_UNDECLARED_SELECTOR = YES; 449 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 450 | GCC_WARN_UNUSED_FUNCTION = YES; 451 | GCC_WARN_UNUSED_VARIABLE = YES; 452 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 453 | MTL_ENABLE_DEBUG_INFO = YES; 454 | ONLY_ACTIVE_ARCH = YES; 455 | SDKROOT = iphoneos; 456 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 457 | }; 458 | name = Debug; 459 | }; 460 | 42F139CD1B49DB2F003D31A3 /* Release */ = { 461 | isa = XCBuildConfiguration; 462 | buildSettings = { 463 | ALWAYS_SEARCH_USER_PATHS = NO; 464 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 465 | CLANG_CXX_LIBRARY = "libc++"; 466 | CLANG_ENABLE_MODULES = YES; 467 | CLANG_ENABLE_OBJC_ARC = YES; 468 | CLANG_WARN_BOOL_CONVERSION = YES; 469 | CLANG_WARN_CONSTANT_CONVERSION = YES; 470 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 471 | CLANG_WARN_EMPTY_BODY = YES; 472 | CLANG_WARN_ENUM_CONVERSION = YES; 473 | CLANG_WARN_INFINITE_RECURSION = YES; 474 | CLANG_WARN_INT_CONVERSION = YES; 475 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 476 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 477 | CLANG_WARN_UNREACHABLE_CODE = YES; 478 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 479 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 480 | COPY_PHASE_STRIP = NO; 481 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 482 | ENABLE_NS_ASSERTIONS = NO; 483 | ENABLE_STRICT_OBJC_MSGSEND = YES; 484 | GCC_C_LANGUAGE_STANDARD = gnu99; 485 | GCC_NO_COMMON_BLOCKS = YES; 486 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 487 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 488 | GCC_WARN_UNDECLARED_SELECTOR = YES; 489 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 490 | GCC_WARN_UNUSED_FUNCTION = YES; 491 | GCC_WARN_UNUSED_VARIABLE = YES; 492 | IPHONEOS_DEPLOYMENT_TARGET = 8.4; 493 | MTL_ENABLE_DEBUG_INFO = NO; 494 | SDKROOT = iphoneos; 495 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 496 | VALIDATE_PRODUCT = YES; 497 | }; 498 | name = Release; 499 | }; 500 | 42F139CF1B49DB2F003D31A3 /* Debug */ = { 501 | isa = XCBuildConfiguration; 502 | baseConfigurationReference = 67A80A91EEDB8B8FBE6ECF2C /* Pods-IntroViewDemo.debug.xcconfig */; 503 | buildSettings = { 504 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 505 | INFOPLIST_FILE = IntroViewDemo/Info.plist; 506 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 507 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 508 | PRODUCT_BUNDLE_IDENTIFIER = "com.TakeFiveInteractive.com.$(PRODUCT_NAME:rfc1034identifier)"; 509 | PRODUCT_NAME = "$(TARGET_NAME)"; 510 | SWIFT_VERSION = 3.0; 511 | }; 512 | name = Debug; 513 | }; 514 | 42F139D01B49DB2F003D31A3 /* Release */ = { 515 | isa = XCBuildConfiguration; 516 | baseConfigurationReference = 07ACD39D8E5AA014B5FF9EED /* Pods-IntroViewDemo.release.xcconfig */; 517 | buildSettings = { 518 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 519 | INFOPLIST_FILE = IntroViewDemo/Info.plist; 520 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 521 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 522 | PRODUCT_BUNDLE_IDENTIFIER = "com.TakeFiveInteractive.com.$(PRODUCT_NAME:rfc1034identifier)"; 523 | PRODUCT_NAME = "$(TARGET_NAME)"; 524 | SWIFT_VERSION = 3.0; 525 | }; 526 | name = Release; 527 | }; 528 | 42F139D21B49DB2F003D31A3 /* Debug */ = { 529 | isa = XCBuildConfiguration; 530 | buildSettings = { 531 | BUNDLE_LOADER = "$(TEST_HOST)"; 532 | FRAMEWORK_SEARCH_PATHS = ( 533 | "$(SDKROOT)/Developer/Library/Frameworks", 534 | "$(inherited)", 535 | ); 536 | GCC_PREPROCESSOR_DEFINITIONS = ( 537 | "DEBUG=1", 538 | "$(inherited)", 539 | ); 540 | INFOPLIST_FILE = IntroViewDemoTests/Info.plist; 541 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 542 | PRODUCT_BUNDLE_IDENTIFIER = "com.TakeFiveInteractive.com.$(PRODUCT_NAME:rfc1034identifier)"; 543 | PRODUCT_NAME = "$(TARGET_NAME)"; 544 | SWIFT_VERSION = 3.0; 545 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IntroViewDemo.app/IntroViewDemo"; 546 | }; 547 | name = Debug; 548 | }; 549 | 42F139D31B49DB2F003D31A3 /* Release */ = { 550 | isa = XCBuildConfiguration; 551 | buildSettings = { 552 | BUNDLE_LOADER = "$(TEST_HOST)"; 553 | FRAMEWORK_SEARCH_PATHS = ( 554 | "$(SDKROOT)/Developer/Library/Frameworks", 555 | "$(inherited)", 556 | ); 557 | INFOPLIST_FILE = IntroViewDemoTests/Info.plist; 558 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 559 | PRODUCT_BUNDLE_IDENTIFIER = "com.TakeFiveInteractive.com.$(PRODUCT_NAME:rfc1034identifier)"; 560 | PRODUCT_NAME = "$(TARGET_NAME)"; 561 | SWIFT_VERSION = 3.0; 562 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/IntroViewDemo.app/IntroViewDemo"; 563 | }; 564 | name = Release; 565 | }; 566 | /* End XCBuildConfiguration section */ 567 | 568 | /* Begin XCConfigurationList section */ 569 | 42F139AA1B49DB2F003D31A3 /* Build configuration list for PBXProject "IntroViewDemo" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | 42F139CC1B49DB2F003D31A3 /* Debug */, 573 | 42F139CD1B49DB2F003D31A3 /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | 42F139CE1B49DB2F003D31A3 /* Build configuration list for PBXNativeTarget "IntroViewDemo" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | 42F139CF1B49DB2F003D31A3 /* Debug */, 582 | 42F139D01B49DB2F003D31A3 /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Release; 586 | }; 587 | 42F139D11B49DB2F003D31A3 /* Build configuration list for PBXNativeTarget "IntroViewDemoTests" */ = { 588 | isa = XCConfigurationList; 589 | buildConfigurations = ( 590 | 42F139D21B49DB2F003D31A3 /* Debug */, 591 | 42F139D31B49DB2F003D31A3 /* Release */, 592 | ); 593 | defaultConfigurationIsVisible = 0; 594 | defaultConfigurationName = Release; 595 | }; 596 | /* End XCConfigurationList section */ 597 | }; 598 | rootObject = 42F139A71B49DB2F003D31A3 /* Project object */; 599 | } 600 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/1View.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 29 | 35 | 41 | 47 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/1View1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Example/IntroViewDemo/IntroViewDemo/1View1.png -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/1View2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Example/IntroViewDemo/IntroViewDemo/1View2.png -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/1View3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Example/IntroViewDemo/IntroViewDemo/1View3.png -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/2View.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 25 | 31 | 37 | 43 | 49 | 55 | 61 | 67 | 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 | 113 | 114 | 115 | 116 | 122 | 128 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 146 | 147 | 148 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/2View1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Example/IntroViewDemo/IntroViewDemo/2View1.png -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/2View2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Example/IntroViewDemo/IntroViewDemo/2View2.png -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/3View.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 28 | 35 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/3View1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Example/IntroViewDemo/IntroViewDemo/3View1.png -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/3View2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Example/IntroViewDemo/IntroViewDemo/3View2.png -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/4View.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 40 | 46 | 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 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/4View1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Example/IntroViewDemo/IntroViewDemo/4View1.png -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/4View2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Example/IntroViewDemo/IntroViewDemo/4View2.png -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/5View.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // IntroViewDemo 4 | // 5 | // Created by Kedan Li on 15/7/5. 6 | // Copyright (c) 2015年 TakeFive Interactive. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(application: UIApplication) { 23 | // 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. 24 | // 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. 25 | } 26 | 27 | func applicationDidEnterBackground(application: UIApplication) { 28 | // 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. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(application: UIApplication) { 33 | // 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. 34 | } 35 | 36 | func applicationDidBecomeActive(application: UIApplication) { 37 | // 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. 38 | } 39 | 40 | func applicationWillTerminate(application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/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 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/FifthView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FifthView.swift 3 | // IntroViewDemo 4 | // 5 | // Created by Kedan Li on 15/7/5. 6 | // Copyright (c) 2015年 TakeFive Interactive. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import KDIntroView 11 | 12 | class FifthView: KDIntroView { 13 | 14 | //empty view 15 | // use to perform the vertical movement 16 | 17 | override func moveEverythingAccordingToIndex(_ index: CGFloat) { 18 | 19 | } 20 | /* 21 | // Only override drawRect: if you perform custom drawing. 22 | // An empty implementation adversely affects performance during animation. 23 | override func drawRect(rect: CGRect) { 24 | // Drawing code 25 | } 26 | */ 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/FirstView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FirstView.swift 3 | // IntroViewDemo 4 | // 5 | // Created by Kedan Li on 15/7/5. 6 | // Copyright (c) 2015年 TakeFive Interactive. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import KDIntroView 11 | 12 | class FirstView: KDIntroView { 13 | 14 | @IBOutlet var lab1: UILabel! 15 | @IBOutlet var lab2: UILabel! 16 | @IBOutlet var lab3: UILabel! 17 | @IBOutlet var lab4: UILabel! 18 | @IBOutlet var lab5: UILabel! 19 | @IBOutlet var lab6: UILabel! 20 | 21 | @IBOutlet var icon: UIImageView! 22 | 23 | @IBOutlet var iconBack: UIImageView! 24 | @IBOutlet var iconFront: UIImageView! 25 | 26 | //index : 0 ~ view.frame.width 27 | override func moveEverythingAccordingToIndex(_ index: CGFloat){ 28 | 29 | move(icon, index: index, horizontolSpeed: 0, verticalSpeed: -2 / 5) 30 | icon.alpha = (200 - index) / 200 31 | 32 | move(lab1, index: index, horizontolSpeed: 0, verticalSpeed: 2 / 5) 33 | lab1.alpha = (200 - index) / 200 34 | 35 | move(lab2, index: index, horizontolSpeed: -6 / 5, verticalSpeed: -1 / 5) 36 | move(lab3, index: index, horizontolSpeed: -3 / 5, verticalSpeed: -1 / 10) 37 | move(lab4, index: index, horizontolSpeed: -4 / 5, verticalSpeed: 0) 38 | move(lab5, index: index, horizontolSpeed: -3 / 5, verticalSpeed: 1 / 10) 39 | move(lab6, index: index, horizontolSpeed: -6 / 5, verticalSpeed: 1 / 5) 40 | 41 | let enlarge = CGAffineTransform(a: 1 + index / 20, b: 0, c: 0, d: 1 + index / 20, tx: index, ty: 0) 42 | 43 | if index < frame.width * 0.75 { 44 | iconBack.transform = enlarge 45 | iconBack.alpha = 1 46 | }else{ 47 | iconBack.alpha = 0 48 | } 49 | 50 | } 51 | 52 | 53 | 54 | /* 55 | // Only override drawRect: if you perform custom drawing. 56 | // An empty implementation adversely affects performance during animation. 57 | override func drawRect(rect: CGRect) { 58 | // Drawing code 59 | } 60 | */ 61 | 62 | } 63 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/FourthView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FourthView.swift 3 | // IntroViewDemo 4 | // 5 | // Created by Kedan Li on 15/7/5. 6 | // Copyright (c) 2015年 TakeFive Interactive. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import KDIntroView 11 | 12 | class FourthView: KDIntroView { 13 | 14 | @IBOutlet var lab1: UILabel! 15 | @IBOutlet var lab2: UILabel! 16 | @IBOutlet var lab3: UILabel! 17 | 18 | @IBOutlet var year: UILabel! 19 | 20 | var year1: UIButton! 21 | var year2: UIButton! 22 | var year3: UIButton! 23 | var year4: UIButton! 24 | 25 | @IBOutlet var slipBoard: UIView! 26 | @IBOutlet var logo: UIButton! 27 | 28 | 29 | @IBOutlet var slideBoard: UIView! 30 | 31 | required init?(coder aDecoder: NSCoder) { 32 | super.init(coder: aDecoder) 33 | addYears() 34 | } 35 | 36 | func toInitialState(){ 37 | 38 | self.backgroundColor = UIColor.clear 39 | _ = CGAffineTransform(a: 20, b: 0, c: 0, d: 20, tx: 0, ty: 0) 40 | 41 | } 42 | 43 | override func moveEverythingAccordingToIndex(_ index: CGFloat){ 44 | 45 | _ = CGAffineTransform(translationX: index, y: 0) // stay 46 | _ = CGAffineTransform(translationX: index, y: -index / 3) //up 47 | _ = CGAffineTransform(translationX: -index/5, y: 0) //speed1 48 | _ = CGAffineTransform(translationX: index/4, y: 0) //speed2 49 | _ = CGAffineTransform(a: 1 + index / 20, b: 0, c: 0, d: 1 + index / 20, tx: index, ty: 0) //enlarge 50 | 51 | if index < 200{ 52 | let slideMotion = CGAffineTransform(translationX: -320 + index, y: 200 - index) 53 | slideBoard.transform = slideMotion 54 | }else if index >= 200 && index <= 220 { 55 | slideBoard.transform = CGAffineTransform(translationX: -320 + index, y: 200 - index) 56 | }else if index > 220 && index < 230{ 57 | slideBoard.transform = CGAffineTransform(translationX: -320 + index, y: -(230 - index) * 2) 58 | }else if index >= 220 && index <= 320{ 59 | slideBoard.transform = CGAffineTransform(translationX: -320 + index, y: 0) 60 | }else if index > 320{ 61 | slideBoard.transform = CGAffineTransform(translationX: -320 + index, y: (320 - index) * 2) 62 | } 63 | 64 | if index > frame.width * 1.7{ 65 | slipBoard.backgroundColor = UIColor.clear 66 | }else{ 67 | slipBoard.backgroundColor = UIColor.white 68 | } 69 | 70 | if index < 100{ 71 | lab1.transform = CGAffineTransform(translationX: 0, y: 200) 72 | lab2.transform = CGAffineTransform(translationX: 0, y: 200) 73 | lab3.transform = CGAffineTransform(translationX: 0, y: 200) 74 | }else if index >= 100 && index <= 140{ 75 | lab1.transform = CGAffineTransform(translationX: 0, y: (140 - index) * 5) 76 | lab2.transform = CGAffineTransform(translationX: 0, y: 200) 77 | lab3.transform = CGAffineTransform(translationX: 0, y: 200) 78 | }else if index > 140 && index < 180{ 79 | lab1.transform = CGAffineTransform(translationX: 0, y: 0) 80 | lab2.transform = CGAffineTransform(translationX: 0, y: (180 - index) * 5) 81 | lab3.transform = CGAffineTransform(translationX: 0, y: 200) 82 | }else if index >= 180 && index <= 200{ 83 | lab1.transform = CGAffineTransform(translationX: 0, y: 0) 84 | lab2.transform = CGAffineTransform(translationX: 0, y: 0) 85 | lab3.transform = CGAffineTransform(translationX: 0, y: (200 - index) * 10) 86 | }else if index > 200{ 87 | lab1.transform = CGAffineTransform(translationX: 0, y: 0) 88 | lab2.transform = CGAffineTransform(translationX: 0, y: 0) 89 | lab3.transform = CGAffineTransform(translationX: 0, y: 0) 90 | } 91 | 92 | if index < 220{ 93 | year1.transform = CGAffineTransform(translationX: 0, y: 0) 94 | year2.transform = CGAffineTransform(translationX: 0, y: 0) 95 | year3.transform = CGAffineTransform(translationX: 0, y: 0) 96 | year4.transform = CGAffineTransform(translationX: 0, y: 0) 97 | }else if index >= 220 && index <= 240{ 98 | year1.transform = CGAffineTransform(translationX: -(index - 220) * 15, y: 0) 99 | year2.transform = CGAffineTransform(translationX: 0, y: 0) 100 | year3.transform = CGAffineTransform(translationX: 0, y: 0) 101 | year4.transform = CGAffineTransform(translationX: 0, y: 0) 102 | }else if index > 240 && index < 260{ 103 | year1.transform = CGAffineTransform(translationX: -300, y: 0) 104 | year2.transform = CGAffineTransform(translationX: -(index - 240) * 15, y: 0) 105 | year3.transform = CGAffineTransform(translationX: 0, y: 0) 106 | year4.transform = CGAffineTransform(translationX: 0, y: 0) 107 | }else if index >= 260 && index <= 280{ 108 | year1.transform = CGAffineTransform(translationX: -300, y: 0) 109 | year2.transform = CGAffineTransform(translationX: -300, y: 0) 110 | year3.transform = CGAffineTransform(translationX: -(index - 260) * 15, y: 0) 111 | year4.transform = CGAffineTransform(translationX: 0, y: 0) 112 | }else if index > 280 && index < 300{ 113 | year1.transform = CGAffineTransform(translationX: -300, y: 0) 114 | year2.transform = CGAffineTransform(translationX: -300, y: 0) 115 | year3.transform = CGAffineTransform(translationX: -300, y: 0) 116 | year4.transform = CGAffineTransform(translationX: -(index - 280) * 15, y: 0) 117 | }else if index >= 300 && index <= 320{ 118 | year1.transform = CGAffineTransform(translationX: -300 + (index - 300), y: 0) 119 | year2.transform = CGAffineTransform(translationX: -300 + (index - 300), y: 0) 120 | year3.transform = CGAffineTransform(translationX: -300 + (index - 300), y: 0) 121 | year4.transform = CGAffineTransform(translationX: -300 + (index - 300), y: 0) 122 | 123 | }else if index > 320{ 124 | year1.transform = CGAffineTransform(translationX: -600 + index, y: (320 - index)) 125 | year2.transform = CGAffineTransform(translationX: -600 + index, y: (320 - index)) 126 | year3.transform = CGAffineTransform(translationX: -600 + index, y: (320 - index)) 127 | year4.transform = CGAffineTransform(translationX: -600 + index, y: (320 - index)) 128 | } 129 | 130 | if index < 320 { 131 | year.transform = CGAffineTransform(translationX: 0, y: 0) 132 | }else if index >= 320{ 133 | year.transform = CGAffineTransform(translationX: index - 320, y: (320 - index)) 134 | } 135 | 136 | if index < 400{ 137 | logo.alpha = 0 138 | }else if index >= 400{ 139 | logo.alpha = (index - 400) / 200 140 | } 141 | 142 | 143 | } 144 | 145 | func addYears(){ 146 | year1 = UIButton(frame: CGRect(x: 320, y: 80, width: 260, height: 90)) 147 | let angle = CGAffineTransform(rotationAngle: 0.242); 148 | 149 | var line = UIImageView(frame: CGRect(x: -0, y: 40, width: 290, height: 4)) 150 | line.backgroundColor = UIColor.white 151 | line.transform = angle 152 | year1.addSubview(line) 153 | 154 | var label = UILabel(frame: CGRect(x: -60, y: -40, width: 304, height: 110)) 155 | label.text = "2014" 156 | label.font = UIFont(name: "AvenirNext-Medium", size: 32) 157 | label.textAlignment = NSTextAlignment.right 158 | label.textColor = UIColor.white 159 | label.transform = angle 160 | year1.addSubview(label) 161 | addSubview(year1) 162 | 163 | year2 = UIButton(frame: CGRect(x: 320, y: 170, width: 260, height: 90)) 164 | line = UIImageView(frame: CGRect(x: -0, y: 40, width: 290, height: 4)) 165 | line.backgroundColor = UIColor.white 166 | line.transform = angle 167 | year2.addSubview(line) 168 | label = UILabel(frame: CGRect(x: -60, y: -40, width: 304, height: 110)) 169 | label.text = "2013" 170 | label.font = UIFont(name: "AvenirNext-Medium", size: 32) 171 | label.textAlignment = NSTextAlignment.right 172 | label.textColor = UIColor.white 173 | label.transform = angle 174 | year2.addSubview(label) 175 | addSubview(year2) 176 | 177 | year3 = UIButton(frame: CGRect(x: 320, y: 260, width: 260, height: 90)) 178 | line = UIImageView(frame: CGRect(x: -0, y: 40, width: 290, height: 4)) 179 | line.backgroundColor = UIColor.white 180 | line.transform = angle 181 | year3.addSubview(line) 182 | label = UILabel(frame: CGRect(x: -60, y: -40, width: 304, height: 110)) 183 | label.text = "2012" 184 | label.font = UIFont(name: "AvenirNext-Medium", size: 32) 185 | label.textAlignment = NSTextAlignment.right 186 | label.textColor = UIColor.white 187 | label.transform = angle 188 | year3.addSubview(label) 189 | addSubview(year3) 190 | 191 | year4 = UIButton(frame: CGRect(x: 320, y: 350, width: 260, height: 90)) 192 | line = UIImageView(frame: CGRect(x: -0, y: 40, width: 290, height: 4)) 193 | line.backgroundColor = UIColor.white 194 | line.transform = angle 195 | year4.addSubview(line) 196 | label = UILabel(frame: CGRect(x: -60, y: -40, width: 304, height: 110)) 197 | label.text = "2011" 198 | label.font = UIFont(name: "AvenirNext-Medium", size: 32) 199 | label.textAlignment = NSTextAlignment.right 200 | label.textColor = UIColor.white 201 | label.transform = angle 202 | year4.addSubview(label) 203 | addSubview(year4) 204 | } 205 | 206 | } 207 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/SecondView.swift: -------------------------------------------------------------------------------- 1 | 2 | // 3 | // SecondView.swift 4 | // IntroViewDemo 5 | // 6 | // Created by Kedan Li on 15/7/5. 7 | // Copyright (c) 2015年 TakeFive Interactive. All rights reserved. 8 | // 9 | 10 | import UIKit 11 | import KDIntroView 12 | 13 | class SecondView: KDIntroView{ 14 | 15 | //0 - 640 16 | 17 | @IBOutlet var words: UIView! 18 | @IBOutlet var redo1: UILabel! 19 | @IBOutlet var redo2: UILabel! 20 | @IBOutlet var board: UIView! 21 | 22 | @IBOutlet var choice1: UIImageView! 23 | @IBOutlet var choice2: UIImageView! 24 | @IBOutlet var choice3: UIImageView! 25 | @IBOutlet var choice4: UIImageView! 26 | @IBOutlet var choice5: UIImageView! 27 | @IBOutlet var choice6: UIImageView! 28 | @IBOutlet var choice7: UIImageView! 29 | @IBOutlet var choice8: UIImageView! 30 | @IBOutlet var choice9: UIImageView! 31 | 32 | //index : 0 ~ 2 * view.frame.width 33 | override func moveEverythingAccordingToIndex(_ index: CGFloat){ 34 | 35 | if index < frame.width / 2{ 36 | //movement of the board 37 | let enlarge = CGAffineTransform(a: 4 * index / (frame.width * 2), b: 0, c: 0, d: 4 * index / (frame.width * 2), tx: -frame.width + index, ty: board.frame.height - index * board.frame.height / (frame.width / 2)) 38 | board.transform = enlarge 39 | }else if index >= frame.width / 2 && index <= frame.width{ 40 | let enlarge = CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: -320 + index, ty: 0) 41 | board.transform = enlarge 42 | }else if index > frame.width && index < frame.width * 1.5{ 43 | 44 | let turnLeft = CGAffineTransform(rotationAngle: (index - 320) * 3.14 / 320) 45 | board.transform = turnLeft 46 | 47 | }else if index >= frame.width * 1.5{ 48 | let turnLeft = CGAffineTransform(rotationAngle: 3.14 / 2) 49 | board.transform = turnLeft 50 | } 51 | 52 | 53 | if index > frame.width / 2 { 54 | choice1.alpha = (index - 160) / 10 55 | choice2.alpha = (index - 170) / 10 56 | choice3.alpha = (index - 180) / 10 57 | choice4.alpha = (index - 190) / 10 58 | choice5.alpha = (index - 200) / 10 59 | choice6.alpha = (index - 210) / 10 60 | choice7.alpha = (index - 220) / 10 61 | choice8.alpha = (index - 230) / 10 62 | choice9.alpha = (index - 240) / 10 63 | }else{ 64 | choice1.alpha = 0 65 | choice2.alpha = 0 66 | choice3.alpha = 0 67 | choice4.alpha = 0 68 | choice5.alpha = 0 69 | choice6.alpha = 0 70 | choice7.alpha = 0 71 | choice8.alpha = 0 72 | choice9.alpha = 0 73 | } 74 | 75 | if index <= 0.75 * frame.width { 76 | redo1.alpha = 0 77 | } else if index > 0.75 * frame.width && index < 0.9 * frame.width{ 78 | let shrink = CGAffineTransform(a: (0.9 * frame.width - index) / 2, b: 0, c: 0, d: (0.9 * frame.width - index) / 2, tx: 0, ty: 0) 79 | redo1.alpha = (index - 0.75 * frame.width) / 40 80 | redo1.transform = shrink 81 | } else if index >= 0.9 * frame.width && index <= frame.width { 82 | redo1.alpha = 1 83 | let shrink = CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0) 84 | redo1.transform = shrink 85 | } 86 | 87 | let speed1 = CGAffineTransform(translationX: -(index - frame.width)/4, y: 0) 88 | let speed2 = CGAffineTransform(translationX: (index - frame.width)/4, y: 0) 89 | 90 | if index <= 260 { 91 | redo2.alpha = 0 92 | } else if index > 260 && index < 300{ 93 | let shrink = CGAffineTransform(a: (301 - index) / 2, b: 0, c: 0, d: (301 - index) / 2, tx: 0, ty: 0) 94 | redo2.alpha = (index - 260) / 40 95 | redo2.transform = shrink 96 | }else if index >= 300 && index <= 320 { 97 | redo2.alpha = 1 98 | let shrink = CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0) 99 | redo2.transform = shrink 100 | }else if index > 320{ 101 | redo2.transform = speed1 102 | } 103 | 104 | if index < 320{ 105 | words.alpha = index / 320 106 | }else{ 107 | words.alpha = 1 - (index - 320) / 320 108 | words.transform = speed2 109 | } 110 | 111 | 112 | // UIColor(red: 28, green: 187, blue: 157, alpha: 1) 113 | 114 | } 115 | 116 | } 117 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/ThirdView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdView.swift 3 | // IntroViewDemo 4 | // 5 | // Created by Kedan Li on 15/7/5. 6 | // Copyright (c) 2015年 TakeFive Interactive. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import KDIntroView 11 | 12 | class ThirdView: KDIntroView { 13 | 14 | @IBOutlet var lab1: UILabel! 15 | 16 | @IBOutlet var vertical: UIImageView! 17 | @IBOutlet var horizontal: UIImageView! 18 | 19 | @IBOutlet var portrait: UILabel! 20 | @IBOutlet var landscape: UILabel! 21 | 22 | 23 | //0 - 640 24 | override func moveEverythingAccordingToIndex(_ index: CGFloat){ 25 | 26 | _ = CGAffineTransform(translationX: index, y: 0) 27 | let offset = index - 250 28 | let turn = CGAffineTransform(a: 1 - offset / 70, 29 | b: offset / 70 - offset / 210, 30 | c: -offset / 70 + offset / 210, 31 | d: 1 - offset / 70, 32 | tx: offset, 33 | ty: offset * 2.0) 34 | let transform = CGAffineTransform(a: 1 - (index - 250) / 210, b: 0, c: 0, d: 1 - (index - 250) / 210, tx: -(index - 250) / 2, ty: -(index - 250) / 3) 35 | 36 | _ = CGAffineTransform(a: 1 + index / 20, b: 0, c: 0, d: 1 + index / 20, tx: index, ty: 0) //enlarge 37 | 38 | /* 39 | if index < 100{ 40 | self.superview?.backgroundColor = UIColor(red: 32.0/255, green: 176.0/255, blue: 140.0/255, alpha: 1) 41 | }else if index > 100 && index < 200{ 42 | self.superview?.backgroundColor = UIColor(red: (32.0 + (index - 100) * 1.11)/255, green: (176.0 + (index - 100) * 0.29)/255, blue: (140.0 + (index - 100) * 0.67)/255, alpha: 1) 43 | }else if index >= 200{ 44 | self.superview?.backgroundColor = UIColor(red: 143.0/255, green: 205.0/255, blue: 232.0/255, alpha: 1) 45 | } 46 | */ 47 | if index < 200{ 48 | vertical.alpha = 0 49 | horizontal.alpha = 1 50 | vertical.transform = CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0) 51 | horizontal.transform = CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0) 52 | }else if index > 250 && index <= 320 { 53 | vertical.transform = turn 54 | vertical.alpha = (index - 250) / 70 55 | horizontal.transform = transform 56 | portrait.alpha = (index - 250) / 70 57 | landscape.alpha = (index - 250) / 70 58 | 59 | }else if index > 320{ 60 | let offset = index - 320 61 | vertical.transform = CGAffineTransform(a: 0, 62 | b: 0.6777777, 63 | c: -0.6777777, 64 | d: 0, 65 | tx: 70, 66 | ty: 140 + -offset * offset / 30) 67 | horizontal.transform = CGAffineTransform(a: 0.6777777, b: 0, c: 0, d: 0.6777777, tx: -35, ty: -23.333 + (index - 320) * (index - 320) / 20) 68 | 69 | vertical.alpha = 1 - (index - 320) / 100 70 | horizontal.alpha = 1 - (index - 320) / 100 71 | portrait.alpha = 1 - (index - 320) / 100 72 | landscape.alpha = 1 - (index - 320) / 100 73 | } 74 | 75 | if index <= 280{ 76 | lab1.transform = CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 0) 77 | lab1.alpha = 1 78 | }else if index > 280 && index < 320{ 79 | lab1.transform = CGAffineTransform(a: 1 + (index - 280) / 100, b: 0, c: 0, d: 1 + (index - 280) / 100, tx: 0, ty: index - 280) 80 | lab1.alpha = 1 81 | }else if index >= 320 { 82 | lab1.transform = CGAffineTransform(a: 1.4 - (index - 320) / 70, b: 0, c: 0, d: 1.4 - (index - 320) / 70, tx: -(index - 320) * 3, ty: 40 + (index - 320) * (index - 320) / 20) 83 | lab1.alpha = (420 - index) / 100 84 | } 85 | 86 | } 87 | 88 | } 89 | 90 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemo/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // IntroViewDemo 4 | // 5 | // Created by Kedan Li on 15/7/5. 6 | // Copyright (c) 2015年 TakeFive Interactive. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import KDIntroView 11 | 12 | class ViewController: KDIntroViewController { 13 | 14 | @IBOutlet var beginButtonView: UIView! 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | beginButtonView.transform = CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 200) 19 | 20 | // Do any additional setup after loading the view, typically from a nib. 21 | } 22 | 23 | override func viewDidAppear(_ animated: Bool) { 24 | //setup the introduction view : number of pages : the nib name of each page 25 | setup(["1View","2View","3View","4View","5View"]) 26 | 27 | view.bringSubview(toFront: beginButtonView) 28 | } 29 | 30 | override func moveEverythingAccordingToIndex(_ index: CGFloat) { 31 | // setting the movement of the color of the background 32 | if index <= view.frame.width * 0.75{ 33 | view.backgroundColor = UIColor.white 34 | }else if index > view.frame.width * 0.75 && index <= view.frame.width * 1.25{ 35 | view.backgroundColor = UIColor(red: 46.0/255, green: 176.0/255, blue: 138.0/255, alpha: 1) 36 | }else if index > view.frame.width * 1.25 && index < view.frame.width * 1.75{ 37 | 38 | changeBackgroundColor(index, fromColor: UIColor(red: 46.0/255, green: 176.0/255, blue: 138.0/255, alpha: 1), toColor: UIColor(red: 143.0/255, green: 205.0/255, blue: 232.0/255, alpha: 1), fromIndex: view.frame.width * 1.25, toIndex: view.frame.width * 1.75) 39 | 40 | }else if index > view.frame.width * 1.75 && index <= view.frame.width * 3.65{ 41 | view.backgroundColor = UIColor(red: 143.0/255, green: 205.0/255, blue: 232.0/255, alpha: 1) 42 | }else if index > view.frame.width * 3.65{ 43 | view.backgroundColor = UIColor.white 44 | } 45 | 46 | if index >= view.frame.width * 3.75 && index <= view.frame.width * 4{ 47 | 48 | print(index - view.frame.width * 3.75) 49 | 50 | beginButtonView.transform = CGAffineTransform(a: (index - view.frame.width * 3.75) * 2 / 150, b: 0, c: 0, d: (index - view.frame.width * 3.75) * 2 / 150, tx: 0, ty: 160 - (index - view.frame.width * 3.75) * 2) 51 | }else{ 52 | beginButtonView.transform = CGAffineTransform(a: 1, b: 0, c: 0, d: 1, tx: 0, ty: 160) 53 | } 54 | } 55 | 56 | override func didReceiveMemoryWarning() { 57 | super.didReceiveMemoryWarning() 58 | // Dispose of any resources that can be recreated. 59 | } 60 | 61 | 62 | } 63 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemoTests/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 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/IntroViewDemoTests/IntroViewDemoTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // IntroViewDemoTests.swift 3 | // IntroViewDemoTests 4 | // 5 | // Created by Kedan Li on 15/7/5. 6 | // Copyright (c) 2015年 TakeFive Interactive. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | 12 | class IntroViewDemoTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | XCTAssert(true, "Pass") 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measureBlock() { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | 3 | source 'https://github.com/CocoaPods/Specs.git' 4 | platform :ios, '8.0' 5 | 6 | workspace 'IntroViewDemo' 7 | 8 | xcodeproj 'IntroViewDemo' 9 | 10 | use_frameworks! 11 | 12 | target 'IntroViewDemo' do 13 | xcodeproj 'IntroViewDemo' 14 | 15 | pod 'KDIntroView', :git => 'https://github.com/likedan/KDIntroView' 16 | end 17 | 18 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - KDIntroView (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - KDIntroView (from `https://github.com/likedan/KDIntroView`) 6 | 7 | EXTERNAL SOURCES: 8 | KDIntroView: 9 | :git: https://github.com/likedan/KDIntroView 10 | 11 | CHECKOUT OPTIONS: 12 | KDIntroView: 13 | :commit: ae46186f4e1d63a6cfcfcec93bc0c10b7bff5f15 14 | :git: https://github.com/likedan/KDIntroView 15 | 16 | SPEC CHECKSUMS: 17 | KDIntroView: 3cf7a2af4a8da23e2f68492aff72421b24549eaa 18 | 19 | COCOAPODS: 0.38.0.beta.1 20 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/KDIntroView/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 likedan 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/KDIntroView/Pod/Classes/KDIntroView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KDIntroView.swift 3 | // Pods 4 | // 5 | // Created by Kedan Li on 15/7/5. 6 | // 7 | // 8 | 9 | 10 | import UIKit 11 | 12 | open class KDIntroView: UIView { 13 | 14 | var uppserBound: CGFloat = 0 15 | 16 | var lowerBound: CGFloat = 0 17 | 18 | //index : 0 ~ 2 * view.frame.width 19 | open func moveEverythingAccordingToIndex(_ index: CGFloat) { 20 | fatalError("Must Override") 21 | } 22 | // the view stays in the same position as user scroll 23 | open func still(_ view: UIView, index: CGFloat){ 24 | view.transform = CGAffineTransform(translationX: index, y: 0) 25 | } 26 | // horizontolSpeed: positive value for moving right, negative value for moving left, 0 for the same speed as scroll view 27 | // verticalSpeed: positive value for moving down, negative value for moving up 28 | open func move(_ view: UIView, index: CGFloat, horizontolSpeed: CGFloat, verticalSpeed: CGFloat){ 29 | view.transform = CGAffineTransform(translationX: index * (horizontolSpeed + 1), y: index * verticalSpeed) 30 | } 31 | 32 | func isInBound(_ num: CGFloat)->Bool{ 33 | if num >= lowerBound && num <= uppserBound{ 34 | return true 35 | } 36 | return false 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/KDIntroView/Pod/Classes/KDIntroViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // IntroView 4 | // 5 | // Created by Kedan Li on 14/11/10. 6 | // Copyright (c) 2014年 Kedan Li. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class KDIntroViewController: UIViewController, UIScrollViewDelegate{ 12 | 13 | open var scroller: UIScrollView! 14 | open var pageControl: UIPageControl! 15 | 16 | var dragger: UIView! 17 | 18 | var introViews = [KDIntroView]() 19 | 20 | var currentPageNum:Int = 0 21 | 22 | 23 | open override func viewWillAppear(_ animated: Bool) { 24 | // initialization 25 | scroller = UIScrollView(frame: view.frame) 26 | scroller.showsHorizontalScrollIndicator = false 27 | scroller.delegate = self 28 | dragger = UIView(frame: view.frame) 29 | dragger.backgroundColor = UIColor.clear 30 | let gestureReco = UIPanGestureRecognizer(target: self, action: #selector(KDIntroViewController.dragged(_:))) 31 | dragger.addGestureRecognizer(gestureReco) 32 | 33 | 34 | view.addSubview(scroller) 35 | view.addSubview(dragger) 36 | } 37 | 38 | open func setup(_ views: [String]){ 39 | 40 | for index in 0 ..< views.count { 41 | 42 | let introView = Bundle.main.loadNibNamed(views[index], owner: self, options: nil)?[0] as! KDIntroView 43 | introView.center.x = view.center.x + view.frame.width * CGFloat(index) 44 | scroller.addSubview(introView) 45 | introViews.append(introView) 46 | 47 | if index == 0 || index == views.count - 1{ 48 | introView.uppserBound = view.frame.width 49 | introView.lowerBound = 0 50 | }else{ 51 | introView.uppserBound = view.frame.width * CGFloat(index + 1) 52 | introView.lowerBound = view.frame.width * CGFloat(index - 1) 53 | } 54 | 55 | } 56 | 57 | // create default page control 58 | if pageControl == nil{ 59 | pageControl = UIPageControl(frame: CGRect(x: 0, y: 0, width: 100, height: 40)) 60 | pageControl.backgroundColor = UIColor.clear 61 | pageControl.pageIndicatorTintColor = UIColor.gray 62 | pageControl.currentPageIndicatorTintColor = UIColor.white 63 | pageControl.currentPage = 0 64 | pageControl.center = CGPoint(x: view.frame.width / 2, y: view.frame.height * 6 / 7) 65 | } 66 | pageControl.numberOfPages = views.count 67 | view.addSubview(pageControl) 68 | 69 | 70 | } 71 | 72 | func determineCurrentPage(){ 73 | if scroller.contentOffset.x > view.frame.width / 2 + view.frame.width * CGFloat(currentPageNum) && currentPageNum < pageControl.numberOfPages{ 74 | currentPageNum += 1 75 | }else if scroller.contentOffset.x < view.frame.width * CGFloat(currentPageNum - 1) + view.frame.width / 2 && currentPageNum > 0{ 76 | currentPageNum -= 1 77 | } 78 | pageControl.currentPage = currentPageNum 79 | scroller.setContentOffset(CGPoint(x: view.frame.width * CGFloat(currentPageNum), y: 0), animated: true) 80 | } 81 | 82 | 83 | func dragged(_ recognizer : UIPanGestureRecognizer) { 84 | 85 | let translation = recognizer.translation(in: self.view) 86 | scroller.setContentOffset(CGPoint(x: view.frame.width * CGFloat(currentPageNum) - translation.x, y: 0), animated: false) 87 | 88 | if recognizer.state == UIGestureRecognizerState.cancelled || recognizer.state == UIGestureRecognizerState.failed || recognizer.state == UIGestureRecognizerState.ended{ 89 | // should change page 90 | if abs(translation.x) > 30 { 91 | if currentPageNum != 0 && translation.x > 0 { 92 | currentPageNum -= 1 93 | }else if currentPageNum != pageControl.numberOfPages - 1 && translation.x < 0{ 94 | currentPageNum += 1 95 | } 96 | pageControl.currentPage = currentPageNum 97 | } 98 | scroller.setContentOffset(CGPoint(x: view.frame.width * CGFloat(currentPageNum), y: 0), animated: true) 99 | 100 | } 101 | 102 | } 103 | 104 | open func scrollViewDidScroll(_ scrollView: UIScrollView) { 105 | 106 | let offset = scroller.contentOffset.x 107 | 108 | for index in 0 ..< introViews.count { 109 | if introViews[index].isInBound(offset){ 110 | var movingIndex = offset 111 | if index >= 2{ 112 | movingIndex = offset - CGFloat(index - 1) * view.frame.width 113 | } 114 | introViews[index].moveEverythingAccordingToIndex(movingIndex) 115 | } 116 | moveEverythingAccordingToIndex(offset) 117 | } 118 | } 119 | //index : 0 ~ scrollview.contentsize 120 | open func moveEverythingAccordingToIndex(_ index: CGFloat){ 121 | fatalError("Must Override") 122 | } 123 | 124 | open func changeBackgroundColor(_ index: CGFloat, fromColor: UIColor, toColor: UIColor, fromIndex: CGFloat, toIndex: CGFloat){ 125 | 126 | if index > fromIndex && index < toIndex{ 127 | let difference = toIndex - fromIndex 128 | let fromColorComponent = fromColor.cgColor.components 129 | let toColorComponent = toColor.cgColor.components 130 | 131 | let differenceInRed = ((toColorComponent?[0])! as CGFloat) - (fromColorComponent?[0])! as CGFloat 132 | let differenceInGreen = ((toColorComponent?[1])! as CGFloat) - (fromColorComponent?[1])! as CGFloat 133 | let differenceInBlue = ((toColorComponent?[2])! as CGFloat) - (fromColorComponent?[2])! as CGFloat 134 | view.backgroundColor = UIColor(red: (fromColorComponent?[0])! as CGFloat + differenceInRed / difference * (index - fromIndex), green: (fromColorComponent?[1])! as CGFloat + differenceInGreen / difference * (index - fromIndex), blue: (fromColorComponent?[2])! as CGFloat + differenceInBlue / difference * (index - fromIndex), alpha: 1) 135 | } 136 | 137 | } 138 | 139 | } 140 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/KDIntroView/README.md: -------------------------------------------------------------------------------- 1 | # KDIntroView 2 | 3 | [![CI Status](http://img.shields.io/travis/likedan/KDIntroView.svg?style=flat)](https://travis-ci.org/likedan/KDIntroView) 4 | [![Version](https://img.shields.io/cocoapods/v/KDIntroView.svg?style=flat)](http://cocoapods.org/pods/KDIntroView) 5 | [![License](https://img.shields.io/cocoapods/l/KDIntroView.svg?style=flat)](http://cocoapods.org/pods/KDIntroView) 6 | [![Platform](https://img.shields.io/cocoapods/p/KDIntroView.svg?style=flat)](http://cocoapods.org/pods/KDIntroView) 7 | 8 | ## Usage 9 | 10 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 11 | 12 | ## Requirements 13 | 14 | ## Installation 15 | 16 | KDIntroView is available through [CocoaPods](http://cocoapods.org). To install 17 | it, simply add the following line to your Podfile: 18 | 19 | ```ruby 20 | pod "KDIntroView" 21 | ``` 22 | 23 | ## Author 24 | 25 | likedan, likedan5@icloud.com 26 | 27 | ## License 28 | 29 | KDIntroView is available under the MIT license. See the LICENSE file for more info. 30 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Local Podspecs/KDIntroView.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KDIntroView", 3 | "version": "0.1.0", 4 | "summary": "A short description of KDIntroView.", 5 | "description": " An optional longer description of KDIntroView\n\n * Markdown format.\n * Don't worry about the indent, we strip it!\n", 6 | "homepage": "https://github.com//KDIntroView", 7 | "license": "MIT", 8 | "authors": { 9 | "likedan": "likedan5@icloud.com" 10 | }, 11 | "source": { 12 | "git": "https://github.com//KDIntroView.git", 13 | "tag": "0.1.0" 14 | }, 15 | "platforms": { 16 | "ios": "8.0" 17 | }, 18 | "requires_arc": true, 19 | "source_files": "Pod/Classes/*.swift", 20 | "resource_bundles": { 21 | "KDIntroView": [ 22 | "Pod/Assets/*.png" 23 | ] 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - KDIntroView (0.1.0) 3 | 4 | DEPENDENCIES: 5 | - KDIntroView (from `https://github.com/likedan/KDIntroView`) 6 | 7 | EXTERNAL SOURCES: 8 | KDIntroView: 9 | :git: https://github.com/likedan/KDIntroView 10 | 11 | CHECKOUT OPTIONS: 12 | KDIntroView: 13 | :commit: ae46186f4e1d63a6cfcfcec93bc0c10b7bff5f15 14 | :git: https://github.com/likedan/KDIntroView 15 | 16 | SPEC CHECKSUMS: 17 | KDIntroView: 3cf7a2af4a8da23e2f68492aff72421b24549eaa 18 | 19 | COCOAPODS: 0.38.0.beta.1 20 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Pods.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 5C83F105D27CF39898D1CC3D /* KDIntroView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1431D473375C902CC59D50F2 /* KDIntroView.swift */; }; 11 | 5EF2835A885EE9EFE96A370E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A523D4A934D0D5DBC562CCE /* Foundation.framework */; }; 12 | 6BABDE5A5BD05F5BC2BD5E2D /* KDIntroView.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9AA87FA543864B6EC9006306 /* KDIntroView.bundle */; }; 13 | 9392AE1501124C050B619322 /* KDIntroView-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F75641922521C8A47340D5E6 /* KDIntroView-dummy.m */; }; 14 | 9D097EED1C9793F64BA0CC1C /* Pods-IntroViewDemo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E2EFCD7025BAC69F337B4F7D /* Pods-IntroViewDemo-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 15 | AAB5F89FD60C61BDF796C2C5 /* Pods-IntroViewDemo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D502081F40B14BF854EE81A3 /* Pods-IntroViewDemo-dummy.m */; }; 16 | BF43E52C0F382FEA91333315 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3A523D4A934D0D5DBC562CCE /* Foundation.framework */; }; 17 | C6B693C4E151AE28A2187DD3 /* KDIntroViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13D38A473371773A7BEF4EDB /* KDIntroViewController.swift */; }; 18 | EB8E0210DFBCCC58D10DF6CE /* KDIntroView-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FF5D6DEABCD30D3086A03F7A /* KDIntroView-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 5AEDCD214D30DC53D8DC0D2C /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 742A35C9B021B684F0DFF8EA /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 112AE099E3FB813A1CDA1F5A; 27 | remoteInfo = KDIntroView; 28 | }; 29 | 939338B2D06B0C3738B2E7F8 /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 742A35C9B021B684F0DFF8EA /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 9CA700BA96E85F395013F3F2; 34 | remoteInfo = "KDIntroView-KDIntroView"; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 0A32F18E24A4ABC113094658 /* Pods-IntroViewDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-IntroViewDemo.debug.xcconfig"; sourceTree = ""; }; 40 | 13D38A473371773A7BEF4EDB /* KDIntroViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KDIntroViewController.swift; path = Pod/Classes/KDIntroViewController.swift; sourceTree = ""; }; 41 | 1431D473375C902CC59D50F2 /* KDIntroView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = KDIntroView.swift; path = Pod/Classes/KDIntroView.swift; sourceTree = ""; }; 42 | 1594C2A990C33F84914675B7 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 43 | 1B0F2BEDDC1FD8BCC0D4CD5E /* Pods-IntroViewDemo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-IntroViewDemo-acknowledgements.markdown"; sourceTree = ""; }; 44 | 22177C85E8CE8482CB2245E9 /* KDIntroView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = KDIntroView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 3A523D4A934D0D5DBC562CCE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 46 | 40BAFD76AF0044AD75C5F425 /* Pods-IntroViewDemo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-IntroViewDemo-acknowledgements.plist"; sourceTree = ""; }; 47 | 447BB37C9156AFA0ED33E386 /* Podfile */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 48 | 4C80DD1737E451A4FDBAEAF7 /* Pods_IntroViewDemo.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_IntroViewDemo.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 579E35C0B12F5EC24B0BDB9F /* Pods-IntroViewDemo.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-IntroViewDemo.modulemap"; sourceTree = ""; }; 50 | 5BC48B07FE974B338418E44D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 5CB6022A5D9F28FD562E65E9 /* Pods-IntroViewDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-IntroViewDemo.release.xcconfig"; sourceTree = ""; }; 52 | 921DA634FB65FCEF6452E55F /* KDIntroView.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = KDIntroView.modulemap; sourceTree = ""; }; 53 | 9AA87FA543864B6EC9006306 /* KDIntroView.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KDIntroView.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 9B5981D07023CAC70C0FF389 /* KDIntroView-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "KDIntroView-prefix.pch"; sourceTree = ""; }; 55 | A39E576648929E7568B2F9A3 /* KDIntroView-Private.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "KDIntroView-Private.xcconfig"; sourceTree = ""; }; 56 | ADEF08830A6B5AA1D5EFEC12 /* Pods-IntroViewDemo-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-IntroViewDemo-frameworks.sh"; sourceTree = ""; }; 57 | B05568008106A55FA55B5FE7 /* Pods-IntroViewDemo-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-IntroViewDemo-resources.sh"; sourceTree = ""; }; 58 | BDE0A2925F585374CF3C3F0E /* KDIntroView.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = KDIntroView.xcconfig; sourceTree = ""; }; 59 | D502081F40B14BF854EE81A3 /* Pods-IntroViewDemo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-IntroViewDemo-dummy.m"; sourceTree = ""; }; 60 | E2EFCD7025BAC69F337B4F7D /* Pods-IntroViewDemo-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-IntroViewDemo-umbrella.h"; sourceTree = ""; }; 61 | F75641922521C8A47340D5E6 /* KDIntroView-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "KDIntroView-dummy.m"; sourceTree = ""; }; 62 | FF5D6DEABCD30D3086A03F7A /* KDIntroView-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "KDIntroView-umbrella.h"; sourceTree = ""; }; 63 | /* End PBXFileReference section */ 64 | 65 | /* Begin PBXFrameworksBuildPhase section */ 66 | ADB0B620D02179525EC0D0C0 /* Frameworks */ = { 67 | isa = PBXFrameworksBuildPhase; 68 | buildActionMask = 2147483647; 69 | files = ( 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | C786CF17B97D364F5CEE4F25 /* Frameworks */ = { 74 | isa = PBXFrameworksBuildPhase; 75 | buildActionMask = 2147483647; 76 | files = ( 77 | BF43E52C0F382FEA91333315 /* Foundation.framework in Frameworks */, 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | E66E0324339E839788770081 /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | 5EF2835A885EE9EFE96A370E /* Foundation.framework in Frameworks */, 86 | ); 87 | runOnlyForDeploymentPostprocessing = 0; 88 | }; 89 | /* End PBXFrameworksBuildPhase section */ 90 | 91 | /* Begin PBXGroup section */ 92 | 058E2B73FDD43764C965FD71 /* Pods */ = { 93 | isa = PBXGroup; 94 | children = ( 95 | 8AC25F6185DB7EF436D491F5 /* KDIntroView */, 96 | ); 97 | name = Pods; 98 | sourceTree = ""; 99 | }; 100 | 0A54CE1DAAC684FE65F69695 /* Products */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 9AA87FA543864B6EC9006306 /* KDIntroView.bundle */, 104 | 22177C85E8CE8482CB2245E9 /* KDIntroView.framework */, 105 | 4C80DD1737E451A4FDBAEAF7 /* Pods_IntroViewDemo.framework */, 106 | ); 107 | name = Products; 108 | sourceTree = ""; 109 | }; 110 | 1618E9D6935476C830D74550 /* Support Files */ = { 111 | isa = PBXGroup; 112 | children = ( 113 | 1594C2A990C33F84914675B7 /* Info.plist */, 114 | 921DA634FB65FCEF6452E55F /* KDIntroView.modulemap */, 115 | BDE0A2925F585374CF3C3F0E /* KDIntroView.xcconfig */, 116 | A39E576648929E7568B2F9A3 /* KDIntroView-Private.xcconfig */, 117 | F75641922521C8A47340D5E6 /* KDIntroView-dummy.m */, 118 | 9B5981D07023CAC70C0FF389 /* KDIntroView-prefix.pch */, 119 | FF5D6DEABCD30D3086A03F7A /* KDIntroView-umbrella.h */, 120 | ); 121 | name = "Support Files"; 122 | path = "../Target Support Files/KDIntroView"; 123 | sourceTree = ""; 124 | }; 125 | 73486155A6CC51C27AA5EE9C /* Targets Support Files */ = { 126 | isa = PBXGroup; 127 | children = ( 128 | 8C7A29F0B69F9A7C4D06BCB1 /* Pods-IntroViewDemo */, 129 | ); 130 | name = "Targets Support Files"; 131 | sourceTree = ""; 132 | }; 133 | 796B46B10C69FE5BB53626D1 = { 134 | isa = PBXGroup; 135 | children = ( 136 | 447BB37C9156AFA0ED33E386 /* Podfile */, 137 | F210D9927014E6021A29EBF4 /* Frameworks */, 138 | 058E2B73FDD43764C965FD71 /* Pods */, 139 | 0A54CE1DAAC684FE65F69695 /* Products */, 140 | 73486155A6CC51C27AA5EE9C /* Targets Support Files */, 141 | ); 142 | sourceTree = ""; 143 | }; 144 | 8AC25F6185DB7EF436D491F5 /* KDIntroView */ = { 145 | isa = PBXGroup; 146 | children = ( 147 | 1431D473375C902CC59D50F2 /* KDIntroView.swift */, 148 | 13D38A473371773A7BEF4EDB /* KDIntroViewController.swift */, 149 | 1618E9D6935476C830D74550 /* Support Files */, 150 | ); 151 | path = KDIntroView; 152 | sourceTree = ""; 153 | }; 154 | 8C7A29F0B69F9A7C4D06BCB1 /* Pods-IntroViewDemo */ = { 155 | isa = PBXGroup; 156 | children = ( 157 | 5BC48B07FE974B338418E44D /* Info.plist */, 158 | 579E35C0B12F5EC24B0BDB9F /* Pods-IntroViewDemo.modulemap */, 159 | 1B0F2BEDDC1FD8BCC0D4CD5E /* Pods-IntroViewDemo-acknowledgements.markdown */, 160 | 40BAFD76AF0044AD75C5F425 /* Pods-IntroViewDemo-acknowledgements.plist */, 161 | D502081F40B14BF854EE81A3 /* Pods-IntroViewDemo-dummy.m */, 162 | ADEF08830A6B5AA1D5EFEC12 /* Pods-IntroViewDemo-frameworks.sh */, 163 | B05568008106A55FA55B5FE7 /* Pods-IntroViewDemo-resources.sh */, 164 | E2EFCD7025BAC69F337B4F7D /* Pods-IntroViewDemo-umbrella.h */, 165 | 0A32F18E24A4ABC113094658 /* Pods-IntroViewDemo.debug.xcconfig */, 166 | 5CB6022A5D9F28FD562E65E9 /* Pods-IntroViewDemo.release.xcconfig */, 167 | ); 168 | name = "Pods-IntroViewDemo"; 169 | path = "Target Support Files/Pods-IntroViewDemo"; 170 | sourceTree = ""; 171 | }; 172 | A81AAB18CD459DEF568B9CF6 /* iOS */ = { 173 | isa = PBXGroup; 174 | children = ( 175 | 3A523D4A934D0D5DBC562CCE /* Foundation.framework */, 176 | ); 177 | name = iOS; 178 | sourceTree = ""; 179 | }; 180 | F210D9927014E6021A29EBF4 /* Frameworks */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | A81AAB18CD459DEF568B9CF6 /* iOS */, 184 | ); 185 | name = Frameworks; 186 | sourceTree = ""; 187 | }; 188 | /* End PBXGroup section */ 189 | 190 | /* Begin PBXHeadersBuildPhase section */ 191 | 3CB67EE9FC3A7C8525F6E99C /* Headers */ = { 192 | isa = PBXHeadersBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | 9D097EED1C9793F64BA0CC1C /* Pods-IntroViewDemo-umbrella.h in Headers */, 196 | ); 197 | runOnlyForDeploymentPostprocessing = 0; 198 | }; 199 | F1B96ED05A257F264F13AECC /* Headers */ = { 200 | isa = PBXHeadersBuildPhase; 201 | buildActionMask = 2147483647; 202 | files = ( 203 | EB8E0210DFBCCC58D10DF6CE /* KDIntroView-umbrella.h in Headers */, 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | /* End PBXHeadersBuildPhase section */ 208 | 209 | /* Begin PBXNativeTarget section */ 210 | 112AE099E3FB813A1CDA1F5A /* KDIntroView */ = { 211 | isa = PBXNativeTarget; 212 | buildConfigurationList = 0DB3F663923DA233C8B663B4 /* Build configuration list for PBXNativeTarget "KDIntroView" */; 213 | buildPhases = ( 214 | 4FF3B87DD1E438175751E755 /* Sources */, 215 | E66E0324339E839788770081 /* Frameworks */, 216 | 4E9BC6292F48BA4BE2402BE2 /* Resources */, 217 | F1B96ED05A257F264F13AECC /* Headers */, 218 | ); 219 | buildRules = ( 220 | ); 221 | dependencies = ( 222 | 71BAEBD78F9E15909ECF8550 /* PBXTargetDependency */, 223 | ); 224 | name = KDIntroView; 225 | productName = KDIntroView; 226 | productReference = 22177C85E8CE8482CB2245E9 /* KDIntroView.framework */; 227 | productType = "com.apple.product-type.framework"; 228 | }; 229 | 9CA700BA96E85F395013F3F2 /* KDIntroView-KDIntroView */ = { 230 | isa = PBXNativeTarget; 231 | buildConfigurationList = E543893B5F9F9DE0D54D2EFA /* Build configuration list for PBXNativeTarget "KDIntroView-KDIntroView" */; 232 | buildPhases = ( 233 | 1A292C8D1D70C3AFAC4ED5D8 /* Sources */, 234 | ADB0B620D02179525EC0D0C0 /* Frameworks */, 235 | A40483C08477E8BAA32E6BE2 /* Resources */, 236 | ); 237 | buildRules = ( 238 | ); 239 | dependencies = ( 240 | ); 241 | name = "KDIntroView-KDIntroView"; 242 | productName = "KDIntroView-KDIntroView"; 243 | productReference = 9AA87FA543864B6EC9006306 /* KDIntroView.bundle */; 244 | productType = "com.apple.product-type.bundle"; 245 | }; 246 | C3F4BBD3CB8F0B8AF5BC332A /* Pods-IntroViewDemo */ = { 247 | isa = PBXNativeTarget; 248 | buildConfigurationList = 2031CC48C79BC7893340CD8E /* Build configuration list for PBXNativeTarget "Pods-IntroViewDemo" */; 249 | buildPhases = ( 250 | 0F2B6EAE014F3DCB45B67A02 /* Sources */, 251 | C786CF17B97D364F5CEE4F25 /* Frameworks */, 252 | 3CB67EE9FC3A7C8525F6E99C /* Headers */, 253 | ); 254 | buildRules = ( 255 | ); 256 | dependencies = ( 257 | A1E459A89EB82AE7F9EA7591 /* PBXTargetDependency */, 258 | ); 259 | name = "Pods-IntroViewDemo"; 260 | productName = "Pods-IntroViewDemo"; 261 | productReference = 4C80DD1737E451A4FDBAEAF7 /* Pods_IntroViewDemo.framework */; 262 | productType = "com.apple.product-type.framework"; 263 | }; 264 | /* End PBXNativeTarget section */ 265 | 266 | /* Begin PBXProject section */ 267 | 742A35C9B021B684F0DFF8EA /* Project object */ = { 268 | isa = PBXProject; 269 | attributes = { 270 | LastSwiftMigration = 0700; 271 | LastSwiftUpdateCheck = 0700; 272 | LastUpgradeCheck = 0700; 273 | TargetAttributes = { 274 | 112AE099E3FB813A1CDA1F5A = { 275 | LastSwiftMigration = 0800; 276 | }; 277 | }; 278 | }; 279 | buildConfigurationList = 7C525079EB29159034D5122D /* Build configuration list for PBXProject "Pods" */; 280 | compatibilityVersion = "Xcode 3.2"; 281 | developmentRegion = English; 282 | hasScannedForEncodings = 0; 283 | knownRegions = ( 284 | en, 285 | ); 286 | mainGroup = 796B46B10C69FE5BB53626D1; 287 | productRefGroup = 0A54CE1DAAC684FE65F69695 /* Products */; 288 | projectDirPath = ""; 289 | projectRoot = ""; 290 | targets = ( 291 | 112AE099E3FB813A1CDA1F5A /* KDIntroView */, 292 | 9CA700BA96E85F395013F3F2 /* KDIntroView-KDIntroView */, 293 | C3F4BBD3CB8F0B8AF5BC332A /* Pods-IntroViewDemo */, 294 | ); 295 | }; 296 | /* End PBXProject section */ 297 | 298 | /* Begin PBXResourcesBuildPhase section */ 299 | 4E9BC6292F48BA4BE2402BE2 /* Resources */ = { 300 | isa = PBXResourcesBuildPhase; 301 | buildActionMask = 2147483647; 302 | files = ( 303 | 6BABDE5A5BD05F5BC2BD5E2D /* KDIntroView.bundle in Resources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | A40483C08477E8BAA32E6BE2 /* Resources */ = { 308 | isa = PBXResourcesBuildPhase; 309 | buildActionMask = 2147483647; 310 | files = ( 311 | ); 312 | runOnlyForDeploymentPostprocessing = 0; 313 | }; 314 | /* End PBXResourcesBuildPhase section */ 315 | 316 | /* Begin PBXSourcesBuildPhase section */ 317 | 0F2B6EAE014F3DCB45B67A02 /* Sources */ = { 318 | isa = PBXSourcesBuildPhase; 319 | buildActionMask = 2147483647; 320 | files = ( 321 | AAB5F89FD60C61BDF796C2C5 /* Pods-IntroViewDemo-dummy.m in Sources */, 322 | ); 323 | runOnlyForDeploymentPostprocessing = 0; 324 | }; 325 | 1A292C8D1D70C3AFAC4ED5D8 /* Sources */ = { 326 | isa = PBXSourcesBuildPhase; 327 | buildActionMask = 2147483647; 328 | files = ( 329 | ); 330 | runOnlyForDeploymentPostprocessing = 0; 331 | }; 332 | 4FF3B87DD1E438175751E755 /* Sources */ = { 333 | isa = PBXSourcesBuildPhase; 334 | buildActionMask = 2147483647; 335 | files = ( 336 | 9392AE1501124C050B619322 /* KDIntroView-dummy.m in Sources */, 337 | 5C83F105D27CF39898D1CC3D /* KDIntroView.swift in Sources */, 338 | C6B693C4E151AE28A2187DD3 /* KDIntroViewController.swift in Sources */, 339 | ); 340 | runOnlyForDeploymentPostprocessing = 0; 341 | }; 342 | /* End PBXSourcesBuildPhase section */ 343 | 344 | /* Begin PBXTargetDependency section */ 345 | 71BAEBD78F9E15909ECF8550 /* PBXTargetDependency */ = { 346 | isa = PBXTargetDependency; 347 | name = "KDIntroView-KDIntroView"; 348 | target = 9CA700BA96E85F395013F3F2 /* KDIntroView-KDIntroView */; 349 | targetProxy = 939338B2D06B0C3738B2E7F8 /* PBXContainerItemProxy */; 350 | }; 351 | A1E459A89EB82AE7F9EA7591 /* PBXTargetDependency */ = { 352 | isa = PBXTargetDependency; 353 | name = KDIntroView; 354 | target = 112AE099E3FB813A1CDA1F5A /* KDIntroView */; 355 | targetProxy = 5AEDCD214D30DC53D8DC0D2C /* PBXContainerItemProxy */; 356 | }; 357 | /* End PBXTargetDependency section */ 358 | 359 | /* Begin XCBuildConfiguration section */ 360 | 00165D56D94CAD467F7187E8 /* Debug */ = { 361 | isa = XCBuildConfiguration; 362 | baseConfigurationReference = A39E576648929E7568B2F9A3 /* KDIntroView-Private.xcconfig */; 363 | buildSettings = { 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | PRODUCT_NAME = KDIntroView; 366 | SDKROOT = iphoneos; 367 | SKIP_INSTALL = YES; 368 | WRAPPER_EXTENSION = bundle; 369 | }; 370 | name = Debug; 371 | }; 372 | 2B2E4FC4248900B0A9E0397C /* Release */ = { 373 | isa = XCBuildConfiguration; 374 | baseConfigurationReference = 5CB6022A5D9F28FD562E65E9 /* Pods-IntroViewDemo.release.xcconfig */; 375 | buildSettings = { 376 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 377 | CURRENT_PROJECT_VERSION = 1; 378 | DEFINES_MODULE = YES; 379 | DYLIB_COMPATIBILITY_VERSION = 1; 380 | DYLIB_CURRENT_VERSION = 1; 381 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 382 | ENABLE_STRICT_OBJC_MSGSEND = YES; 383 | INFOPLIST_FILE = "Target Support Files/Pods-IntroViewDemo/Info.plist"; 384 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 385 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 386 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 387 | MODULEMAP_FILE = "Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo.modulemap"; 388 | MTL_ENABLE_DEBUG_INFO = NO; 389 | OTHER_LDFLAGS = ""; 390 | OTHER_LIBTOOLFLAGS = ""; 391 | PODS_ROOT = "$(SRCROOT)"; 392 | PRODUCT_NAME = Pods_IntroViewDemo; 393 | SDKROOT = iphoneos; 394 | SKIP_INSTALL = YES; 395 | TARGETED_DEVICE_FAMILY = "1,2"; 396 | VERSIONING_SYSTEM = "apple-generic"; 397 | VERSION_INFO_PREFIX = ""; 398 | }; 399 | name = Release; 400 | }; 401 | 4991C5FC7B0D12683AC69D70 /* Debug */ = { 402 | isa = XCBuildConfiguration; 403 | buildSettings = { 404 | ALWAYS_SEARCH_USER_PATHS = NO; 405 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 406 | CLANG_CXX_LIBRARY = "libc++"; 407 | CLANG_ENABLE_MODULES = YES; 408 | CLANG_ENABLE_OBJC_ARC = YES; 409 | CLANG_WARN_BOOL_CONVERSION = YES; 410 | CLANG_WARN_CONSTANT_CONVERSION = YES; 411 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 412 | CLANG_WARN_EMPTY_BODY = YES; 413 | CLANG_WARN_ENUM_CONVERSION = YES; 414 | CLANG_WARN_INT_CONVERSION = YES; 415 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 416 | CLANG_WARN_UNREACHABLE_CODE = YES; 417 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 418 | COPY_PHASE_STRIP = NO; 419 | GCC_C_LANGUAGE_STANDARD = gnu99; 420 | GCC_DYNAMIC_NO_PIC = NO; 421 | GCC_OPTIMIZATION_LEVEL = 0; 422 | GCC_PREPROCESSOR_DEFINITIONS = ( 423 | "DEBUG=1", 424 | "$(inherited)", 425 | ); 426 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 427 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 428 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 429 | GCC_WARN_UNDECLARED_SELECTOR = YES; 430 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 431 | GCC_WARN_UNUSED_FUNCTION = YES; 432 | GCC_WARN_UNUSED_VARIABLE = YES; 433 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 434 | ONLY_ACTIVE_ARCH = YES; 435 | STRIP_INSTALLED_PRODUCT = NO; 436 | SYMROOT = "${SRCROOT}/../build"; 437 | }; 438 | name = Debug; 439 | }; 440 | 9FE94FF75242E0FFE5D24363 /* Release */ = { 441 | isa = XCBuildConfiguration; 442 | buildSettings = { 443 | ALWAYS_SEARCH_USER_PATHS = NO; 444 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 445 | CLANG_CXX_LIBRARY = "libc++"; 446 | CLANG_ENABLE_MODULES = YES; 447 | CLANG_ENABLE_OBJC_ARC = YES; 448 | CLANG_WARN_BOOL_CONVERSION = YES; 449 | CLANG_WARN_CONSTANT_CONVERSION = YES; 450 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 451 | CLANG_WARN_EMPTY_BODY = YES; 452 | CLANG_WARN_ENUM_CONVERSION = YES; 453 | CLANG_WARN_INT_CONVERSION = YES; 454 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 455 | CLANG_WARN_UNREACHABLE_CODE = YES; 456 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 457 | COPY_PHASE_STRIP = YES; 458 | ENABLE_NS_ASSERTIONS = NO; 459 | GCC_C_LANGUAGE_STANDARD = gnu99; 460 | GCC_PREPROCESSOR_DEFINITIONS = "RELEASE=1"; 461 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 462 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 463 | GCC_WARN_UNDECLARED_SELECTOR = YES; 464 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 465 | GCC_WARN_UNUSED_FUNCTION = YES; 466 | GCC_WARN_UNUSED_VARIABLE = YES; 467 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 468 | STRIP_INSTALLED_PRODUCT = NO; 469 | SYMROOT = "${SRCROOT}/../build"; 470 | VALIDATE_PRODUCT = YES; 471 | }; 472 | name = Release; 473 | }; 474 | A0880C271FE753DBCFA2400E /* Debug */ = { 475 | isa = XCBuildConfiguration; 476 | baseConfigurationReference = 0A32F18E24A4ABC113094658 /* Pods-IntroViewDemo.debug.xcconfig */; 477 | buildSettings = { 478 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 479 | CURRENT_PROJECT_VERSION = 1; 480 | DEFINES_MODULE = YES; 481 | DYLIB_COMPATIBILITY_VERSION = 1; 482 | DYLIB_CURRENT_VERSION = 1; 483 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 484 | ENABLE_STRICT_OBJC_MSGSEND = YES; 485 | INFOPLIST_FILE = "Target Support Files/Pods-IntroViewDemo/Info.plist"; 486 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 487 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 488 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 489 | MODULEMAP_FILE = "Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo.modulemap"; 490 | MTL_ENABLE_DEBUG_INFO = YES; 491 | OTHER_LDFLAGS = ""; 492 | OTHER_LIBTOOLFLAGS = ""; 493 | PODS_ROOT = "$(SRCROOT)"; 494 | PRODUCT_NAME = Pods_IntroViewDemo; 495 | SDKROOT = iphoneos; 496 | SKIP_INSTALL = YES; 497 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 498 | TARGETED_DEVICE_FAMILY = "1,2"; 499 | VERSIONING_SYSTEM = "apple-generic"; 500 | VERSION_INFO_PREFIX = ""; 501 | }; 502 | name = Debug; 503 | }; 504 | D80A301B4772809FFC45EEE1 /* Release */ = { 505 | isa = XCBuildConfiguration; 506 | baseConfigurationReference = A39E576648929E7568B2F9A3 /* KDIntroView-Private.xcconfig */; 507 | buildSettings = { 508 | ENABLE_STRICT_OBJC_MSGSEND = YES; 509 | PRODUCT_NAME = KDIntroView; 510 | SDKROOT = iphoneos; 511 | SKIP_INSTALL = YES; 512 | WRAPPER_EXTENSION = bundle; 513 | }; 514 | name = Release; 515 | }; 516 | DD6E63EC480CD40A3B2340AA /* Release */ = { 517 | isa = XCBuildConfiguration; 518 | baseConfigurationReference = A39E576648929E7568B2F9A3 /* KDIntroView-Private.xcconfig */; 519 | buildSettings = { 520 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 521 | CURRENT_PROJECT_VERSION = 1; 522 | DEFINES_MODULE = YES; 523 | DYLIB_COMPATIBILITY_VERSION = 1; 524 | DYLIB_CURRENT_VERSION = 1; 525 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 526 | ENABLE_STRICT_OBJC_MSGSEND = YES; 527 | GCC_PREFIX_HEADER = "Target Support Files/KDIntroView/KDIntroView-prefix.pch"; 528 | INFOPLIST_FILE = "Target Support Files/KDIntroView/Info.plist"; 529 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 530 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 531 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 532 | MODULEMAP_FILE = "Target Support Files/KDIntroView/KDIntroView.modulemap"; 533 | MTL_ENABLE_DEBUG_INFO = NO; 534 | PRODUCT_NAME = KDIntroView; 535 | SDKROOT = iphoneos; 536 | SKIP_INSTALL = YES; 537 | SWIFT_VERSION = 3.0; 538 | TARGETED_DEVICE_FAMILY = "1,2"; 539 | VERSIONING_SYSTEM = "apple-generic"; 540 | VERSION_INFO_PREFIX = ""; 541 | }; 542 | name = Release; 543 | }; 544 | EA73B6EE5BBE513E7D4AFE2D /* Debug */ = { 545 | isa = XCBuildConfiguration; 546 | baseConfigurationReference = A39E576648929E7568B2F9A3 /* KDIntroView-Private.xcconfig */; 547 | buildSettings = { 548 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 549 | CURRENT_PROJECT_VERSION = 1; 550 | DEFINES_MODULE = YES; 551 | DYLIB_COMPATIBILITY_VERSION = 1; 552 | DYLIB_CURRENT_VERSION = 1; 553 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 554 | ENABLE_STRICT_OBJC_MSGSEND = YES; 555 | GCC_PREFIX_HEADER = "Target Support Files/KDIntroView/KDIntroView-prefix.pch"; 556 | INFOPLIST_FILE = "Target Support Files/KDIntroView/Info.plist"; 557 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 558 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 559 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 560 | MODULEMAP_FILE = "Target Support Files/KDIntroView/KDIntroView.modulemap"; 561 | MTL_ENABLE_DEBUG_INFO = YES; 562 | PRODUCT_NAME = KDIntroView; 563 | SDKROOT = iphoneos; 564 | SKIP_INSTALL = YES; 565 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 566 | SWIFT_VERSION = 3.0; 567 | TARGETED_DEVICE_FAMILY = "1,2"; 568 | VERSIONING_SYSTEM = "apple-generic"; 569 | VERSION_INFO_PREFIX = ""; 570 | }; 571 | name = Debug; 572 | }; 573 | /* End XCBuildConfiguration section */ 574 | 575 | /* Begin XCConfigurationList section */ 576 | 0DB3F663923DA233C8B663B4 /* Build configuration list for PBXNativeTarget "KDIntroView" */ = { 577 | isa = XCConfigurationList; 578 | buildConfigurations = ( 579 | EA73B6EE5BBE513E7D4AFE2D /* Debug */, 580 | DD6E63EC480CD40A3B2340AA /* Release */, 581 | ); 582 | defaultConfigurationIsVisible = 0; 583 | defaultConfigurationName = Release; 584 | }; 585 | 2031CC48C79BC7893340CD8E /* Build configuration list for PBXNativeTarget "Pods-IntroViewDemo" */ = { 586 | isa = XCConfigurationList; 587 | buildConfigurations = ( 588 | A0880C271FE753DBCFA2400E /* Debug */, 589 | 2B2E4FC4248900B0A9E0397C /* Release */, 590 | ); 591 | defaultConfigurationIsVisible = 0; 592 | defaultConfigurationName = Release; 593 | }; 594 | 7C525079EB29159034D5122D /* Build configuration list for PBXProject "Pods" */ = { 595 | isa = XCConfigurationList; 596 | buildConfigurations = ( 597 | 4991C5FC7B0D12683AC69D70 /* Debug */, 598 | 9FE94FF75242E0FFE5D24363 /* Release */, 599 | ); 600 | defaultConfigurationIsVisible = 0; 601 | defaultConfigurationName = Release; 602 | }; 603 | E543893B5F9F9DE0D54D2EFA /* Build configuration list for PBXNativeTarget "KDIntroView-KDIntroView" */ = { 604 | isa = XCConfigurationList; 605 | buildConfigurations = ( 606 | 00165D56D94CAD467F7187E8 /* Debug */, 607 | D80A301B4772809FFC45EEE1 /* Release */, 608 | ); 609 | defaultConfigurationIsVisible = 0; 610 | defaultConfigurationName = Release; 611 | }; 612 | /* End XCConfigurationList section */ 613 | }; 614 | rootObject = 742A35C9B021B684F0DFF8EA /* Project object */; 615 | } 616 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/KDIntroView/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/KDIntroView/KDIntroView-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "KDIntroView.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/KDIntroView" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/KDIntroView" 4 | OTHER_LDFLAGS = -ObjC 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_ROOT = ${SRCROOT} 7 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/KDIntroView/KDIntroView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_KDIntroView : NSObject 3 | @end 4 | @implementation PodsDummy_KDIntroView 5 | @end 6 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/KDIntroView/KDIntroView-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/KDIntroView/KDIntroView-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double KDIntroViewVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char KDIntroViewVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/KDIntroView/KDIntroView.modulemap: -------------------------------------------------------------------------------- 1 | framework module KDIntroView { 2 | umbrella header "KDIntroView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/KDIntroView/KDIntroView.xcconfig: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Example/IntroViewDemo/Pods/Target Support Files/KDIntroView/KDIntroView.xcconfig -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/Pods-IntroViewDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## KDIntroView 5 | 6 | Copyright (c) 2015 likedan 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - http://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2015 likedan <likedan5@icloud.com> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | KDIntroView 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - http://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_IntroViewDemo : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_IntroViewDemo 5 | @end 6 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | else 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | fi 16 | 17 | local destination="${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 18 | 19 | if [ -L "${source}" ]; then 20 | echo "Symlinked..." 21 | source=$(readlink "${source}") 22 | fi 23 | 24 | # use filter instead of exclude so missing patterns dont' throw errors 25 | echo "rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" ${source} ${destination}" 26 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 27 | 28 | # Resign the code if required by the build settings to avoid unstable apps 29 | code_sign_if_enabled "${destination}/$(basename "$1")" 30 | 31 | # Embed linked Swift runtime libraries 32 | local basename 33 | basename=$(basename $1 | sed -E s/\\..+// && exit ${PIPESTATUS[0]}) 34 | local swift_runtime_libs 35 | swift_runtime_libs=$(xcrun otool -LX "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/${basename}.framework/${basename}" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 36 | for lib in $swift_runtime_libs; do 37 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 38 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 39 | code_sign_if_enabled "${destination}/${lib}" 40 | done 41 | } 42 | 43 | # Signs a framework with the provided identity 44 | code_sign_if_enabled() { 45 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 46 | # Use the current code_sign_identitiy 47 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 48 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements $1" 49 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} --preserve-metadata=identifier,entitlements "$1" 50 | fi 51 | } 52 | 53 | 54 | if [[ "$CONFIGURATION" == "Debug" ]]; then 55 | install_framework 'Pods-IntroViewDemo/KDIntroView.framework' 56 | fi 57 | if [[ "$CONFIGURATION" == "Release" ]]; then 58 | install_framework 'Pods-IntroViewDemo/KDIntroView.framework' 59 | fi 60 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY=$(cd "${1%/*}" && pwd) 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | if [[ "${ACTION}" == "install" ]]; then 63 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 64 | fi 65 | rm -f "$RESOURCES_TO_COPY" 66 | 67 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 68 | then 69 | case "${TARGETED_DEVICE_FAMILY}" in 70 | 1,2) 71 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 72 | ;; 73 | 1) 74 | TARGET_DEVICE_ARGS="--target-device iphone" 75 | ;; 76 | 2) 77 | TARGET_DEVICE_ARGS="--target-device ipad" 78 | ;; 79 | *) 80 | TARGET_DEVICE_ARGS="--target-device mac" 81 | ;; 82 | esac 83 | 84 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 85 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 86 | while read line; do 87 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 88 | XCASSET_FILES+=("$line") 89 | fi 90 | done <<<"$OTHER_XCASSETS" 91 | 92 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 93 | fi 94 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_IntroViewDemoVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_IntroViewDemoVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 3 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/KDIntroView.framework/Headers" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "KDIntroView" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-IntroViewDemo 7 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_IntroViewDemo { 2 | umbrella header "Pods-IntroViewDemo-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/IntroViewDemo/Pods/Target Support Files/Pods-IntroViewDemo/Pods-IntroViewDemo.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 3 | OTHER_CFLAGS = $(inherited) -iquote "$CONFIGURATION_BUILD_DIR/KDIntroView.framework/Headers" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -framework "KDIntroView" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_FRAMEWORK_BUILD_PATH = $(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/Pods-IntroViewDemo 7 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /Imgs/inst1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Imgs/inst1.png -------------------------------------------------------------------------------- /Imgs/inst2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Imgs/inst2.jpg -------------------------------------------------------------------------------- /Imgs/inst3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Imgs/inst3.jpg -------------------------------------------------------------------------------- /Imgs/showup.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Imgs/showup.gif -------------------------------------------------------------------------------- /KDIntroView.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod lib lint KDIntroView.podspec' to ensure this is a 3 | # valid spec and remove all comments before submitting the spec. 4 | # 5 | # Any lines starting with a # are optional, but encouraged 6 | # 7 | # To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html 8 | # 9 | 10 | Pod::Spec.new do |s| 11 | s.name = "KDIntroView" 12 | s.version = "1.2.0" 13 | s.summary = "KDIntroView is a framework to create dynamic introduction views for App. You can create all sorts of cool animations." 14 | 15 | s.description = <<-DESC 16 | Step One 17 | 18 | Create all the views you need as xibs. Link each xib file with a class that inherits KDIntroView. Override moveEverythingAccordingToIndex(index: CGFloat). 19 | 20 | Design your interface as you wish. This framework works for both code generated UI and autolayout. 21 | 22 | Make sure each view has a clear background color if you wish to perform color change. 23 | 24 | Step Two 25 | 26 | Create a ViewController that inherits KDIntroViewController. (don't forget to import KDIntroView) 27 | 28 | In viewWillAppear, call setup, and pass in an array that contains the name of all the xibs you created. Arrange them in the order you with them to appear. Override moveEverythingAccordingToIndex(index: CGFloat). 29 | 30 | Now, you can see your views, but they are static. 31 | 32 | Step Three 33 | 34 | Implement the moveEverythingAccordingToIndex(index: CGFloat) in each view. The index: CGFloat variable is the offset of the scroller. In the first and the last view, index: CGFloat range from 0 ~ frame.width. In all the other views, index: CGFloat range from 0 ~ 2 * frame.width. 35 | 36 | We have build-in functions, but you can easily customize your animation with CGAffineTransformation. There are more example in the demo project. 37 | 38 | Also implement the moveEverythingAccordingToIndex(index: CGFloat) in viewcontroller to perform color animation and touchable elements. All the touchable elements must be added in the view controller and call view.bringSubviewToFront() after setup to make them reachable. 39 | 40 | You can literally create any kind of animation! Play around with it, and free your imagination! 41 | * Markdown format. 42 | * Don't worry about the indent, we strip it! 43 | DESC 44 | s.homepage = "https://github.com/likedan/KDIntroView" 45 | s.license = 'MIT' 46 | s.author = { "likedan" => "likedan5@icloud.com" } 47 | s.source = { :git => "https://github.com/likedan/KDIntroView.git", :tag => "1.2.0" } 48 | s.social_media_url = 'http://takefiveinteractive.com' 49 | 50 | s.platform = :ios, '10.0' 51 | s.requires_arc = true 52 | 53 | s.source_files = 'Pod/Classes/*.swift' 54 | 55 | end 56 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 takefiveinteractive 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Pod/Assets/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Pod/Assets/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/likedan/KDIntroView/80d6eba39e980a2a0dbd4f94c08a227fa601e0bf/Pod/Classes/.gitkeep -------------------------------------------------------------------------------- /Pod/Classes/KDIntroView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // KDIntroView.swift 3 | // Pods 4 | // 5 | // Created by Kedan Li on 15/7/5. 6 | // 7 | // 8 | 9 | import UIKit 10 | 11 | open class KDIntroView: UIView { 12 | 13 | var uppserBound: CGFloat = 0 14 | 15 | var lowerBound: CGFloat = 0 16 | 17 | //index : 0 ~ 2 * view.frame.width 18 | open func moveEverythingAccordingToIndex(_ index: CGFloat) { 19 | fatalError("Must Override") 20 | } 21 | // the view stays in the same position as user scroll 22 | open func still(_ view: UIView, index: CGFloat){ 23 | view.transform = CGAffineTransform(translationX: index, y: 0) 24 | } 25 | // horizontolSpeed: positive value for moving right, negative value for moving left, 0 for the same speed as scroll view 26 | // verticalSpeed: positive value for moving down, negative value for moving up 27 | open func move(_ view: UIView, index: CGFloat, horizontolSpeed: CGFloat, verticalSpeed: CGFloat){ 28 | view.transform = CGAffineTransform(translationX: index * (horizontolSpeed + 1), y: index * verticalSpeed) 29 | } 30 | 31 | func isInBound(_ num: CGFloat)->Bool{ 32 | if num >= lowerBound && num <= uppserBound{ 33 | return true 34 | } 35 | return false 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /Pod/Classes/KDIntroViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // IntroView 4 | // 5 | // Created by Kedan Li on 14/11/10. 6 | // Copyright (c) 2014年 Kedan Li. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class KDIntroViewController: UIViewController, UIScrollViewDelegate{ 12 | 13 | open var scroller: UIScrollView! 14 | open var pageControl: UIPageControl! 15 | 16 | var dragger: UIView! 17 | 18 | var introViews = [KDIntroView]() 19 | 20 | var currentPageNum:Int = 0 21 | 22 | 23 | open override func viewWillAppear(_ animated: Bool) { 24 | // initialization 25 | scroller = UIScrollView(frame: view.frame) 26 | scroller.showsHorizontalScrollIndicator = false 27 | scroller.delegate = self 28 | dragger = UIView(frame: view.frame) 29 | dragger.backgroundColor = UIColor.clear 30 | let gestureReco = UIPanGestureRecognizer(target: self, action: #selector(KDIntroViewController.dragged(_:))) 31 | dragger.addGestureRecognizer(gestureReco) 32 | 33 | 34 | view.addSubview(scroller) 35 | view.addSubview(dragger) 36 | } 37 | 38 | open func setup(_ views: [String]){ 39 | 40 | for index in 0 ..< views.count { 41 | 42 | let introView = Bundle.main.loadNibNamed(views[index], owner: self, options: nil)?[0] as! KDIntroView 43 | introView.center.x = view.center.x + view.frame.width * CGFloat(index) 44 | scroller.addSubview(introView) 45 | introViews.append(introView) 46 | 47 | if index == 0 || index == views.count - 1{ 48 | introView.uppserBound = view.frame.width 49 | introView.lowerBound = 0 50 | }else{ 51 | introView.uppserBound = view.frame.width * CGFloat(index + 1) 52 | introView.lowerBound = view.frame.width * CGFloat(index - 1) 53 | } 54 | 55 | } 56 | 57 | // create default page control 58 | if pageControl == nil{ 59 | pageControl = UIPageControl(frame: CGRect(x: 0, y: 0, width: 100, height: 40)) 60 | pageControl.backgroundColor = UIColor.clear 61 | pageControl.pageIndicatorTintColor = UIColor.gray 62 | pageControl.currentPageIndicatorTintColor = UIColor.white 63 | pageControl.currentPage = 0 64 | pageControl.center = CGPoint(x: view.frame.width / 2, y: view.frame.height * 6 / 7) 65 | } 66 | pageControl.numberOfPages = views.count 67 | view.addSubview(pageControl) 68 | 69 | 70 | } 71 | 72 | func determineCurrentPage(){ 73 | if scroller.contentOffset.x > view.frame.width / 2 + view.frame.width * CGFloat(currentPageNum) && currentPageNum < pageControl.numberOfPages{ 74 | currentPageNum += 1 75 | }else if scroller.contentOffset.x < view.frame.width * CGFloat(currentPageNum - 1) + view.frame.width / 2 && currentPageNum > 0{ 76 | currentPageNum -= 1 77 | } 78 | pageControl.currentPage = currentPageNum 79 | scroller.setContentOffset(CGPoint(x: view.frame.width * CGFloat(currentPageNum), y: 0), animated: true) 80 | } 81 | 82 | 83 | func dragged(_ recognizer : UIPanGestureRecognizer) { 84 | 85 | let translation = recognizer.translation(in: self.view) 86 | scroller.setContentOffset(CGPoint(x: view.frame.width * CGFloat(currentPageNum) - translation.x, y: 0), animated: false) 87 | 88 | if recognizer.state == UIGestureRecognizerState.cancelled || recognizer.state == UIGestureRecognizerState.failed || recognizer.state == UIGestureRecognizerState.ended{ 89 | // should change page 90 | if abs(translation.x) > 30 { 91 | if currentPageNum != 0 && translation.x > 0 { 92 | currentPageNum -= 1 93 | }else if currentPageNum != pageControl.numberOfPages - 1 && translation.x < 0{ 94 | currentPageNum += 1 95 | } 96 | pageControl.currentPage = currentPageNum 97 | } 98 | scroller.setContentOffset(CGPoint(x: view.frame.width * CGFloat(currentPageNum), y: 0), animated: true) 99 | 100 | } 101 | 102 | } 103 | 104 | open func scrollViewDidScroll(_ scrollView: UIScrollView) { 105 | 106 | let offset = scroller.contentOffset.x 107 | 108 | for index in 0 ..< introViews.count { 109 | if introViews[index].isInBound(offset){ 110 | var movingIndex = offset 111 | if index >= 2{ 112 | movingIndex = offset - CGFloat(index - 1) * view.frame.width 113 | } 114 | introViews[index].moveEverythingAccordingToIndex(movingIndex) 115 | } 116 | moveEverythingAccordingToIndex(offset) 117 | } 118 | } 119 | //index : 0 ~ scrollview.contentsize 120 | open func moveEverythingAccordingToIndex(_ index: CGFloat){ 121 | fatalError("Must Override") 122 | } 123 | 124 | open func changeBackgroundColor(_ index: CGFloat, fromColor: UIColor, toColor: UIColor, fromIndex: CGFloat, toIndex: CGFloat){ 125 | 126 | if index > fromIndex && index < toIndex{ 127 | let difference = toIndex - fromIndex 128 | let fromColorComponent = fromColor.cgColor.components 129 | let toColorComponent = toColor.cgColor.components 130 | 131 | let differenceInRed = ((toColorComponent?[0])! as CGFloat) - (fromColorComponent?[0])! as CGFloat 132 | let differenceInGreen = ((toColorComponent?[1])! as CGFloat) - (fromColorComponent?[1])! as CGFloat 133 | let differenceInBlue = ((toColorComponent?[2])! as CGFloat) - (fromColorComponent?[2])! as CGFloat 134 | view.backgroundColor = UIColor(red: (fromColorComponent?[0])! as CGFloat + differenceInRed / difference * (index - fromIndex), green: (fromColorComponent?[1])! as CGFloat + differenceInGreen / difference * (index - fromIndex), blue: (fromColorComponent?[2])! as CGFloat + differenceInBlue / difference * (index - fromIndex), alpha: 1) 135 | } 136 | 137 | } 138 | 139 | } 140 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # KDIntroView 2 | 3 | 4 | 5 | 6 | ## Installation 7 | 8 | To install 9 | it, simply add the following line to your Podfile: 10 | 11 | ```ruby 12 | pod 'KDIntroView' 13 | ``` 14 | or drag these files into the project 15 | 16 | ```ruby 17 | KDIntroView.swift 18 | KDIntroViewController.swift 19 | ``` 20 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 21 | 22 | ## Requirements 23 | iOS 8.0 24 | 25 | ## Introduction 26 | `KDIntroView` is a framework to create dynamic onboarding views(onboarding flows) for your iOS App. You can create all sorts of cool animations. 27 | 28 | ## Start!!! 29 | 30 | - Step One 31 | 32 | 33 | Create all the views you need as xibs. Link each xib file with a class that inherits `KDIntroView`. Override ` moveEverythingAccordingToIndex(index: CGFloat)`. 34 | 35 | 36 | 37 | Design your interface as you wish. This framework works for both code generated UI and autolayout. 38 | 39 | Make sure each view has a clear background color if you wish to perform color change. 40 | 41 | 42 | 43 | - Step Two 44 | 45 | 46 | 47 | Create a ViewController that inherits `KDIntroViewController`. (don't forget to import KDIntroView) 48 | 49 | 50 | In `viewDidAppear`, call `setup`, and pass in an array that contains the name of all the xibs you created. Arrange them in the order you with them to appear. Override ` moveEverythingAccordingToIndex(index: CGFloat)`. 51 | 52 | Now, you can see your views, but they are static. 53 | 54 | 55 | - Step Three 56 | 57 | 58 | 59 | Implement the `moveEverythingAccordingToIndex(index: CGFloat)` in each view. The `index: CGFloat` variable is the offset of the scroller. In the first and the last view, `index: CGFloat` range from 0 ~ frame.width. In all the other views, `index: CGFloat` range from 0 ~ 2 * frame.width. 60 | 61 | 62 | 63 | We have build-in functions, but you can easily customize your animation with `CGAffineTransformation`. There are more example in the demo project. 64 | 65 | Also implement the `moveEverythingAccordingToIndex(index: CGFloat)` in viewcontroller to perform color animation and touchable elements. All the touchable elements must be added in the view controller and call `view.bringSubviewToFront()` after `setup` to make them reachable. 66 | 67 | You can literally create any kind of animation! Play around with it, and free your imagination! 68 | 69 | ## Author 70 | 71 | Kedan Li, TakefiveInteractive.com 72 | 73 | ## License 74 | 75 | KDIntroView is available under the MIT license. See the LICENSE file for more info. 76 | 77 | -------------------------------------------------------------------------------- /_Pods.xcodeproj: -------------------------------------------------------------------------------- 1 | Example/Pods/Pods.xcodeproj --------------------------------------------------------------------------------