├── .gitignore ├── Example ├── Podfile ├── Podfile.lock ├── Pods │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ ├── SwiftyOnboard │ │ ├── LICENSE │ │ ├── README.md │ │ └── SwiftyOnboard │ │ │ ├── SwiftyOnboard.h │ │ │ ├── SwiftyOnboard.swift │ │ │ ├── SwiftyOnboardOverlay.swift │ │ │ └── SwiftyOnboardPage.swift │ └── Target Support Files │ │ ├── Pods-SwiftyOnboardExample │ │ ├── Info.plist │ │ ├── Pods-SwiftyOnboardExample-acknowledgements.markdown │ │ ├── Pods-SwiftyOnboardExample-acknowledgements.plist │ │ ├── Pods-SwiftyOnboardExample-dummy.m │ │ ├── Pods-SwiftyOnboardExample-frameworks.sh │ │ ├── Pods-SwiftyOnboardExample-resources.sh │ │ ├── Pods-SwiftyOnboardExample-umbrella.h │ │ ├── Pods-SwiftyOnboardExample.debug.xcconfig │ │ ├── Pods-SwiftyOnboardExample.modulemap │ │ └── Pods-SwiftyOnboardExample.release.xcconfig │ │ └── SwiftyOnboard │ │ ├── Info.plist │ │ ├── SwiftyOnboard-dummy.m │ │ ├── SwiftyOnboard-prefix.pch │ │ ├── SwiftyOnboard-umbrella.h │ │ ├── SwiftyOnboard.modulemap │ │ └── SwiftyOnboard.xcconfig ├── SwiftyOnboardExample.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── SwiftyOnboardExample.xcworkspace │ └── contents.xcworkspacedata └── SwiftyOnboardExample │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── onboard0.imageset │ │ ├── Contents.json │ │ ├── confess0.png │ │ ├── confess0@2x.png │ │ └── confess0@3x.png │ ├── onboard1.imageset │ │ ├── Contents.json │ │ ├── confess1.png │ │ ├── confess1@2x.png │ │ └── confess1@3x.png │ ├── onboard2.imageset │ │ ├── Contents.json │ │ ├── confess2.png │ │ ├── confess2@2x.png │ │ └── confess2@3x.png │ ├── space0.imageset │ │ ├── Contents.json │ │ └── plane_around_earth.png │ ├── space1.imageset │ │ ├── Contents.json │ │ └── space.png │ └── space2.imageset │ │ ├── Contents.json │ │ └── newcomers.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── CustomOverlay.swift │ ├── CustomOverlay.xib │ ├── CustomPage.swift │ ├── CustomPage.xib │ ├── Info.plist │ ├── Lato-Bold.ttf │ ├── Lato-Heavy.ttf │ ├── Lato-Regular.ttf │ ├── StoryboardExample.swift │ └── ViewController.swift ├── LICENSE ├── README.md ├── SwiftyOnboard.podspec ├── SwiftyOnboard.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcshareddata │ └── xcschemes │ └── SwiftyOnboard.xcscheme ├── SwiftyOnboard ├── Info.plist ├── SwiftyOnboard.h ├── SwiftyOnboard.swift ├── SwiftyOnboardOverlay.swift └── SwiftyOnboardPage.swift ├── SwiftyOnboardTests ├── Info.plist └── SwiftyOnboardTests.swift └── screenshots ├── onboard1.1.png ├── onboard1.2.png ├── onboard1.3.png ├── onboard1.gif └── onboard2.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xcuserstate 23 | 24 | ## Obj-C/Swift specific 25 | *.hmap 26 | *.ipa 27 | *.dSYM.zip 28 | *.dSYM 29 | 30 | ## Playgrounds 31 | timeline.xctimeline 32 | playground.xcworkspace 33 | 34 | # Swift Package Manager 35 | # 36 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 37 | # Packages/ 38 | .build/ 39 | 40 | # CocoaPods 41 | # 42 | # We recommend against adding the Pods directory to your .gitignore. However 43 | # you should judge for yourself, the pros and cons are mentioned at: 44 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 45 | # 46 | # Pods/ 47 | 48 | # Carthage 49 | # 50 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 51 | # Carthage/Checkouts 52 | 53 | Carthage/Build 54 | 55 | # fastlane 56 | # 57 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 58 | # screenshots whenever they are needed. 59 | # For more information about the recommended setup visit: 60 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md 61 | 62 | fastlane/report.xml 63 | fastlane/Preview.html 64 | fastlane/screenshots 65 | fastlane/test_output 66 | 67 | # General 68 | .DS_Store 69 | .AppleDouble 70 | .LSOverride 71 | 72 | # Icon must end with two \r 73 | Icon 74 | 75 | # Thumbnails 76 | ._* 77 | 78 | # Files that might appear in the root of a volume 79 | .DocumentRevisions-V100 80 | .fseventsd 81 | .Spotlight-V100 82 | .TemporaryItems 83 | .Trashes 84 | .VolumeIcon.icns 85 | .com.apple.timemachine.donotpresent 86 | 87 | # Directories potentially created on remote AFP share 88 | .AppleDB 89 | .AppleDesktop 90 | Network Trash Folder 91 | Temporary Items 92 | .apdisk 93 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'SwiftyOnboardExample' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for SwiftyOnboardExample 9 | pod 'SwiftyOnboard' 10 | 11 | end 12 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SwiftyOnboard (1.3.5) 3 | 4 | DEPENDENCIES: 5 | - SwiftyOnboard 6 | 7 | SPEC CHECKSUMS: 8 | SwiftyOnboard: 01615b68f93d071511e952899563aae0f94f3713 9 | 10 | PODFILE CHECKSUM: 79bb0b536df239d044c550ad3debbb51feb11053 11 | 12 | COCOAPODS: 1.2.1 13 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - SwiftyOnboard (1.3.5) 3 | 4 | DEPENDENCIES: 5 | - SwiftyOnboard 6 | 7 | SPEC CHECKSUMS: 8 | SwiftyOnboard: 01615b68f93d071511e952899563aae0f94f3713 9 | 10 | PODFILE CHECKSUM: 79bb0b536df239d044c550ad3debbb51feb11053 11 | 12 | COCOAPODS: 1.2.1 13 | -------------------------------------------------------------------------------- /Example/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 | 0618B8809985E7ACFAE7CED9F4F66686 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 11 | 10D5204CB6B1B157B0EF52557DB1C49A /* SwiftyOnboard-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2646EDC93F0E69795297138574F1DAA2 /* SwiftyOnboard-dummy.m */; }; 12 | 1A205967A1851E7643A24B1B836F0762 /* SwiftyOnboardOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = C192134DF2ED60CEB408BA5B8A022A82 /* SwiftyOnboardOverlay.swift */; }; 13 | 1FB22359DA67AE3E453F5235EF7F2955 /* Pods-SwiftyOnboardExample-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D80372DE4E1CD134036A452A18291F8 /* Pods-SwiftyOnboardExample-dummy.m */; }; 14 | 50B827C3771E37855ACC266029DE38AD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; 15 | 537EA667D25DA3F4319712CB5734630F /* Pods-SwiftyOnboardExample-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 39D078963A3D5AB5C96292FA9C4D01A8 /* Pods-SwiftyOnboardExample-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 16 | 5DDF8D17B8EAB4FEFF11393F7E9B67DF /* SwiftyOnboard-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DE4BA9FBEA2EA37C4D78C13B7C4CE3F1 /* SwiftyOnboard-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 17 | 83F66BCEAC1F5C953265B89BA409AF8A /* SwiftyOnboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 257082FB7ACE788C5C10F88EA62D7473 /* SwiftyOnboard.swift */; }; 18 | 9DBEE4C8ED0B2A4E18199FED87B16456 /* SwiftyOnboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 311B10A7866D4A45992B1B3CE72DB472 /* SwiftyOnboard.h */; settings = {ATTRIBUTES = (Public, ); }; }; 19 | F2682A4DA85C4D74F57D1D92B1234F69 /* SwiftyOnboardPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEF5445AC98B9281931D326C07A359D7 /* SwiftyOnboardPage.swift */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 7E3042B8AE224DF40B6C887BD16ECC99 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = BD39391FBA6A9C16C2BAC0893175BC7D; 28 | remoteInfo = SwiftyOnboard; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXFileReference section */ 33 | 041BA9724DD03D40D3EAE24EA888FE44 /* Pods_SwiftyOnboardExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftyOnboardExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 34 | 0A546B71309547FC9531853DD6C90FB4 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 257082FB7ACE788C5C10F88EA62D7473 /* SwiftyOnboard.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftyOnboard.swift; path = SwiftyOnboard/SwiftyOnboard.swift; sourceTree = ""; }; 36 | 2646EDC93F0E69795297138574F1DAA2 /* SwiftyOnboard-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftyOnboard-dummy.m"; sourceTree = ""; }; 37 | 311B10A7866D4A45992B1B3CE72DB472 /* SwiftyOnboard.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = SwiftyOnboard.h; path = SwiftyOnboard/SwiftyOnboard.h; sourceTree = ""; }; 38 | 3776ADD027027673CD313827904C86FF /* SwiftyOnboard.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftyOnboard.xcconfig; sourceTree = ""; }; 39 | 39D078963A3D5AB5C96292FA9C4D01A8 /* Pods-SwiftyOnboardExample-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftyOnboardExample-umbrella.h"; sourceTree = ""; }; 40 | 3EE2181D6FAE8A39AD5CE4CA02EA786C /* SwiftyOnboard.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyOnboard.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 4145D6030CA6C970B3E7067327E66D3B /* Pods-SwiftyOnboardExample-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftyOnboardExample-acknowledgements.markdown"; sourceTree = ""; }; 42 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; 43 | 7C0E99A1E061D2EF23EB3BB57ACF3E9C /* Pods-SwiftyOnboardExample.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-SwiftyOnboardExample.modulemap"; sourceTree = ""; }; 44 | 8B964359D7C61E466DFA1759C8A6D396 /* SwiftyOnboard-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyOnboard-prefix.pch"; sourceTree = ""; }; 45 | 8D80372DE4E1CD134036A452A18291F8 /* Pods-SwiftyOnboardExample-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftyOnboardExample-dummy.m"; sourceTree = ""; }; 46 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 47 | 9B766159C1DC2C9058FDD96E111403AF /* Pods-SwiftyOnboardExample-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftyOnboardExample-resources.sh"; sourceTree = ""; }; 48 | A6485FA8FD6DB57BFC1AC7DEE0D14735 /* Pods-SwiftyOnboardExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftyOnboardExample.debug.xcconfig"; sourceTree = ""; }; 49 | B2D4AAA612910C47AB19B40AFF4FF05C /* SwiftyOnboard.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = SwiftyOnboard.modulemap; sourceTree = ""; }; 50 | C192134DF2ED60CEB408BA5B8A022A82 /* SwiftyOnboardOverlay.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftyOnboardOverlay.swift; path = SwiftyOnboard/SwiftyOnboardOverlay.swift; sourceTree = ""; }; 51 | D5915ED8E27D44A5326FAC5D1816BB94 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 52 | DE4BA9FBEA2EA37C4D78C13B7C4CE3F1 /* SwiftyOnboard-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyOnboard-umbrella.h"; sourceTree = ""; }; 53 | E1F5B33BEE9084D0EB0FB1233C19C4FD /* Pods-SwiftyOnboardExample-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftyOnboardExample-acknowledgements.plist"; sourceTree = ""; }; 54 | EEF5445AC98B9281931D326C07A359D7 /* SwiftyOnboardPage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftyOnboardPage.swift; path = SwiftyOnboard/SwiftyOnboardPage.swift; sourceTree = ""; }; 55 | F536DDF293DC8D5DB6AD68C2E344A61F /* Pods-SwiftyOnboardExample-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwiftyOnboardExample-frameworks.sh"; sourceTree = ""; }; 56 | FAAC7C4F9FD4A481C5D16553E5BB61F3 /* Pods-SwiftyOnboardExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftyOnboardExample.release.xcconfig"; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 00837F042363A56C31EE9F7BB38C39BD /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | 0618B8809985E7ACFAE7CED9F4F66686 /* Foundation.framework in Frameworks */, 65 | ); 66 | runOnlyForDeploymentPostprocessing = 0; 67 | }; 68 | A29C271C41A3A73E04F26515DBDD4354 /* Frameworks */ = { 69 | isa = PBXFrameworksBuildPhase; 70 | buildActionMask = 2147483647; 71 | files = ( 72 | 50B827C3771E37855ACC266029DE38AD /* Foundation.framework in Frameworks */, 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | 3F41084FD05BFDEEB32F1F5FAA95F464 /* Pods */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | B1DBA2B74C67EC478BC9533D6C2523D4 /* SwiftyOnboard */, 83 | ); 84 | name = Pods; 85 | sourceTree = ""; 86 | }; 87 | 7DB346D0F39D3F0E887471402A8071AB = { 88 | isa = PBXGroup; 89 | children = ( 90 | 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 91 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 92 | 3F41084FD05BFDEEB32F1F5FAA95F464 /* Pods */, 93 | F15DB54A9FBBA91D6C81E1C433FEA6B3 /* Products */, 94 | 9CFE3652B7792CCAE66C3DD8AFA46D49 /* Targets Support Files */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 9CFE3652B7792CCAE66C3DD8AFA46D49 /* Targets Support Files */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | F391447E6ABB36A9439C5F381A820215 /* Pods-SwiftyOnboardExample */, 102 | ); 103 | name = "Targets Support Files"; 104 | sourceTree = ""; 105 | }; 106 | A0B4AD658C4E3867836556530B952D60 /* Support Files */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 0A546B71309547FC9531853DD6C90FB4 /* Info.plist */, 110 | B2D4AAA612910C47AB19B40AFF4FF05C /* SwiftyOnboard.modulemap */, 111 | 3776ADD027027673CD313827904C86FF /* SwiftyOnboard.xcconfig */, 112 | 2646EDC93F0E69795297138574F1DAA2 /* SwiftyOnboard-dummy.m */, 113 | 8B964359D7C61E466DFA1759C8A6D396 /* SwiftyOnboard-prefix.pch */, 114 | DE4BA9FBEA2EA37C4D78C13B7C4CE3F1 /* SwiftyOnboard-umbrella.h */, 115 | ); 116 | name = "Support Files"; 117 | path = "../Target Support Files/SwiftyOnboard"; 118 | sourceTree = ""; 119 | }; 120 | B1DBA2B74C67EC478BC9533D6C2523D4 /* SwiftyOnboard */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 311B10A7866D4A45992B1B3CE72DB472 /* SwiftyOnboard.h */, 124 | 257082FB7ACE788C5C10F88EA62D7473 /* SwiftyOnboard.swift */, 125 | C192134DF2ED60CEB408BA5B8A022A82 /* SwiftyOnboardOverlay.swift */, 126 | EEF5445AC98B9281931D326C07A359D7 /* SwiftyOnboardPage.swift */, 127 | A0B4AD658C4E3867836556530B952D60 /* Support Files */, 128 | ); 129 | path = SwiftyOnboard; 130 | sourceTree = ""; 131 | }; 132 | BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { 133 | isa = PBXGroup; 134 | children = ( 135 | D35AF013A5F0BAD4F32504907A52519E /* iOS */, 136 | ); 137 | name = Frameworks; 138 | sourceTree = ""; 139 | }; 140 | D35AF013A5F0BAD4F32504907A52519E /* iOS */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */, 144 | ); 145 | name = iOS; 146 | sourceTree = ""; 147 | }; 148 | F15DB54A9FBBA91D6C81E1C433FEA6B3 /* Products */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 041BA9724DD03D40D3EAE24EA888FE44 /* Pods_SwiftyOnboardExample.framework */, 152 | 3EE2181D6FAE8A39AD5CE4CA02EA786C /* SwiftyOnboard.framework */, 153 | ); 154 | name = Products; 155 | sourceTree = ""; 156 | }; 157 | F391447E6ABB36A9439C5F381A820215 /* Pods-SwiftyOnboardExample */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | D5915ED8E27D44A5326FAC5D1816BB94 /* Info.plist */, 161 | 7C0E99A1E061D2EF23EB3BB57ACF3E9C /* Pods-SwiftyOnboardExample.modulemap */, 162 | 4145D6030CA6C970B3E7067327E66D3B /* Pods-SwiftyOnboardExample-acknowledgements.markdown */, 163 | E1F5B33BEE9084D0EB0FB1233C19C4FD /* Pods-SwiftyOnboardExample-acknowledgements.plist */, 164 | 8D80372DE4E1CD134036A452A18291F8 /* Pods-SwiftyOnboardExample-dummy.m */, 165 | F536DDF293DC8D5DB6AD68C2E344A61F /* Pods-SwiftyOnboardExample-frameworks.sh */, 166 | 9B766159C1DC2C9058FDD96E111403AF /* Pods-SwiftyOnboardExample-resources.sh */, 167 | 39D078963A3D5AB5C96292FA9C4D01A8 /* Pods-SwiftyOnboardExample-umbrella.h */, 168 | A6485FA8FD6DB57BFC1AC7DEE0D14735 /* Pods-SwiftyOnboardExample.debug.xcconfig */, 169 | FAAC7C4F9FD4A481C5D16553E5BB61F3 /* Pods-SwiftyOnboardExample.release.xcconfig */, 170 | ); 171 | name = "Pods-SwiftyOnboardExample"; 172 | path = "Target Support Files/Pods-SwiftyOnboardExample"; 173 | sourceTree = ""; 174 | }; 175 | /* End PBXGroup section */ 176 | 177 | /* Begin PBXHeadersBuildPhase section */ 178 | 4197382F3910DDF012A1069663D2BAE3 /* Headers */ = { 179 | isa = PBXHeadersBuildPhase; 180 | buildActionMask = 2147483647; 181 | files = ( 182 | 5DDF8D17B8EAB4FEFF11393F7E9B67DF /* SwiftyOnboard-umbrella.h in Headers */, 183 | 9DBEE4C8ED0B2A4E18199FED87B16456 /* SwiftyOnboard.h in Headers */, 184 | ); 185 | runOnlyForDeploymentPostprocessing = 0; 186 | }; 187 | CDAB87D9A93A732806B8B8D848A48BBE /* Headers */ = { 188 | isa = PBXHeadersBuildPhase; 189 | buildActionMask = 2147483647; 190 | files = ( 191 | 537EA667D25DA3F4319712CB5734630F /* Pods-SwiftyOnboardExample-umbrella.h in Headers */, 192 | ); 193 | runOnlyForDeploymentPostprocessing = 0; 194 | }; 195 | /* End PBXHeadersBuildPhase section */ 196 | 197 | /* Begin PBXNativeTarget section */ 198 | BD39391FBA6A9C16C2BAC0893175BC7D /* SwiftyOnboard */ = { 199 | isa = PBXNativeTarget; 200 | buildConfigurationList = 4FA52E8244D068BB419FAD757462889D /* Build configuration list for PBXNativeTarget "SwiftyOnboard" */; 201 | buildPhases = ( 202 | 40DDA301EF0490CBC0626791E65FF4E5 /* Sources */, 203 | 00837F042363A56C31EE9F7BB38C39BD /* Frameworks */, 204 | 4197382F3910DDF012A1069663D2BAE3 /* Headers */, 205 | ); 206 | buildRules = ( 207 | ); 208 | dependencies = ( 209 | ); 210 | name = SwiftyOnboard; 211 | productName = SwiftyOnboard; 212 | productReference = 3EE2181D6FAE8A39AD5CE4CA02EA786C /* SwiftyOnboard.framework */; 213 | productType = "com.apple.product-type.framework"; 214 | }; 215 | C06325BFD72BBFD76A377CF56E0EFE18 /* Pods-SwiftyOnboardExample */ = { 216 | isa = PBXNativeTarget; 217 | buildConfigurationList = ED1DEE588CD9C87FFD8F45B51E5F8BCC /* Build configuration list for PBXNativeTarget "Pods-SwiftyOnboardExample" */; 218 | buildPhases = ( 219 | 12C2812C350A9FCEEE70409622279E92 /* Sources */, 220 | A29C271C41A3A73E04F26515DBDD4354 /* Frameworks */, 221 | CDAB87D9A93A732806B8B8D848A48BBE /* Headers */, 222 | ); 223 | buildRules = ( 224 | ); 225 | dependencies = ( 226 | 22BFC6A5A491D5BC0FC28A6282025ED0 /* PBXTargetDependency */, 227 | ); 228 | name = "Pods-SwiftyOnboardExample"; 229 | productName = "Pods-SwiftyOnboardExample"; 230 | productReference = 041BA9724DD03D40D3EAE24EA888FE44 /* Pods_SwiftyOnboardExample.framework */; 231 | productType = "com.apple.product-type.framework"; 232 | }; 233 | /* End PBXNativeTarget section */ 234 | 235 | /* Begin PBXProject section */ 236 | D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { 237 | isa = PBXProject; 238 | attributes = { 239 | LastSwiftUpdateCheck = 0830; 240 | LastUpgradeCheck = 1010; 241 | TargetAttributes = { 242 | BD39391FBA6A9C16C2BAC0893175BC7D = { 243 | LastSwiftMigration = 1010; 244 | }; 245 | }; 246 | }; 247 | buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; 248 | compatibilityVersion = "Xcode 3.2"; 249 | developmentRegion = English; 250 | hasScannedForEncodings = 0; 251 | knownRegions = ( 252 | en, 253 | ); 254 | mainGroup = 7DB346D0F39D3F0E887471402A8071AB; 255 | productRefGroup = F15DB54A9FBBA91D6C81E1C433FEA6B3 /* Products */; 256 | projectDirPath = ""; 257 | projectRoot = ""; 258 | targets = ( 259 | C06325BFD72BBFD76A377CF56E0EFE18 /* Pods-SwiftyOnboardExample */, 260 | BD39391FBA6A9C16C2BAC0893175BC7D /* SwiftyOnboard */, 261 | ); 262 | }; 263 | /* End PBXProject section */ 264 | 265 | /* Begin PBXSourcesBuildPhase section */ 266 | 12C2812C350A9FCEEE70409622279E92 /* Sources */ = { 267 | isa = PBXSourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | 1FB22359DA67AE3E453F5235EF7F2955 /* Pods-SwiftyOnboardExample-dummy.m in Sources */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | 40DDA301EF0490CBC0626791E65FF4E5 /* Sources */ = { 275 | isa = PBXSourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | 10D5204CB6B1B157B0EF52557DB1C49A /* SwiftyOnboard-dummy.m in Sources */, 279 | 83F66BCEAC1F5C953265B89BA409AF8A /* SwiftyOnboard.swift in Sources */, 280 | 1A205967A1851E7643A24B1B836F0762 /* SwiftyOnboardOverlay.swift in Sources */, 281 | F2682A4DA85C4D74F57D1D92B1234F69 /* SwiftyOnboardPage.swift in Sources */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | /* End PBXSourcesBuildPhase section */ 286 | 287 | /* Begin PBXTargetDependency section */ 288 | 22BFC6A5A491D5BC0FC28A6282025ED0 /* PBXTargetDependency */ = { 289 | isa = PBXTargetDependency; 290 | name = SwiftyOnboard; 291 | target = BD39391FBA6A9C16C2BAC0893175BC7D /* SwiftyOnboard */; 292 | targetProxy = 7E3042B8AE224DF40B6C887BD16ECC99 /* PBXContainerItemProxy */; 293 | }; 294 | /* End PBXTargetDependency section */ 295 | 296 | /* Begin XCBuildConfiguration section */ 297 | 166E2CAC58E8608AD59A6F0B71C9C3E0 /* Debug */ = { 298 | isa = XCBuildConfiguration; 299 | buildSettings = { 300 | ALWAYS_SEARCH_USER_PATHS = NO; 301 | CLANG_ANALYZER_NONNULL = YES; 302 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; 303 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 304 | CLANG_CXX_LIBRARY = "libc++"; 305 | CLANG_ENABLE_MODULES = YES; 306 | CLANG_ENABLE_OBJC_ARC = YES; 307 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 308 | CLANG_WARN_BOOL_CONVERSION = YES; 309 | CLANG_WARN_COMMA = YES; 310 | CLANG_WARN_CONSTANT_CONVERSION = YES; 311 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 312 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 313 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 314 | CLANG_WARN_EMPTY_BODY = YES; 315 | CLANG_WARN_ENUM_CONVERSION = YES; 316 | CLANG_WARN_INFINITE_RECURSION = YES; 317 | CLANG_WARN_INT_CONVERSION = YES; 318 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 319 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 320 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 321 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 322 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 323 | CLANG_WARN_STRICT_PROTOTYPES = YES; 324 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 325 | CLANG_WARN_UNREACHABLE_CODE = YES; 326 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 327 | CODE_SIGNING_REQUIRED = NO; 328 | COPY_PHASE_STRIP = NO; 329 | ENABLE_STRICT_OBJC_MSGSEND = YES; 330 | ENABLE_TESTABILITY = YES; 331 | GCC_C_LANGUAGE_STANDARD = gnu99; 332 | GCC_DYNAMIC_NO_PIC = NO; 333 | GCC_NO_COMMON_BLOCKS = YES; 334 | GCC_OPTIMIZATION_LEVEL = 0; 335 | GCC_PREPROCESSOR_DEFINITIONS = ( 336 | "POD_CONFIGURATION_DEBUG=1", 337 | "DEBUG=1", 338 | "$(inherited)", 339 | ); 340 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 341 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 342 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 343 | GCC_WARN_UNDECLARED_SELECTOR = YES; 344 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 345 | GCC_WARN_UNUSED_FUNCTION = YES; 346 | GCC_WARN_UNUSED_VARIABLE = YES; 347 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 348 | ONLY_ACTIVE_ARCH = YES; 349 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 350 | STRIP_INSTALLED_PRODUCT = NO; 351 | SYMROOT = "${SRCROOT}/../build"; 352 | }; 353 | name = Debug; 354 | }; 355 | 2920FA31624689FC240A23989CE7DEA2 /* Release */ = { 356 | isa = XCBuildConfiguration; 357 | baseConfigurationReference = 3776ADD027027673CD313827904C86FF /* SwiftyOnboard.xcconfig */; 358 | buildSettings = { 359 | CODE_SIGN_IDENTITY = ""; 360 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 361 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 362 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 363 | CURRENT_PROJECT_VERSION = 1; 364 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 365 | DEFINES_MODULE = YES; 366 | DYLIB_COMPATIBILITY_VERSION = 1; 367 | DYLIB_CURRENT_VERSION = 1; 368 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 369 | ENABLE_STRICT_OBJC_MSGSEND = YES; 370 | GCC_NO_COMMON_BLOCKS = YES; 371 | GCC_PREFIX_HEADER = "Target Support Files/SwiftyOnboard/SwiftyOnboard-prefix.pch"; 372 | INFOPLIST_FILE = "Target Support Files/SwiftyOnboard/Info.plist"; 373 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 374 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 375 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 376 | MODULEMAP_FILE = "Target Support Files/SwiftyOnboard/SwiftyOnboard.modulemap"; 377 | MTL_ENABLE_DEBUG_INFO = NO; 378 | PRODUCT_NAME = SwiftyOnboard; 379 | SDKROOT = iphoneos; 380 | SKIP_INSTALL = YES; 381 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 382 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 383 | SWIFT_VERSION = 4.2; 384 | TARGETED_DEVICE_FAMILY = "1,2"; 385 | VERSIONING_SYSTEM = "apple-generic"; 386 | VERSION_INFO_PREFIX = ""; 387 | }; 388 | name = Release; 389 | }; 390 | 4C29B60AA103D86054D8247C1EDE7487 /* Debug */ = { 391 | isa = XCBuildConfiguration; 392 | baseConfigurationReference = A6485FA8FD6DB57BFC1AC7DEE0D14735 /* Pods-SwiftyOnboardExample.debug.xcconfig */; 393 | buildSettings = { 394 | CODE_SIGN_IDENTITY = ""; 395 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 396 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 397 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 398 | CURRENT_PROJECT_VERSION = 1; 399 | DEBUG_INFORMATION_FORMAT = dwarf; 400 | DEFINES_MODULE = YES; 401 | DYLIB_COMPATIBILITY_VERSION = 1; 402 | DYLIB_CURRENT_VERSION = 1; 403 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 404 | ENABLE_STRICT_OBJC_MSGSEND = YES; 405 | GCC_NO_COMMON_BLOCKS = YES; 406 | INFOPLIST_FILE = "Target Support Files/Pods-SwiftyOnboardExample/Info.plist"; 407 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 408 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 409 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 410 | MACH_O_TYPE = staticlib; 411 | MODULEMAP_FILE = "Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample.modulemap"; 412 | MTL_ENABLE_DEBUG_INFO = YES; 413 | OTHER_LDFLAGS = ""; 414 | OTHER_LIBTOOLFLAGS = ""; 415 | PODS_ROOT = "$(SRCROOT)"; 416 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 417 | PRODUCT_NAME = Pods_SwiftyOnboardExample; 418 | SDKROOT = iphoneos; 419 | SKIP_INSTALL = YES; 420 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 3.0; 423 | TARGETED_DEVICE_FAMILY = "1,2"; 424 | VERSIONING_SYSTEM = "apple-generic"; 425 | VERSION_INFO_PREFIX = ""; 426 | }; 427 | name = Debug; 428 | }; 429 | 7D959AF28A9AF5A0CB60604E2B9307A3 /* Release */ = { 430 | isa = XCBuildConfiguration; 431 | baseConfigurationReference = FAAC7C4F9FD4A481C5D16553E5BB61F3 /* Pods-SwiftyOnboardExample.release.xcconfig */; 432 | buildSettings = { 433 | CODE_SIGN_IDENTITY = ""; 434 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 435 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 436 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 437 | CURRENT_PROJECT_VERSION = 1; 438 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 439 | DEFINES_MODULE = YES; 440 | DYLIB_COMPATIBILITY_VERSION = 1; 441 | DYLIB_CURRENT_VERSION = 1; 442 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 443 | ENABLE_STRICT_OBJC_MSGSEND = YES; 444 | GCC_NO_COMMON_BLOCKS = YES; 445 | INFOPLIST_FILE = "Target Support Files/Pods-SwiftyOnboardExample/Info.plist"; 446 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 447 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 448 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 449 | MACH_O_TYPE = staticlib; 450 | MODULEMAP_FILE = "Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample.modulemap"; 451 | MTL_ENABLE_DEBUG_INFO = NO; 452 | OTHER_LDFLAGS = ""; 453 | OTHER_LIBTOOLFLAGS = ""; 454 | PODS_ROOT = "$(SRCROOT)"; 455 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; 456 | PRODUCT_NAME = Pods_SwiftyOnboardExample; 457 | SDKROOT = iphoneos; 458 | SKIP_INSTALL = YES; 459 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 460 | SWIFT_VERSION = 3.0; 461 | TARGETED_DEVICE_FAMILY = "1,2"; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | VERSION_INFO_PREFIX = ""; 464 | }; 465 | name = Release; 466 | }; 467 | 832FB5546D03B244597C30B92F50DAA5 /* Debug */ = { 468 | isa = XCBuildConfiguration; 469 | baseConfigurationReference = 3776ADD027027673CD313827904C86FF /* SwiftyOnboard.xcconfig */; 470 | buildSettings = { 471 | CODE_SIGN_IDENTITY = ""; 472 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; 473 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 474 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; 475 | CURRENT_PROJECT_VERSION = 1; 476 | DEBUG_INFORMATION_FORMAT = dwarf; 477 | DEFINES_MODULE = YES; 478 | DYLIB_COMPATIBILITY_VERSION = 1; 479 | DYLIB_CURRENT_VERSION = 1; 480 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 481 | ENABLE_STRICT_OBJC_MSGSEND = YES; 482 | GCC_NO_COMMON_BLOCKS = YES; 483 | GCC_PREFIX_HEADER = "Target Support Files/SwiftyOnboard/SwiftyOnboard-prefix.pch"; 484 | INFOPLIST_FILE = "Target Support Files/SwiftyOnboard/Info.plist"; 485 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 486 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 487 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 488 | MODULEMAP_FILE = "Target Support Files/SwiftyOnboard/SwiftyOnboard.modulemap"; 489 | MTL_ENABLE_DEBUG_INFO = YES; 490 | PRODUCT_NAME = SwiftyOnboard; 491 | SDKROOT = iphoneos; 492 | SKIP_INSTALL = YES; 493 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 494 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 495 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 496 | SWIFT_VERSION = 4.2; 497 | TARGETED_DEVICE_FAMILY = "1,2"; 498 | VERSIONING_SYSTEM = "apple-generic"; 499 | VERSION_INFO_PREFIX = ""; 500 | }; 501 | name = Debug; 502 | }; 503 | AA0B5BDEB018901CD8F88AAD05F5B893 /* Release */ = { 504 | isa = XCBuildConfiguration; 505 | buildSettings = { 506 | ALWAYS_SEARCH_USER_PATHS = NO; 507 | CLANG_ANALYZER_NONNULL = YES; 508 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES; 509 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 510 | CLANG_CXX_LIBRARY = "libc++"; 511 | CLANG_ENABLE_MODULES = YES; 512 | CLANG_ENABLE_OBJC_ARC = YES; 513 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 514 | CLANG_WARN_BOOL_CONVERSION = YES; 515 | CLANG_WARN_COMMA = YES; 516 | CLANG_WARN_CONSTANT_CONVERSION = YES; 517 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 518 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; 519 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 520 | CLANG_WARN_EMPTY_BODY = YES; 521 | CLANG_WARN_ENUM_CONVERSION = YES; 522 | CLANG_WARN_INFINITE_RECURSION = YES; 523 | CLANG_WARN_INT_CONVERSION = YES; 524 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 525 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 526 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 527 | CLANG_WARN_OBJC_ROOT_CLASS = YES; 528 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 529 | CLANG_WARN_STRICT_PROTOTYPES = YES; 530 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 531 | CLANG_WARN_UNREACHABLE_CODE = YES; 532 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 533 | CODE_SIGNING_REQUIRED = NO; 534 | COPY_PHASE_STRIP = YES; 535 | ENABLE_NS_ASSERTIONS = NO; 536 | ENABLE_STRICT_OBJC_MSGSEND = YES; 537 | GCC_C_LANGUAGE_STANDARD = gnu99; 538 | GCC_NO_COMMON_BLOCKS = YES; 539 | GCC_PREPROCESSOR_DEFINITIONS = ( 540 | "POD_CONFIGURATION_RELEASE=1", 541 | "$(inherited)", 542 | ); 543 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 544 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 545 | GCC_WARN_UNDECLARED_SELECTOR = YES; 546 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 547 | GCC_WARN_UNUSED_FUNCTION = YES; 548 | GCC_WARN_UNUSED_VARIABLE = YES; 549 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 550 | PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; 551 | STRIP_INSTALLED_PRODUCT = NO; 552 | SYMROOT = "${SRCROOT}/../build"; 553 | VALIDATE_PRODUCT = YES; 554 | }; 555 | name = Release; 556 | }; 557 | /* End XCBuildConfiguration section */ 558 | 559 | /* Begin XCConfigurationList section */ 560 | 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { 561 | isa = XCConfigurationList; 562 | buildConfigurations = ( 563 | 166E2CAC58E8608AD59A6F0B71C9C3E0 /* Debug */, 564 | AA0B5BDEB018901CD8F88AAD05F5B893 /* Release */, 565 | ); 566 | defaultConfigurationIsVisible = 0; 567 | defaultConfigurationName = Release; 568 | }; 569 | 4FA52E8244D068BB419FAD757462889D /* Build configuration list for PBXNativeTarget "SwiftyOnboard" */ = { 570 | isa = XCConfigurationList; 571 | buildConfigurations = ( 572 | 832FB5546D03B244597C30B92F50DAA5 /* Debug */, 573 | 2920FA31624689FC240A23989CE7DEA2 /* Release */, 574 | ); 575 | defaultConfigurationIsVisible = 0; 576 | defaultConfigurationName = Release; 577 | }; 578 | ED1DEE588CD9C87FFD8F45B51E5F8BCC /* Build configuration list for PBXNativeTarget "Pods-SwiftyOnboardExample" */ = { 579 | isa = XCConfigurationList; 580 | buildConfigurations = ( 581 | 4C29B60AA103D86054D8247C1EDE7487 /* Debug */, 582 | 7D959AF28A9AF5A0CB60604E2B9307A3 /* Release */, 583 | ); 584 | defaultConfigurationIsVisible = 0; 585 | defaultConfigurationName = Release; 586 | }; 587 | /* End XCConfigurationList section */ 588 | }; 589 | rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; 590 | } 591 | -------------------------------------------------------------------------------- /Example/Pods/SwiftyOnboard/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Juan Pablo Fernandez 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Example/Pods/SwiftyOnboard/README.md: -------------------------------------------------------------------------------- 1 | # SwiftyOnboard 2 | > A simple iOS framework that allows developers to create onboarding experiences. 3 | 4 | [![Swift Version][swift-image]][swift-url] 5 | [![Build Status][travis-image]][travis-url] 6 | [![License][license-image]][license-url] 7 | [![CocoaPods](https://img.shields.io/cocoapods/v/SwiftyOnboard.svg)](https://cocoapods.org/pods/SwiftyOnboard) 8 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 9 | [![Platform](https://img.shields.io/cocoapods/p/LFAlertController.svg?style=flat)](http://cocoapods.org/pods/LFAlertController) 10 | 11 | SwiftyOnboard makes it easy to add onboarding to any iOS application. SwiftyOnboard handles all of the logic behind the pagination of views, which allows you to quickly add a highly customizable onboarding to your app, all in a lightweight framework. 12 | 13 | ![](screenshots/onboard1.gif) 14 | ![](screenshots/onboard2.gif) 15 | 16 | ## Contents 17 | 18 | * [Requirements](#requirements) 19 | * [Installation](#installation) 20 | * [CocoaPods](#cocoapods) 21 | * [Manually](#manually) 22 | * [Usage](#usage) 23 | * [Properties](#properties) 24 | * [Methods](#methods) 25 | * [Protocols](#protocols) 26 | * [DataSource](#swiftyonboarddatasource) 27 | * [Delegate](#swiftyonboarddelegate) 28 | * [Notes](#notes) 29 | * [Contribute](#contribute) 30 | * [License](#license) 31 | 32 | ## Requirements 33 | 34 | - iOS 9.0+ 35 | - Xcode 7.3+ 36 | 37 | ## Installation 38 | 39 | #### CocoaPods 40 | You can use [CocoaPods](http://cocoapods.org/) to install `SwiftyOnboard` by adding this to your `Podfile`: 41 | 42 | ```ruby 43 | use_frameworks! 44 | pod 'SwiftyOnboard' 45 | ``` 46 | If you get the ``Unable to find a specification for `SwiftyOnboard`.`` error after running `pod install`. 47 | 48 | Run the following commands on your project directory: 49 | ``` 50 | pod repo update 51 | ``` 52 | ``` 53 | pod install 54 | ``` 55 | #### Carthage 56 | To install via Carthage add this to your Cartfile: 57 | ```ruby 58 | github "juanpablofernandez/SwiftyOnboard" 59 | ``` 60 | #### Manually 61 | 1. Drag and drop ```SwiftyOnboard.swift``` ```SwiftyOnboardOverlay.swift``` ```SwiftyOnboardPage.swift``` in your project. 62 | 2. That's it! 63 | 64 | ## Usage 65 | 1. Import `SwiftyOnboard` module to your `ViewController` class 66 | ```swift 67 | import SwiftyOnboard 68 | ``` 69 | 2. Add `SwiftyOnboard` to `ViewController`, then set dataSource and delegate for it 70 | ```swift 71 | class ViewController: UIViewController { 72 | override func viewDidLoad() { 73 | super.viewDidLoad() 74 | 75 | let swiftyOnboard = SwiftyOnboard(frame: view.frame) 76 | view.addSubview(swiftyOnboard) 77 | swiftyOnboard.dataSource = self 78 | } 79 | } 80 | ``` 81 | 3. Conform your `ViewController` to `SwiftyOnboardDataSource` protocol and implement all the methods, e.g. 82 | ```swift 83 | extension ViewController: SwiftyOnboardDataSource { 84 | 85 | func swiftyOnboardNumberOfPages(swiftyOnboard: SwiftyOnboard) -> Int { 86 | return 3 87 | } 88 | 89 | func swiftyOnboardPageForIndex(swiftyOnboard: SwiftyOnboard, index: Int) -> SwiftyOnboardPage? { 90 | let page = SwiftyOnboardPage() 91 | return page 92 | } 93 | } 94 | ``` 95 | 4. `SwiftyOnboard` works with default implementation. Override it to customize its behavior 96 | 97 | 98 | 99 | ### Properties 100 | 101 | SwiftyOnboard has the following properties: 102 | ```swift 103 | public var dataSource: SwiftyOnboardDataSource? 104 | ``` 105 | An object that supports the SwiftyOnboardDataSource protocol and can provide views to populate the SwiftyOnboard. 106 | ```swift 107 | public var delegate: SwiftyOnboardDelegate? 108 | ``` 109 | An object that supports the SwiftyOnboardDelegate protocol and can respond to SwiftyOnboard events. 110 | ```swift 111 | public var shouldSwipe: Bool 112 | ``` 113 | Whether or not swiping is enabled [default = true]. 114 | ```swift 115 | public var fadePages: Bool 116 | ``` 117 | Whether or not pages will fade upon transition [default = true]. 118 | 119 | ### Methods 120 | 121 | SwiftyOnboard class has the following methods: 122 | ```swift 123 | func goToPage(index: Int, animated: Bool) 124 | ``` 125 | This method allows you to move to a certain page in the onboarding. 126 | 127 | ### Protocols 128 | 129 | The SwiftyOnboard follows the Apple convention for data-driven views by providing two protocol interfaces, SwiftyOnboardDataSource and SwiftyOnboardDelegate. 130 | #### SwiftyOnboardDataSource 131 | SwiftyOnboardDataSource protocol has the following methods: 132 | ```swift 133 | func swiftyOnboardNumberOfPages(swiftyOnboard: SwiftyOnboard) -> Int 134 | ``` 135 | Return the number of items (pages) in the onboarding. 136 | ```swift 137 | func swiftyOnboardViewForBackground(swiftyOnboard: SwiftyOnboard) -> UIView? 138 | ``` 139 | Return a view to be displayed as the background of the onboarding. 140 | ```swift 141 | func swiftyOnboardPageForIndex(swiftyOnboard: SwiftyOnboard, index: Int) -> SwiftyOnboardPage? 142 | ``` 143 | Return a view (page) to be displayed at the specified index in the onboarding. 144 | ```swift 145 | func swiftyOnboardViewForOverlay(swiftyOnboard: SwiftyOnboard) -> SwiftyOnboardOverlay? 146 | ``` 147 | Return an overlay (view) to be displayed on top of the onboarding pages. e.g. [The continue and skip buttons which don't move with the pages, also included is the page control] 148 | ```swift 149 | func swiftyOnboardOverlayForPosition(swiftyOnboard: SwiftyOnboard, overlay: SwiftyOnboardOverlay, for position: Double) 150 | ``` 151 | Edit the overlay (view) for the desired position. e.g. [Change the "continue button" text to "Done", when the last page is reached] 152 | ```swift 153 | func swiftyOnboardBackgroundColorFor(_ swiftyOnboard: SwiftyOnboard, atIndex index: Int) -> UIColor? 154 | ``` 155 | Set the background color for the page at the given index. (Very useful when you have pages with different background colors) 156 | 157 | #### SwiftyOnboardDelegate 158 | SwiftyOnboardDelegate protocol has the following methods: 159 | ```swift 160 | func swiftyOnboard(swiftyOnboard: SwiftyOnboard, currentPage index: Int) 161 | ``` 162 | This method is called whenever a page is shown, it holds the index to that page. It is called regardless of whether the page was swiped programmatically or through user interaction. 163 | ```swift 164 | func swiftyOnboard(swiftyOnboard: SwiftyOnboard, leftEdge position: Double) 165 | ``` 166 | This method is called whenever the pages are scrolling, it holds the current distance between the left side of the screen and the left side of the first page. 167 | ```swift 168 | func swiftyOnboard(swiftyOnboard: SwiftyOnboard, tapped index: Int) 169 | ``` 170 | This method is called whenever a page is tapped by the user, it holds the index of the tapped page. 171 | 172 | ## Notes 173 | * Landscape mode is not supported 174 | 175 | ## Contribute 176 | Contributions are welcomed! There are however certain guidelines you must follow when you contribute: 177 | * Have descriptive commit messages. 178 | * Make a pull request for every feature (Don't make a pull request that adds 3 new features. Make an individual pull request for each of those features, with a descriptive message). 179 | * Don't update the example project, or any other irrelevant files. 180 | 181 | I want to see your amazing onboarding. Take screenshots and/or record a gif and send it my way! 182 | 183 | ## License 184 | 185 | Distributed under the MIT license. See ``LICENSE`` for more information. 186 | 187 | [swift-image]:https://img.shields.io/badge/swift-3.0-orange.svg 188 | [swift-url]: https://swift.org/ 189 | [license-image]: https://img.shields.io/badge/License-MIT-blue.svg 190 | [license-url]: LICENSE 191 | [travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square 192 | [travis-url]: https://travis-ci.org/dbader/node-datadog-metrics 193 | [codebeat-image]: https://codebeat.co/badges/c19b47ea-2f9d-45df-8458-b2d952fe9dad 194 | [codebeat-url]: https://codebeat.co/projects/github-com-vsouza-awesomeios-com 195 | -------------------------------------------------------------------------------- /Example/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboard.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftyOnboard.h 3 | // SwiftyOnboard 4 | // 5 | // Created by Jay on 3/26/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SwiftyOnboard. 12 | FOUNDATION_EXPORT double SwiftyOnboardVersionNumber; 13 | 14 | //! Project version string for SwiftyOnboard. 15 | FOUNDATION_EXPORT const unsigned char SwiftyOnboardVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Example/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboard.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwiftyOnboard 4 | // 5 | // Created by Jay on 3/25/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol SwiftyOnboardDataSource: class { 12 | 13 | func swiftyOnboardBackgroundColorFor(_ swiftyOnboard: SwiftyOnboard, atIndex index: Int) -> UIColor? 14 | func swiftyOnboardNumberOfPages(_ swiftyOnboard: SwiftyOnboard) -> Int 15 | func swiftyOnboardViewForBackground(_ swiftyOnboard: SwiftyOnboard) -> UIView? 16 | func swiftyOnboardPageForIndex(_ swiftyOnboard: SwiftyOnboard, index: Int) -> SwiftyOnboardPage? 17 | func swiftyOnboardViewForOverlay(_ swiftyOnboard: SwiftyOnboard) -> SwiftyOnboardOverlay? 18 | func swiftyOnboardOverlayForPosition(_ swiftyOnboard: SwiftyOnboard, overlay: SwiftyOnboardOverlay, for position: Double) 19 | 20 | } 21 | 22 | public extension SwiftyOnboardDataSource { 23 | 24 | func swiftyOnboardBackgroundColorFor(_ swiftyOnboard: SwiftyOnboard,atIndex index: Int)->UIColor?{ 25 | return nil 26 | } 27 | 28 | func swiftyOnboardViewForBackground(_ swiftyOnboard: SwiftyOnboard) -> UIView? { 29 | return nil 30 | } 31 | 32 | func swiftyOnboardOverlayForPosition(_ swiftyOnboard: SwiftyOnboard, overlay: SwiftyOnboardOverlay, for position: Double) {} 33 | 34 | func swiftyOnboardViewForOverlay(_ swiftyOnboard: SwiftyOnboard) -> SwiftyOnboardOverlay? { 35 | return SwiftyOnboardOverlay() 36 | } 37 | } 38 | 39 | public protocol SwiftyOnboardDelegate: class { 40 | 41 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, currentPage index: Int) 42 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, leftEdge position: Double) 43 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, tapped index: Int) 44 | 45 | } 46 | 47 | public extension SwiftyOnboardDelegate { 48 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, currentPage index: Int) {} 49 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, leftEdge position: Double) {} 50 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, tapped index: Int) {} 51 | } 52 | 53 | public class SwiftyOnboard: UIView, UIScrollViewDelegate { 54 | 55 | open weak var dataSource: SwiftyOnboardDataSource? { 56 | didSet { 57 | if let color = dataSource?.swiftyOnboardBackgroundColorFor(self, atIndex: 0){ 58 | backgroundColor = color 59 | } 60 | dataSourceSet = true 61 | } 62 | } 63 | 64 | open weak var delegate: SwiftyOnboardDelegate? 65 | 66 | fileprivate var containerView: UIScrollView = { 67 | let scrollView = UIScrollView() 68 | scrollView.isPagingEnabled = true 69 | scrollView.bounces = false 70 | scrollView.showsHorizontalScrollIndicator = false 71 | scrollView.showsVerticalScrollIndicator = false 72 | scrollView.isUserInteractionEnabled = true 73 | scrollView.isScrollEnabled = true 74 | scrollView.setContentOffset(CGPoint(x: 0, y: 0), animated: false) 75 | return scrollView 76 | }() 77 | 78 | fileprivate var dataSourceSet: Bool = false 79 | fileprivate var pageCount = 0 80 | fileprivate var overlay: SwiftyOnboardOverlay? 81 | fileprivate var pages = [SwiftyOnboardPage]() 82 | 83 | open var style: SwiftyOnboardStyle = .dark 84 | open var shouldSwipe: Bool = true 85 | open var fadePages: Bool = true 86 | 87 | 88 | public init(frame: CGRect, style: SwiftyOnboardStyle = .dark) { 89 | super.init(frame: frame) 90 | self.style = style 91 | } 92 | 93 | required public init?(coder aDecoder: NSCoder) { 94 | super.init(coder: aDecoder) 95 | } 96 | 97 | private func loadView() { 98 | setBackgroundView() 99 | setUpContainerView() 100 | setUpPages() 101 | setOverlayView() 102 | containerView.isScrollEnabled = shouldSwipe 103 | } 104 | 105 | override open func layoutSubviews() { 106 | super.layoutSubviews() 107 | if dataSourceSet { 108 | loadView() 109 | dataSourceSet = false 110 | } 111 | } 112 | 113 | fileprivate func setUpContainerView() { 114 | self.addSubview(containerView) 115 | self.containerView.frame = self.frame 116 | containerView.delegate = self 117 | let tap = UITapGestureRecognizer(target: self, action: #selector(tappedPage)) 118 | containerView.addGestureRecognizer(tap) 119 | } 120 | 121 | fileprivate func setBackgroundView() { 122 | if let dataSource = dataSource { 123 | if let background = dataSource.swiftyOnboardViewForBackground(self) { 124 | self.addSubview(background) 125 | self.sendSubviewToBack(background) 126 | } 127 | } 128 | } 129 | 130 | fileprivate func setUpPages() { 131 | if let dataSource = dataSource { 132 | pageCount = dataSource.swiftyOnboardNumberOfPages(self) 133 | for index in 0.. CGFloat { 169 | let boundsWidth = containerView.bounds.width 170 | let contentOffset = containerView.contentOffset.x 171 | let currentPosition = contentOffset / boundsWidth 172 | return currentPosition 173 | } 174 | 175 | fileprivate func colorForPosition(_ pos: CGFloat)->UIColor?{ 176 | let percentage: CGFloat = pos - CGFloat(Int(pos)) 177 | 178 | let currentIndex = Int(pos - percentage) 179 | 180 | if currentIndex < pageCount - 1{ 181 | let color1 = dataSource?.swiftyOnboardBackgroundColorFor(self, atIndex: currentIndex) 182 | let color2 = dataSource?.swiftyOnboardBackgroundColorFor(self, atIndex: currentIndex + 1) 183 | 184 | if let color1 = color1, 185 | let color2 = color2{ 186 | return colorFrom(start: color1, end: color2, percent: percentage) 187 | } 188 | } 189 | return nil 190 | } 191 | 192 | fileprivate func colorFrom(start color1: UIColor, end color2: UIColor, percent: CGFloat)->UIColor{ 193 | func cofd(_ color1: CGFloat,_ color2: CGFloat,_ percent: CGFloat)-> CGFloat{ 194 | let c1 = CGFloat(color1) 195 | let c2 = CGFloat(color2) 196 | return (c1 + ((c2 - c1) * percent)) 197 | } 198 | return UIColor(red: cofd(color1.cgColor.components![0], 199 | color2.cgColor.components![0], 200 | percent), 201 | green: cofd(color1.cgColor.components![1], 202 | color2.cgColor.components![1], 203 | percent), 204 | blue: cofd(color1.cgColor.components![2], 205 | color2.cgColor.components![2], 206 | percent), 207 | alpha: 1) 208 | } 209 | 210 | fileprivate func fadePageTransitions(containerView: UIScrollView, currentPage: Int) { 211 | for (index,page) in pages.enumerated() { 212 | page.alpha = 1 - abs(abs(containerView.contentOffset.x) - page.frame.width * CGFloat(index)) / page.frame.width 213 | } 214 | } 215 | 216 | @objc open func didTapPageControl(_ sender: Any) { 217 | let pager = sender as! UIPageControl 218 | let page = pager.currentPage 219 | self.goToPage(index: page, animated: true) 220 | } 221 | 222 | open var currentPage: Int{ 223 | return Int(getCurrentPosition()) 224 | } 225 | 226 | open func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 227 | let currentPage = Int(getCurrentPosition()) 228 | self.delegate?.swiftyOnboard(self, currentPage: currentPage) 229 | } 230 | 231 | open func scrollViewDidScroll(_ scrollView: UIScrollView) { 232 | let currentPosition = Double(getCurrentPosition()) 233 | self.overlay?.currentPage(index: Int(round(currentPosition))) 234 | if self.fadePages { 235 | fadePageTransitions(containerView: scrollView, currentPage: Int(getCurrentPosition())) 236 | } 237 | 238 | self.delegate?.swiftyOnboard(self, leftEdge: currentPosition) 239 | if let overlayView = self.overlay { 240 | self.dataSource?.swiftyOnboardOverlayForPosition(self, overlay: overlayView, for: currentPosition) 241 | } 242 | 243 | if let color = colorForPosition(CGFloat(currentPosition)) { 244 | self.backgroundColor = color 245 | } 246 | } 247 | 248 | open func goToPage(index: Int, animated: Bool) { 249 | if index < self.pageCount { 250 | let index = CGFloat(index) 251 | containerView.setContentOffset(CGPoint(x: index * self.frame.width, y: 0), animated: animated) 252 | } 253 | } 254 | } 255 | 256 | public enum SwiftyOnboardStyle { 257 | case light 258 | case dark 259 | } 260 | -------------------------------------------------------------------------------- /Example/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboardOverlay.swift: -------------------------------------------------------------------------------- 1 | // 2 | // customOverlayView.swift 3 | // SwiftyOnboard 4 | // 5 | // Created by Jay on 3/26/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class SwiftyOnboardOverlay: UIView { 12 | 13 | open var pageControl: UIPageControl = { 14 | let pageControl = UIPageControl() 15 | pageControl.currentPage = 0 16 | pageControl.pageIndicatorTintColor = UIColor.lightGray 17 | return pageControl 18 | }() 19 | 20 | open var continueButton: UIButton = { 21 | let button = UIButton(type: .system) 22 | button.setTitle("Continue", for: .normal) 23 | button.contentHorizontalAlignment = .center 24 | return button 25 | }() 26 | 27 | open var skipButton: UIButton = { 28 | let button = UIButton(type: .system) 29 | button.setTitle("Skip", for: .normal) 30 | button.contentHorizontalAlignment = .right 31 | return button 32 | }() 33 | 34 | override init(frame: CGRect) { 35 | super.init(frame: frame) 36 | setUp() 37 | } 38 | 39 | required public init?(coder aDecoder: NSCoder) { 40 | super.init(coder: aDecoder) 41 | } 42 | 43 | override open func point(inside point: CGPoint, with event: UIEvent?) -> Bool { 44 | for subview in subviews { 45 | if !subview.isHidden && subview.alpha > 0 && subview.isUserInteractionEnabled && subview.point(inside: convert(point, to: subview), with: event) { 46 | return true 47 | } 48 | } 49 | return false 50 | } 51 | 52 | open func set(style: SwiftyOnboardStyle) { 53 | switch style { 54 | case .light: 55 | continueButton.setTitleColor(.white, for: .normal) 56 | skipButton.setTitleColor(.white, for: .normal) 57 | pageControl.currentPageIndicatorTintColor = UIColor.white 58 | case .dark: 59 | continueButton.setTitleColor(.black, for: .normal) 60 | skipButton.setTitleColor(.black, for: .normal) 61 | pageControl.currentPageIndicatorTintColor = UIColor.black 62 | } 63 | } 64 | 65 | open func page(count: Int) { 66 | pageControl.numberOfPages = count 67 | } 68 | 69 | open func currentPage(index: Int) { 70 | pageControl.currentPage = index 71 | } 72 | 73 | func setUp() { 74 | self.addSubview(pageControl) 75 | pageControl.translatesAutoresizingMaskIntoConstraints = false 76 | pageControl.heightAnchor.constraint(equalToConstant: 15).isActive = true 77 | pageControl.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -10).isActive = true 78 | pageControl.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 10).isActive = true 79 | pageControl.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -10).isActive = true 80 | 81 | self.addSubview(continueButton) 82 | continueButton.translatesAutoresizingMaskIntoConstraints = false 83 | continueButton.heightAnchor.constraint(equalToConstant: 20).isActive = true 84 | continueButton.bottomAnchor.constraint(equalTo: pageControl.topAnchor, constant: -20).isActive = true 85 | continueButton.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 10).isActive = true 86 | continueButton.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -10).isActive = true 87 | 88 | self.addSubview(skipButton) 89 | skipButton.translatesAutoresizingMaskIntoConstraints = false 90 | skipButton.heightAnchor.constraint(equalToConstant: 20).isActive = true 91 | skipButton.topAnchor.constraint(equalTo: self.topAnchor, constant: 40).isActive = true 92 | skipButton.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 10).isActive = true 93 | skipButton.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -20).isActive = true 94 | } 95 | 96 | } 97 | -------------------------------------------------------------------------------- /Example/Pods/SwiftyOnboard/SwiftyOnboard/SwiftyOnboardPage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // customPageView.swift 3 | // SwiftyOnboard 4 | // 5 | // Created by Jay on 3/25/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class SwiftyOnboardPage: UIView { 12 | 13 | public var title: UILabel = { 14 | let label = UILabel() 15 | label.text = "Title" 16 | label.textAlignment = .center 17 | label.numberOfLines = 0 18 | label.lineBreakMode = NSLineBreakMode.byWordWrapping 19 | label.sizeToFit() 20 | return label 21 | }() 22 | 23 | public var subTitle: UILabel = { 24 | let label = UILabel() 25 | label.text = "Sub Title" 26 | label.textAlignment = .center 27 | label.numberOfLines = 0 28 | label.lineBreakMode = NSLineBreakMode.byWordWrapping 29 | label.sizeToFit() 30 | return label 31 | }() 32 | 33 | public var imageView: UIImageView = { 34 | let imageView = UIImageView() 35 | imageView.contentMode = .scaleAspectFit 36 | return imageView 37 | }() 38 | 39 | required public init?(coder aDecoder: NSCoder) { 40 | super.init(coder: aDecoder) 41 | } 42 | 43 | override init(frame: CGRect) { 44 | super.init(frame: frame) 45 | setUp() 46 | } 47 | 48 | func set(style: SwiftyOnboardStyle) { 49 | switch style { 50 | case .light: 51 | title.textColor = .white 52 | subTitle.textColor = .white 53 | case .dark: 54 | title.textColor = .black 55 | subTitle.textColor = .black 56 | } 57 | } 58 | 59 | func setUp() { 60 | self.addSubview(imageView) 61 | imageView.translatesAutoresizingMaskIntoConstraints = false 62 | imageView.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 30).isActive = true 63 | imageView.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -30).isActive = true 64 | imageView.topAnchor.constraint(equalTo: self.topAnchor, constant: 10).isActive = true 65 | imageView.heightAnchor.constraint(equalTo: self.heightAnchor, multiplier: 0.5).isActive = true 66 | 67 | self.addSubview(title) 68 | title.translatesAutoresizingMaskIntoConstraints = false 69 | title.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 30).isActive = true 70 | title.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -30).isActive = true 71 | title.topAnchor.constraint(equalTo: imageView.bottomAnchor, constant: 10).isActive = true 72 | title.heightAnchor.constraint(equalToConstant: 50).isActive = true 73 | 74 | self.addSubview(subTitle) 75 | subTitle.translatesAutoresizingMaskIntoConstraints = false 76 | subTitle.leftAnchor.constraint(equalTo: self.leftAnchor, constant: 30).isActive = true 77 | subTitle.rightAnchor.constraint(equalTo: self.rightAnchor, constant: -30).isActive = true 78 | subTitle.topAnchor.constraint(equalTo: title.bottomAnchor, constant: 0).isActive = true 79 | subTitle.heightAnchor.constraint(equalToConstant: 100).isActive = true 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftyOnboardExample/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## SwiftyOnboard 5 | 6 | MIT License 7 | 8 | Copyright (c) 2017 Juan Pablo Fernandez 9 | 10 | Permission is hereby granted, free of charge, to any person obtaining a copy 11 | of this software and associated documentation files (the "Software"), to deal 12 | in the Software without restriction, including without limitation the rights 13 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 14 | copies of the Software, and to permit persons to whom the Software is 15 | furnished to do so, subject to the following conditions: 16 | 17 | The above copyright notice and this permission notice shall be included in all 18 | copies or substantial portions of the Software. 19 | 20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 21 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 22 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 23 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 24 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 | SOFTWARE. 27 | 28 | Generated by CocoaPods - https://cocoapods.org 29 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample-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 | MIT License 18 | 19 | Copyright (c) 2017 Juan Pablo Fernandez 20 | 21 | Permission is hereby granted, free of charge, to any person obtaining a copy 22 | of this software and associated documentation files (the "Software"), to deal 23 | in the Software without restriction, including without limitation the rights 24 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 25 | copies of the Software, and to permit persons to whom the Software is 26 | furnished to do so, subject to the following conditions: 27 | 28 | The above copyright notice and this permission notice shall be included in all 29 | copies or substantial portions of the Software. 30 | 31 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 32 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 33 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 34 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 35 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 36 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 37 | SOFTWARE. 38 | 39 | License 40 | MIT 41 | Title 42 | SwiftyOnboard 43 | Type 44 | PSGroupSpecifier 45 | 46 | 47 | FooterText 48 | Generated by CocoaPods - https://cocoapods.org 49 | Title 50 | 51 | Type 52 | PSGroupSpecifier 53 | 54 | 55 | StringsTable 56 | Acknowledgements 57 | Title 58 | Acknowledgements 59 | 60 | 61 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SwiftyOnboardExample : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SwiftyOnboardExample 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample-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 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" 63 | 64 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 65 | code_sign_cmd="$code_sign_cmd &" 66 | fi 67 | echo "$code_sign_cmd" 68 | eval "$code_sign_cmd" 69 | fi 70 | } 71 | 72 | # Strip invalid architectures 73 | strip_invalid_archs() { 74 | binary="$1" 75 | # Get architectures for current file 76 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 77 | stripped="" 78 | for arch in $archs; do 79 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 80 | # Strip non-valid architectures in-place 81 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 82 | stripped="$stripped $arch" 83 | fi 84 | done 85 | if [[ "$stripped" ]]; then 86 | echo "Stripped $binary of architectures:$stripped" 87 | fi 88 | } 89 | 90 | 91 | if [[ "$CONFIGURATION" == "Debug" ]]; then 92 | install_framework "$BUILT_PRODUCTS_DIR/SwiftyOnboard/SwiftyOnboard.framework" 93 | fi 94 | if [[ "$CONFIGURATION" == "Release" ]]; then 95 | install_framework "$BUILT_PRODUCTS_DIR/SwiftyOnboard/SwiftyOnboard.framework" 96 | fi 97 | if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then 98 | wait 99 | fi 100 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_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 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | 3) 22 | TARGET_DEVICE_ARGS="--target-device tv" 23 | ;; 24 | 4) 25 | TARGET_DEVICE_ARGS="--target-device watch" 26 | ;; 27 | *) 28 | TARGET_DEVICE_ARGS="--target-device mac" 29 | ;; 30 | esac 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "${PODS_ROOT}*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_SwiftyOnboardExampleVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SwiftyOnboardExampleVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample.debug.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftyOnboard" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftyOnboard/SwiftyOnboard.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "SwiftyOnboard" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SwiftyOnboardExample { 2 | umbrella header "Pods-SwiftyOnboardExample-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample.release.xcconfig: -------------------------------------------------------------------------------- 1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/SwiftyOnboard" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/SwiftyOnboard/SwiftyOnboard.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "SwiftyOnboard" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 11 | PODS_ROOT = ${SRCROOT}/Pods 12 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftyOnboard/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 | FMWK 17 | CFBundleShortVersionString 18 | 1.3.5 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftyOnboard/SwiftyOnboard-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SwiftyOnboard : NSObject 3 | @end 4 | @implementation PodsDummy_SwiftyOnboard 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftyOnboard/SwiftyOnboard-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftyOnboard/SwiftyOnboard-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | #import "SwiftyOnboard.h" 14 | 15 | FOUNDATION_EXPORT double SwiftyOnboardVersionNumber; 16 | FOUNDATION_EXPORT const unsigned char SwiftyOnboardVersionString[]; 17 | 18 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftyOnboard/SwiftyOnboard.modulemap: -------------------------------------------------------------------------------- 1 | framework module SwiftyOnboard { 2 | umbrella header "SwiftyOnboard-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/SwiftyOnboard/SwiftyOnboard.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/SwiftyOnboard 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 5 | PODS_BUILD_DIR = $BUILD_DIR 6 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 7 | PODS_ROOT = ${SRCROOT} 8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/SwiftyOnboard 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 39BC0A64A53BA0DC4F6F720F /* Pods_SwiftyOnboardExample.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89A2285DF22A15377EBDB6B3 /* Pods_SwiftyOnboardExample.framework */; }; 11 | 693642111E89AEF7008808C2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 693642101E89AEF7008808C2 /* AppDelegate.swift */; }; 12 | 693642131E89AEF7008808C2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 693642121E89AEF7008808C2 /* ViewController.swift */; }; 13 | 693642161E89AEF7008808C2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 693642141E89AEF7008808C2 /* Main.storyboard */; }; 14 | 693642181E89AEF7008808C2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 693642171E89AEF7008808C2 /* Assets.xcassets */; }; 15 | 6936421B1E89AEF7008808C2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 693642191E89AEF7008808C2 /* LaunchScreen.storyboard */; }; 16 | 693642291E89B7F6008808C2 /* Lato-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 693642261E89B7F6008808C2 /* Lato-Bold.ttf */; }; 17 | 6936422A1E89B7F6008808C2 /* Lato-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 693642271E89B7F6008808C2 /* Lato-Regular.ttf */; }; 18 | 6936422B1E89B7F6008808C2 /* Lato-Heavy.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 693642281E89B7F6008808C2 /* Lato-Heavy.ttf */; }; 19 | 693642311E89C708008808C2 /* CustomPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 693642301E89C708008808C2 /* CustomPage.swift */; }; 20 | 693642351E89CE6C008808C2 /* StoryboardExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 693642341E89CE6C008808C2 /* StoryboardExample.swift */; }; 21 | 6949C6041E89F63D0025E084 /* CustomPage.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6949C6031E89F63D0025E084 /* CustomPage.xib */; }; 22 | 6949C6061E8A36530025E084 /* CustomOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6949C6051E8A36530025E084 /* CustomOverlay.swift */; }; 23 | 6949C6081E8A39CB0025E084 /* CustomOverlay.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6949C6071E8A39CB0025E084 /* CustomOverlay.xib */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXFileReference section */ 27 | 5C26839D49C29CE3A5274154 /* Pods-SwiftyOnboardExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftyOnboardExample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample.debug.xcconfig"; sourceTree = ""; }; 28 | 6936420D1E89AEF7008808C2 /* SwiftyOnboardExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftyOnboardExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 29 | 693642101E89AEF7008808C2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 30 | 693642121E89AEF7008808C2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 31 | 693642151E89AEF7008808C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 32 | 693642171E89AEF7008808C2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 33 | 6936421A1E89AEF7008808C2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 34 | 6936421C1E89AEF7008808C2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 693642261E89B7F6008808C2 /* Lato-Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Lato-Bold.ttf"; sourceTree = ""; }; 36 | 693642271E89B7F6008808C2 /* Lato-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Lato-Regular.ttf"; sourceTree = ""; }; 37 | 693642281E89B7F6008808C2 /* Lato-Heavy.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Lato-Heavy.ttf"; sourceTree = ""; }; 38 | 693642301E89C708008808C2 /* CustomPage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomPage.swift; sourceTree = ""; }; 39 | 693642341E89CE6C008808C2 /* StoryboardExample.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StoryboardExample.swift; sourceTree = ""; }; 40 | 6949C6031E89F63D0025E084 /* CustomPage.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CustomPage.xib; sourceTree = ""; }; 41 | 6949C6051E8A36530025E084 /* CustomOverlay.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomOverlay.swift; sourceTree = ""; }; 42 | 6949C6071E8A39CB0025E084 /* CustomOverlay.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CustomOverlay.xib; sourceTree = ""; }; 43 | 89A2285DF22A15377EBDB6B3 /* Pods_SwiftyOnboardExample.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwiftyOnboardExample.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | F08F8182F55DC729E6747882 /* Pods-SwiftyOnboardExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftyOnboardExample.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample.release.xcconfig"; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 6936420A1E89AEF7008808C2 /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | 39BC0A64A53BA0DC4F6F720F /* Pods_SwiftyOnboardExample.framework in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | 27C50BD7EBB2925ED58FFBE6 /* Frameworks */ = { 60 | isa = PBXGroup; 61 | children = ( 62 | 89A2285DF22A15377EBDB6B3 /* Pods_SwiftyOnboardExample.framework */, 63 | ); 64 | name = Frameworks; 65 | sourceTree = ""; 66 | }; 67 | 35A1CB0BD46396429F7BBEA7 /* Pods */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | 5C26839D49C29CE3A5274154 /* Pods-SwiftyOnboardExample.debug.xcconfig */, 71 | F08F8182F55DC729E6747882 /* Pods-SwiftyOnboardExample.release.xcconfig */, 72 | ); 73 | name = Pods; 74 | sourceTree = ""; 75 | }; 76 | 693642041E89AEF7008808C2 = { 77 | isa = PBXGroup; 78 | children = ( 79 | 6936420F1E89AEF7008808C2 /* SwiftyOnboardExample */, 80 | 6936420E1E89AEF7008808C2 /* Products */, 81 | 35A1CB0BD46396429F7BBEA7 /* Pods */, 82 | 27C50BD7EBB2925ED58FFBE6 /* Frameworks */, 83 | ); 84 | sourceTree = ""; 85 | }; 86 | 6936420E1E89AEF7008808C2 /* Products */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 6936420D1E89AEF7008808C2 /* SwiftyOnboardExample.app */, 90 | ); 91 | name = Products; 92 | sourceTree = ""; 93 | }; 94 | 6936420F1E89AEF7008808C2 /* SwiftyOnboardExample */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 693642101E89AEF7008808C2 /* AppDelegate.swift */, 98 | 693642141E89AEF7008808C2 /* Main.storyboard */, 99 | 6949C60A1E8A3D4F0025E084 /* Without Storyboards */, 100 | 6949C6091E8A3D360025E084 /* With Storyboards */, 101 | 693642171E89AEF7008808C2 /* Assets.xcassets */, 102 | 693642191E89AEF7008808C2 /* LaunchScreen.storyboard */, 103 | 6936421C1E89AEF7008808C2 /* Info.plist */, 104 | 693642221E89B40E008808C2 /* Fonts */, 105 | ); 106 | path = SwiftyOnboardExample; 107 | sourceTree = ""; 108 | }; 109 | 693642221E89B40E008808C2 /* Fonts */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 693642261E89B7F6008808C2 /* Lato-Bold.ttf */, 113 | 693642271E89B7F6008808C2 /* Lato-Regular.ttf */, 114 | 693642281E89B7F6008808C2 /* Lato-Heavy.ttf */, 115 | ); 116 | name = Fonts; 117 | sourceTree = ""; 118 | }; 119 | 6949C6091E8A3D360025E084 /* With Storyboards */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 693642341E89CE6C008808C2 /* StoryboardExample.swift */, 123 | 6949C6031E89F63D0025E084 /* CustomPage.xib */, 124 | 693642301E89C708008808C2 /* CustomPage.swift */, 125 | 6949C6071E8A39CB0025E084 /* CustomOverlay.xib */, 126 | 6949C6051E8A36530025E084 /* CustomOverlay.swift */, 127 | ); 128 | name = "With Storyboards"; 129 | sourceTree = ""; 130 | }; 131 | 6949C60A1E8A3D4F0025E084 /* Without Storyboards */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 693642121E89AEF7008808C2 /* ViewController.swift */, 135 | ); 136 | name = "Without Storyboards"; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXNativeTarget section */ 142 | 6936420C1E89AEF7008808C2 /* SwiftyOnboardExample */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = 6936421F1E89AEF7008808C2 /* Build configuration list for PBXNativeTarget "SwiftyOnboardExample" */; 145 | buildPhases = ( 146 | 8B75ADA0ACE2FEEEA9577C19 /* [CP] Check Pods Manifest.lock */, 147 | 693642091E89AEF7008808C2 /* Sources */, 148 | 6936420A1E89AEF7008808C2 /* Frameworks */, 149 | 6936420B1E89AEF7008808C2 /* Resources */, 150 | 49BE0E29DA8DAAF41A7325F6 /* [CP] Embed Pods Frameworks */, 151 | 5926EFBEB1FC547BE733EF7A /* [CP] Copy Pods Resources */, 152 | ); 153 | buildRules = ( 154 | ); 155 | dependencies = ( 156 | ); 157 | name = SwiftyOnboardExample; 158 | productName = SwiftyOnboardExample; 159 | productReference = 6936420D1E89AEF7008808C2 /* SwiftyOnboardExample.app */; 160 | productType = "com.apple.product-type.application"; 161 | }; 162 | /* End PBXNativeTarget section */ 163 | 164 | /* Begin PBXProject section */ 165 | 693642051E89AEF7008808C2 /* Project object */ = { 166 | isa = PBXProject; 167 | attributes = { 168 | LastSwiftUpdateCheck = 0820; 169 | LastUpgradeCheck = 1010; 170 | ORGANIZATIONNAME = "Juan Pablo Fernandez"; 171 | TargetAttributes = { 172 | 6936420C1E89AEF7008808C2 = { 173 | CreatedOnToolsVersion = 8.2.1; 174 | LastSwiftMigration = 1010; 175 | ProvisioningStyle = Automatic; 176 | }; 177 | }; 178 | }; 179 | buildConfigurationList = 693642081E89AEF7008808C2 /* Build configuration list for PBXProject "SwiftyOnboardExample" */; 180 | compatibilityVersion = "Xcode 3.2"; 181 | developmentRegion = English; 182 | hasScannedForEncodings = 0; 183 | knownRegions = ( 184 | en, 185 | Base, 186 | ); 187 | mainGroup = 693642041E89AEF7008808C2; 188 | productRefGroup = 6936420E1E89AEF7008808C2 /* Products */; 189 | projectDirPath = ""; 190 | projectRoot = ""; 191 | targets = ( 192 | 6936420C1E89AEF7008808C2 /* SwiftyOnboardExample */, 193 | ); 194 | }; 195 | /* End PBXProject section */ 196 | 197 | /* Begin PBXResourcesBuildPhase section */ 198 | 6936420B1E89AEF7008808C2 /* Resources */ = { 199 | isa = PBXResourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 6936422B1E89B7F6008808C2 /* Lato-Heavy.ttf in Resources */, 203 | 6936421B1E89AEF7008808C2 /* LaunchScreen.storyboard in Resources */, 204 | 6949C6041E89F63D0025E084 /* CustomPage.xib in Resources */, 205 | 693642181E89AEF7008808C2 /* Assets.xcassets in Resources */, 206 | 6936422A1E89B7F6008808C2 /* Lato-Regular.ttf in Resources */, 207 | 693642161E89AEF7008808C2 /* Main.storyboard in Resources */, 208 | 693642291E89B7F6008808C2 /* Lato-Bold.ttf in Resources */, 209 | 6949C6081E8A39CB0025E084 /* CustomOverlay.xib in Resources */, 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | }; 213 | /* End PBXResourcesBuildPhase section */ 214 | 215 | /* Begin PBXShellScriptBuildPhase section */ 216 | 49BE0E29DA8DAAF41A7325F6 /* [CP] Embed Pods Frameworks */ = { 217 | isa = PBXShellScriptBuildPhase; 218 | buildActionMask = 2147483647; 219 | files = ( 220 | ); 221 | inputPaths = ( 222 | ); 223 | name = "[CP] Embed Pods Frameworks"; 224 | outputPaths = ( 225 | ); 226 | runOnlyForDeploymentPostprocessing = 0; 227 | shellPath = /bin/sh; 228 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample-frameworks.sh\"\n"; 229 | showEnvVarsInLog = 0; 230 | }; 231 | 5926EFBEB1FC547BE733EF7A /* [CP] Copy Pods Resources */ = { 232 | isa = PBXShellScriptBuildPhase; 233 | buildActionMask = 2147483647; 234 | files = ( 235 | ); 236 | inputPaths = ( 237 | ); 238 | name = "[CP] Copy Pods Resources"; 239 | outputPaths = ( 240 | ); 241 | runOnlyForDeploymentPostprocessing = 0; 242 | shellPath = /bin/sh; 243 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftyOnboardExample/Pods-SwiftyOnboardExample-resources.sh\"\n"; 244 | showEnvVarsInLog = 0; 245 | }; 246 | 8B75ADA0ACE2FEEEA9577C19 /* [CP] Check Pods Manifest.lock */ = { 247 | isa = PBXShellScriptBuildPhase; 248 | buildActionMask = 2147483647; 249 | files = ( 250 | ); 251 | inputPaths = ( 252 | ); 253 | name = "[CP] Check Pods Manifest.lock"; 254 | outputPaths = ( 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | shellPath = /bin/sh; 258 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 259 | showEnvVarsInLog = 0; 260 | }; 261 | /* End PBXShellScriptBuildPhase section */ 262 | 263 | /* Begin PBXSourcesBuildPhase section */ 264 | 693642091E89AEF7008808C2 /* Sources */ = { 265 | isa = PBXSourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | 6949C6061E8A36530025E084 /* CustomOverlay.swift in Sources */, 269 | 693642351E89CE6C008808C2 /* StoryboardExample.swift in Sources */, 270 | 693642131E89AEF7008808C2 /* ViewController.swift in Sources */, 271 | 693642111E89AEF7008808C2 /* AppDelegate.swift in Sources */, 272 | 693642311E89C708008808C2 /* CustomPage.swift in Sources */, 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | /* End PBXSourcesBuildPhase section */ 277 | 278 | /* Begin PBXVariantGroup section */ 279 | 693642141E89AEF7008808C2 /* Main.storyboard */ = { 280 | isa = PBXVariantGroup; 281 | children = ( 282 | 693642151E89AEF7008808C2 /* Base */, 283 | ); 284 | name = Main.storyboard; 285 | sourceTree = ""; 286 | }; 287 | 693642191E89AEF7008808C2 /* LaunchScreen.storyboard */ = { 288 | isa = PBXVariantGroup; 289 | children = ( 290 | 6936421A1E89AEF7008808C2 /* Base */, 291 | ); 292 | name = LaunchScreen.storyboard; 293 | sourceTree = ""; 294 | }; 295 | /* End PBXVariantGroup section */ 296 | 297 | /* Begin XCBuildConfiguration section */ 298 | 6936421D1E89AEF7008808C2 /* Debug */ = { 299 | isa = XCBuildConfiguration; 300 | buildSettings = { 301 | ALWAYS_SEARCH_USER_PATHS = NO; 302 | CLANG_ANALYZER_NONNULL = YES; 303 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 304 | CLANG_CXX_LIBRARY = "libc++"; 305 | CLANG_ENABLE_MODULES = YES; 306 | CLANG_ENABLE_OBJC_ARC = YES; 307 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 308 | CLANG_WARN_BOOL_CONVERSION = YES; 309 | CLANG_WARN_COMMA = YES; 310 | CLANG_WARN_CONSTANT_CONVERSION = YES; 311 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 312 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 313 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 314 | CLANG_WARN_EMPTY_BODY = YES; 315 | CLANG_WARN_ENUM_CONVERSION = YES; 316 | CLANG_WARN_INFINITE_RECURSION = YES; 317 | CLANG_WARN_INT_CONVERSION = YES; 318 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 319 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 320 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 321 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 322 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 323 | CLANG_WARN_STRICT_PROTOTYPES = YES; 324 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 325 | CLANG_WARN_UNREACHABLE_CODE = YES; 326 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 327 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 328 | COPY_PHASE_STRIP = NO; 329 | DEBUG_INFORMATION_FORMAT = dwarf; 330 | ENABLE_STRICT_OBJC_MSGSEND = YES; 331 | ENABLE_TESTABILITY = YES; 332 | GCC_C_LANGUAGE_STANDARD = gnu99; 333 | GCC_DYNAMIC_NO_PIC = NO; 334 | GCC_NO_COMMON_BLOCKS = YES; 335 | GCC_OPTIMIZATION_LEVEL = 0; 336 | GCC_PREPROCESSOR_DEFINITIONS = ( 337 | "DEBUG=1", 338 | "$(inherited)", 339 | ); 340 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 341 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 342 | GCC_WARN_UNDECLARED_SELECTOR = YES; 343 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 344 | GCC_WARN_UNUSED_FUNCTION = YES; 345 | GCC_WARN_UNUSED_VARIABLE = YES; 346 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 347 | MTL_ENABLE_DEBUG_INFO = YES; 348 | ONLY_ACTIVE_ARCH = YES; 349 | SDKROOT = iphoneos; 350 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 351 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 352 | TARGETED_DEVICE_FAMILY = "1,2"; 353 | }; 354 | name = Debug; 355 | }; 356 | 6936421E1E89AEF7008808C2 /* Release */ = { 357 | isa = XCBuildConfiguration; 358 | buildSettings = { 359 | ALWAYS_SEARCH_USER_PATHS = NO; 360 | CLANG_ANALYZER_NONNULL = YES; 361 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 362 | CLANG_CXX_LIBRARY = "libc++"; 363 | CLANG_ENABLE_MODULES = YES; 364 | CLANG_ENABLE_OBJC_ARC = YES; 365 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 366 | CLANG_WARN_BOOL_CONVERSION = YES; 367 | CLANG_WARN_COMMA = YES; 368 | CLANG_WARN_CONSTANT_CONVERSION = YES; 369 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 370 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 371 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 10.2; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 402 | TARGETED_DEVICE_FAMILY = "1,2"; 403 | VALIDATE_PRODUCT = YES; 404 | }; 405 | name = Release; 406 | }; 407 | 693642201E89AEF7008808C2 /* Debug */ = { 408 | isa = XCBuildConfiguration; 409 | baseConfigurationReference = 5C26839D49C29CE3A5274154 /* Pods-SwiftyOnboardExample.debug.xcconfig */; 410 | buildSettings = { 411 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 412 | DEVELOPMENT_TEAM = ""; 413 | INFOPLIST_FILE = SwiftyOnboardExample/Info.plist; 414 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 415 | PRODUCT_BUNDLE_IDENTIFIER = com.juanpablofernandez.SwiftyOnboardExample; 416 | PRODUCT_NAME = "$(TARGET_NAME)"; 417 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 418 | SWIFT_VERSION = 4.2; 419 | }; 420 | name = Debug; 421 | }; 422 | 693642211E89AEF7008808C2 /* Release */ = { 423 | isa = XCBuildConfiguration; 424 | baseConfigurationReference = F08F8182F55DC729E6747882 /* Pods-SwiftyOnboardExample.release.xcconfig */; 425 | buildSettings = { 426 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 427 | DEVELOPMENT_TEAM = ""; 428 | INFOPLIST_FILE = SwiftyOnboardExample/Info.plist; 429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 430 | PRODUCT_BUNDLE_IDENTIFIER = com.juanpablofernandez.SwiftyOnboardExample; 431 | PRODUCT_NAME = "$(TARGET_NAME)"; 432 | SWIFT_SWIFT3_OBJC_INFERENCE = On; 433 | SWIFT_VERSION = 4.2; 434 | }; 435 | name = Release; 436 | }; 437 | /* End XCBuildConfiguration section */ 438 | 439 | /* Begin XCConfigurationList section */ 440 | 693642081E89AEF7008808C2 /* Build configuration list for PBXProject "SwiftyOnboardExample" */ = { 441 | isa = XCConfigurationList; 442 | buildConfigurations = ( 443 | 6936421D1E89AEF7008808C2 /* Debug */, 444 | 6936421E1E89AEF7008808C2 /* Release */, 445 | ); 446 | defaultConfigurationIsVisible = 0; 447 | defaultConfigurationName = Release; 448 | }; 449 | 6936421F1E89AEF7008808C2 /* Build configuration list for PBXNativeTarget "SwiftyOnboardExample" */ = { 450 | isa = XCConfigurationList; 451 | buildConfigurations = ( 452 | 693642201E89AEF7008808C2 /* Debug */, 453 | 693642211E89AEF7008808C2 /* Release */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | /* End XCConfigurationList section */ 459 | }; 460 | rootObject = 693642051E89AEF7008808C2 /* Project object */; 461 | } 462 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SwiftyOnboardExample 4 | // 5 | // Created by Jay on 3/27/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. 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: [UIApplication.LaunchOptionsKey: Any]?) -> 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 invalidate graphics rendering callbacks. 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 active 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/SwiftyOnboardExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "confess0.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "confess0@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "confess0@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard0.imageset/confess0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/onboard0.imageset/confess0.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard0.imageset/confess0@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/onboard0.imageset/confess0@2x.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard0.imageset/confess0@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/onboard0.imageset/confess0@3x.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "confess1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "confess1@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "confess1@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard1.imageset/confess1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/onboard1.imageset/confess1.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard1.imageset/confess1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/onboard1.imageset/confess1@2x.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard1.imageset/confess1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/onboard1.imageset/confess1@3x.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "confess2.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "confess2@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "confess2@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard2.imageset/confess2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/onboard2.imageset/confess2.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard2.imageset/confess2@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/onboard2.imageset/confess2@2x.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/onboard2.imageset/confess2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/onboard2.imageset/confess2@3x.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/space0.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "plane_around_earth.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/space0.imageset/plane_around_earth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/space0.imageset/plane_around_earth.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/space1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "space.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/space1.imageset/space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/space1.imageset/space.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/space2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "newcomers.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Assets.xcassets/space2.imageset/newcomers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Assets.xcassets/space2.imageset/newcomers.png -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/CustomOverlay.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomOverlay.swift 3 | // SwiftyOnboardExample 4 | // 5 | // Created by Jay on 3/27/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftyOnboard 11 | 12 | class CustomOverlay: SwiftyOnboardOverlay { 13 | 14 | @IBOutlet weak var skip: UIButton! 15 | @IBOutlet weak var buttonContinue: UIButton! 16 | @IBOutlet weak var contentControl: UIPageControl! 17 | 18 | override func awakeFromNib() { 19 | super.awakeFromNib() 20 | 21 | buttonContinue.layer.borderColor = UIColor.white.cgColor 22 | buttonContinue.layer.borderWidth = 1 23 | buttonContinue.layer.cornerRadius = buttonContinue.bounds.height / 2 24 | } 25 | 26 | class func instanceFromNib() -> UIView { 27 | return UINib(nibName: "CustomOverlay", bundle: nil).instantiate(withOwner: nil, options: nil)[0] as! UIView 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/CustomOverlay.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | Lato-Bold 14 | 15 | 16 | Lato-Heavy 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/CustomPage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomPage.swift 3 | // SwiftyOnboardExample 4 | // 5 | // Created by Jay on 3/27/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftyOnboard 11 | 12 | class CustomPage: SwiftyOnboardPage { 13 | 14 | @IBOutlet weak var titleLabel: UILabel! 15 | @IBOutlet weak var image: UIImageView! 16 | @IBOutlet weak var subTitleLabel: UILabel! 17 | 18 | class func instanceFromNib() -> UIView { 19 | return UINib(nibName: "CustomPage", bundle: nil).instantiate(withOwner: nil, options: nil)[0] as! UIView 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/CustomPage.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | Lato-Bold 15 | 16 | 17 | Lato-Regular 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/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 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UIAppFonts 24 | 25 | Lato-Bold.ttf 26 | Lato-Regular.ttf 27 | Lato-Heavy.ttf 28 | 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UIRequiredDeviceCapabilities 34 | 35 | armv7 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | UIViewControllerBasedStatusBarAppearance 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Lato-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Lato-Bold.ttf -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Lato-Heavy.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Lato-Heavy.ttf -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/Example/SwiftyOnboardExample/Lato-Regular.ttf -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/StoryboardExample.swift: -------------------------------------------------------------------------------- 1 | // 2 | // StoryboardExampleViewController.swift 3 | // SwiftyOnboardExample 4 | // 5 | // Created by Jay on 3/27/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftyOnboard 11 | 12 | class StoryboardExampleViewController: UIViewController { 13 | 14 | @IBOutlet weak var swiftyOnboard: SwiftyOnboard! 15 | 16 | override func viewDidLoad() { 17 | super.viewDidLoad() 18 | swiftyOnboard.style = .light 19 | swiftyOnboard.delegate = self 20 | swiftyOnboard.dataSource = self 21 | swiftyOnboard.backgroundColor = UIColor(red: 46/256, green: 46/256, blue: 76/256, alpha: 1) 22 | } 23 | 24 | @objc func handleSkip() { 25 | swiftyOnboard?.goToPage(index: 2, animated: true) 26 | } 27 | 28 | @objc func handleContinue(sender: UIButton) { 29 | let index = sender.tag 30 | swiftyOnboard?.goToPage(index: index + 1, animated: true) 31 | } 32 | } 33 | 34 | extension StoryboardExampleViewController: SwiftyOnboardDelegate, SwiftyOnboardDataSource { 35 | 36 | func swiftyOnboardNumberOfPages(_ swiftyOnboard: SwiftyOnboard) -> Int { 37 | return 3 38 | } 39 | 40 | func swiftyOnboardPageForIndex(_ swiftyOnboard: SwiftyOnboard, index: Int) -> SwiftyOnboardPage? { 41 | let view = CustomPage.instanceFromNib() as? CustomPage 42 | view?.image.image = UIImage(named: "space\(index).png") 43 | if index == 0 { 44 | //On the first page, change the text in the labels to say the following: 45 | view?.titleLabel.text = "Planet earth is extraordinary" 46 | view?.subTitleLabel.text = "Earth, otherwise known as the World, is the third planet from the Sun." 47 | } else if index == 1 { 48 | //On the second page, change the text in the labels to say the following: 49 | view?.titleLabel.text = "The mystery of\n outer space" 50 | view?.subTitleLabel.text = "Outer space or just space, is the void that exists between celestial bodies, including Earth." 51 | } else { 52 | //On the thrid page, change the text in the labels to say the following: 53 | view?.titleLabel.text = "Extraterrestrial\n life" 54 | view?.subTitleLabel.text = "Extraterrestrial life, also called alien life, is life that does not originate from Earth." 55 | } 56 | return view 57 | } 58 | 59 | func swiftyOnboardViewForOverlay(_ swiftyOnboard: SwiftyOnboard) -> SwiftyOnboardOverlay? { 60 | let overlay = CustomOverlay.instanceFromNib() as? CustomOverlay 61 | overlay?.skip.addTarget(self, action: #selector(handleSkip), for: .touchUpInside) 62 | overlay?.buttonContinue.addTarget(self, action: #selector(handleContinue), for: .touchUpInside) 63 | return overlay 64 | } 65 | 66 | func swiftyOnboardOverlayForPosition(_ swiftyOnboard: SwiftyOnboard, overlay: SwiftyOnboardOverlay, for position: Double) { 67 | let overlay = overlay as! CustomOverlay 68 | let currentPage = round(position) 69 | overlay.pageControl.currentPage = Int(currentPage) 70 | overlay.buttonContinue.tag = Int(position) 71 | if currentPage == 0.0 || currentPage == 1.0 { 72 | overlay.buttonContinue.setTitle("Continue", for: .normal) 73 | overlay.skip.setTitle("Skip", for: .normal) 74 | overlay.skip.isHidden = false 75 | } else { 76 | overlay.buttonContinue.setTitle("Get Started!", for: .normal) 77 | overlay.skip.isHidden = true 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /Example/SwiftyOnboardExample/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwiftyOnboardExample 4 | // 5 | // Created by Jay on 3/27/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import SwiftyOnboard 11 | 12 | class ViewController: UIViewController { 13 | 14 | var swiftyOnboard: SwiftyOnboard! 15 | let colors:[UIColor] = [#colorLiteral(red: 0.9980840087, green: 0.3723873496, blue: 0.4952875376, alpha: 1),#colorLiteral(red: 0.2666860223, green: 0.5116362572, blue: 1, alpha: 1),#colorLiteral(red: 0.1019607857, green: 0.2784313858, blue: 0.400000006, alpha: 1)] 16 | var titleArray: [String] = ["Welcome to Confess!", "It’s completely anonymous", "Say something positive"] 17 | var subTitleArray: [String] = ["Confess lets you anonymously\n send confessions to your friends\n and receive confessions from them.", "All confessions sent are\n anonymous. Your friends will only\n know that it came from one of\n their facebook friends.", "Be nice to your friends.\n Send them confessions that\n will make them smile :)"] 18 | 19 | var gradiant: CAGradientLayer = { 20 | //Gradiant for the background view 21 | let blue = UIColor(red: 69/255, green: 127/255, blue: 202/255, alpha: 1.0).cgColor 22 | let purple = UIColor(red: 166/255, green: 172/255, blue: 236/255, alpha: 1.0).cgColor 23 | let gradiant = CAGradientLayer() 24 | gradiant.colors = [purple, blue] 25 | gradiant.startPoint = CGPoint(x: 0.5, y: 0.18) 26 | return gradiant 27 | }() 28 | 29 | override func viewDidLoad() { 30 | super.viewDidLoad() 31 | gradient() 32 | 33 | swiftyOnboard = SwiftyOnboard(frame: view.frame, style: .light) 34 | view.addSubview(swiftyOnboard) 35 | swiftyOnboard.dataSource = self 36 | swiftyOnboard.delegate = self 37 | } 38 | 39 | override var preferredStatusBarStyle: UIStatusBarStyle { 40 | return .lightContent 41 | } 42 | 43 | func gradient() { 44 | //Add the gradiant to the view: 45 | self.gradiant.frame = view.bounds 46 | view.layer.addSublayer(gradiant) 47 | } 48 | 49 | @objc func handleSkip() { 50 | swiftyOnboard?.goToPage(index: 2, animated: true) 51 | } 52 | 53 | @objc func handleContinue(sender: UIButton) { 54 | let index = sender.tag 55 | swiftyOnboard?.goToPage(index: index + 1, animated: true) 56 | } 57 | } 58 | 59 | extension ViewController: SwiftyOnboardDelegate, SwiftyOnboardDataSource { 60 | 61 | func swiftyOnboardNumberOfPages(_ swiftyOnboard: SwiftyOnboard) -> Int { 62 | //Number of pages in the onboarding: 63 | return 3 64 | } 65 | 66 | func swiftyOnboardBackgroundColorFor(_ swiftyOnboard: SwiftyOnboard, atIndex index: Int) -> UIColor? { 67 | //Return the background color for the page at index: 68 | return colors[index] 69 | } 70 | 71 | func swiftyOnboardPageForIndex(_ swiftyOnboard: SwiftyOnboard, index: Int) -> SwiftyOnboardPage? { 72 | let view = SwiftyOnboardPage() 73 | 74 | //Set the image on the page: 75 | view.imageView.image = UIImage(named: "onboard\(index)") 76 | 77 | //Set the font and color for the labels: 78 | view.title.font = UIFont(name: "Lato-Heavy", size: 22) 79 | view.subTitle.font = UIFont(name: "Lato-Regular", size: 16) 80 | 81 | //Set the text in the page: 82 | view.title.text = titleArray[index] 83 | view.subTitle.text = subTitleArray[index] 84 | 85 | //Return the page for the given index: 86 | return view 87 | } 88 | 89 | func swiftyOnboardViewForOverlay(_ swiftyOnboard: SwiftyOnboard) -> SwiftyOnboardOverlay? { 90 | let overlay = SwiftyOnboardOverlay() 91 | 92 | //Setup targets for the buttons on the overlay view: 93 | overlay.skipButton.addTarget(self, action: #selector(handleSkip), for: .touchUpInside) 94 | overlay.continueButton.addTarget(self, action: #selector(handleContinue), for: .touchUpInside) 95 | 96 | //Setup for the overlay buttons: 97 | overlay.continueButton.titleLabel?.font = UIFont(name: "Lato-Bold", size: 16) 98 | overlay.continueButton.setTitleColor(UIColor.white, for: .normal) 99 | overlay.skipButton.setTitleColor(UIColor.white, for: .normal) 100 | overlay.skipButton.titleLabel?.font = UIFont(name: "Lato-Heavy", size: 16) 101 | 102 | //Return the overlay view: 103 | return overlay 104 | } 105 | 106 | func swiftyOnboardOverlayForPosition(_ swiftyOnboard: SwiftyOnboard, overlay: SwiftyOnboardOverlay, for position: Double) { 107 | let currentPage = round(position) 108 | overlay.pageControl.currentPage = Int(currentPage) 109 | print(Int(currentPage)) 110 | overlay.continueButton.tag = Int(position) 111 | 112 | if currentPage == 0.0 || currentPage == 1.0 { 113 | overlay.continueButton.setTitle("Continue", for: .normal) 114 | overlay.skipButton.setTitle("Skip", for: .normal) 115 | overlay.skipButton.isHidden = false 116 | } else { 117 | overlay.continueButton.setTitle("Get Started!", for: .normal) 118 | overlay.skipButton.isHidden = true 119 | } 120 | } 121 | } 122 | 123 | 124 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Juan Pablo Fernandez 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SwiftyOnboard 2 | > A simple iOS framework that allows developers to create onboarding experiences. 3 | 4 | [![Swift Version][swift-image]][swift-url] 5 | [![Build Status][travis-image]][travis-url] 6 | [![License][license-image]][license-url] 7 | [![CocoaPods](https://img.shields.io/cocoapods/v/SwiftyOnboard.svg)](https://cocoapods.org/pods/SwiftyOnboard) 8 | [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) 9 | [![Platform](https://img.shields.io/cocoapods/p/LFAlertController.svg?style=flat)](http://cocoapods.org/pods/LFAlertController) 10 | 11 | SwiftyOnboard makes it easy to add onboarding to any iOS application. SwiftyOnboard handles all of the logic behind the pagination of views, which allows you to quickly add a highly customizable onboarding to your app, all in a lightweight framework. 12 | 13 | ![](screenshots/onboard1.gif) 14 | ![](screenshots/onboard2.gif) 15 | 16 | ## Contents 17 | 18 | * [Requirements](#requirements) 19 | * [Installation](#installation) 20 | * [CocoaPods](#cocoapods) 21 | * [Manually](#manually) 22 | * [Usage](#usage) 23 | * [Properties](#properties) 24 | * [Methods](#methods) 25 | * [Protocols](#protocols) 26 | * [DataSource](#swiftyonboarddatasource) 27 | * [Delegate](#swiftyonboarddelegate) 28 | * [Notes](#notes) 29 | * [Contribute](#contribute) 30 | * [License](#license) 31 | 32 | ## Requirements 33 | 34 | - iOS 12.0+ 35 | - Xcode 10.3+ 36 | 37 | ## Installation 38 | 39 | #### CocoaPods 40 | You can use [CocoaPods](http://cocoapods.org/) to install `SwiftyOnboard` by adding this to your `Podfile`: 41 | 42 | ```ruby 43 | use_frameworks! 44 | pod 'SwiftyOnboard' 45 | ``` 46 | If you get the ``Unable to find a specification for `SwiftyOnboard`.`` error after running `pod install`. 47 | 48 | Run the following commands on your project directory: 49 | ``` 50 | pod repo update 51 | ``` 52 | ``` 53 | pod install 54 | ``` 55 | #### Carthage 56 | To install via Carthage add this to your Cartfile: 57 | ```ruby 58 | github "juanpablofernandez/SwiftyOnboard" 59 | ``` 60 | #### Manually 61 | 1. Drag and drop ```SwiftyOnboard.swift``` ```SwiftyOnboardOverlay.swift``` ```SwiftyOnboardPage.swift``` in your project. 62 | 2. That's it! 63 | 64 | ## Usage 65 | 1. Import `SwiftyOnboard` module to your `ViewController` class 66 | ```swift 67 | import SwiftyOnboard 68 | ``` 69 | 2. Add `SwiftyOnboard` to `ViewController`, then set dataSource and delegate for it 70 | ```swift 71 | class ViewController: UIViewController { 72 | override func viewDidLoad() { 73 | super.viewDidLoad() 74 | 75 | let swiftyOnboard = SwiftyOnboard(frame: view.frame) 76 | view.addSubview(swiftyOnboard) 77 | swiftyOnboard.dataSource = self 78 | } 79 | } 80 | ``` 81 | 3. Conform your `ViewController` to `SwiftyOnboardDataSource` protocol and implement all the methods, e.g. 82 | ```swift 83 | extension ViewController: SwiftyOnboardDataSource { 84 | 85 | func swiftyOnboardNumberOfPages(swiftyOnboard: SwiftyOnboard) -> Int { 86 | return 3 87 | } 88 | 89 | func swiftyOnboardPageForIndex(swiftyOnboard: SwiftyOnboard, index: Int) -> SwiftyOnboardPage? { 90 | let page = SwiftyOnboardPage() 91 | return page 92 | } 93 | } 94 | ``` 95 | 4. `SwiftyOnboard` works with default implementation. Override it to customize its behavior 96 | 97 | 98 | 99 | ### Properties 100 | 101 | SwiftyOnboard has the following properties: 102 | ```swift 103 | public var dataSource: SwiftyOnboardDataSource? 104 | ``` 105 | An object that supports the SwiftyOnboardDataSource protocol and can provide views to populate the SwiftyOnboard. 106 | ```swift 107 | public var delegate: SwiftyOnboardDelegate? 108 | ``` 109 | An object that supports the SwiftyOnboardDelegate protocol and can respond to SwiftyOnboard events. 110 | ```swift 111 | public var shouldSwipe: Bool 112 | ``` 113 | Whether or not swiping is enabled [default = true]. 114 | ```swift 115 | public var fadePages: Bool 116 | ``` 117 | Whether or not pages will fade upon transition [default = true]. 118 | 119 | ### Methods 120 | 121 | SwiftyOnboard class has the following methods: 122 | ```swift 123 | func goToPage(index: Int, animated: Bool) 124 | ``` 125 | This method allows you to move to a certain page in the onboarding. 126 | 127 | ### Protocols 128 | 129 | The SwiftyOnboard follows the Apple convention for data-driven views by providing two protocol interfaces, SwiftyOnboardDataSource and SwiftyOnboardDelegate. 130 | #### SwiftyOnboardDataSource 131 | SwiftyOnboardDataSource protocol has the following methods: 132 | ```swift 133 | func swiftyOnboardNumberOfPages(swiftyOnboard: SwiftyOnboard) -> Int 134 | ``` 135 | Return the number of items (pages) in the onboarding. 136 | ```swift 137 | func swiftyOnboardViewForBackground(swiftyOnboard: SwiftyOnboard) -> UIView? 138 | ``` 139 | Return a view to be displayed as the background of the onboarding. 140 | ```swift 141 | func swiftyOnboardPageForIndex(swiftyOnboard: SwiftyOnboard, index: Int) -> SwiftyOnboardPage? 142 | ``` 143 | Return a view (page) to be displayed at the specified index in the onboarding. 144 | ```swift 145 | func swiftyOnboardViewForOverlay(swiftyOnboard: SwiftyOnboard) -> SwiftyOnboardOverlay? 146 | ``` 147 | Return an overlay (view) to be displayed on top of the onboarding pages. e.g. [The continue and skip buttons which don't move with the pages, also included is the page control] 148 | ```swift 149 | func swiftyOnboardOverlayForPosition(swiftyOnboard: SwiftyOnboard, overlay: SwiftyOnboardOverlay, for position: Double) 150 | ``` 151 | Edit the overlay (view) for the desired position. e.g. [Change the "continue button" text to "Done", when the last page is reached] 152 | ```swift 153 | func swiftyOnboardBackgroundColorFor(_ swiftyOnboard: SwiftyOnboard, atIndex index: Int) -> UIColor? 154 | ``` 155 | Set the background color for the page at the given index. (Very useful when you have pages with different background colors) 156 | 157 | #### SwiftyOnboardDelegate 158 | SwiftyOnboardDelegate protocol has the following methods: 159 | ```swift 160 | func swiftyOnboard(swiftyOnboard: SwiftyOnboard, currentPage index: Int) 161 | ``` 162 | This method is called whenever a page is shown, it holds the index to that page. It is called regardless of whether the page was swiped programmatically or through user interaction. 163 | ```swift 164 | func swiftyOnboard(swiftyOnboard: SwiftyOnboard, leftEdge position: Double) 165 | ``` 166 | This method is called whenever the pages are scrolling, it holds the current distance between the left side of the screen and the left side of the first page. 167 | ```swift 168 | func swiftyOnboard(swiftyOnboard: SwiftyOnboard, tapped index: Int) 169 | ``` 170 | This method is called whenever a page is tapped by the user, it holds the index of the tapped page. 171 | 172 | ## Notes 173 | * Landscape mode is not supported 174 | 175 | ## Contribute 176 | Contributions are welcomed! There are however certain guidelines you must follow when you contribute: 177 | * Have descriptive commit messages. 178 | * Make a pull request for every feature (Don't make a pull request that adds 3 new features. Make an individual pull request for each of those features, with a descriptive message). 179 | * Don't update the example project, or any other irrelevant files. 180 | 181 | I want to see your amazing onboarding. Take screenshots and/or record a gif and send it my way! 182 | 183 | ## License 184 | 185 | Distributed under the MIT license. See ``LICENSE`` for more information. 186 | 187 | [swift-image]:https://img.shields.io/badge/swift-5.0-orange.svg 188 | [swift-url]: https://swift.org/ 189 | [license-image]: https://img.shields.io/badge/License-MIT-blue.svg 190 | [license-url]: LICENSE 191 | [travis-image]: https://img.shields.io/travis/dbader/node-datadog-metrics/master.svg?style=flat-square 192 | [travis-url]: https://travis-ci.org/dbader/node-datadog-metrics 193 | [codebeat-image]: https://codebeat.co/badges/c19b47ea-2f9d-45df-8458-b2d952fe9dad 194 | [codebeat-url]: https://codebeat.co/projects/github-com-vsouza-awesomeios-com 195 | -------------------------------------------------------------------------------- /SwiftyOnboard.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = "SwiftyOnboard" 4 | s.version = "1.4.0" 5 | s.summary = "A framework that allows developers to create onboarding experiences." 6 | s.description = <<-DESC 7 | SwiftyOnboard makes it easy to add onboarding to any iOS application. SwiftyOnboard handles all of the logic behind the pagination of views, which allows you to quickly add a highly customizable onboarding to your app, all in a lightweight framework. 8 | DESC 9 | s.homepage = "https://github.com/juanpablofernandez/SwiftyOnboard" 10 | s.license = { :type => 'MIT', :file => 'LICENSE' } 11 | s.author = "Juan Pablo Fernandez" 12 | s.social_media_url = "https://github.com/juanpablofernandez" 13 | s.ios.deployment_target = '12.0' 14 | s.swift_version = '5.0' 15 | s.source = { :git => "https://github.com/juanpablofernandez/SwiftyOnboard.git", :tag => "#{s.version}" } 16 | s.source_files = "SwiftyOnboard", "SwiftyOnboard/**/*.{swift}" 17 | 18 | end 19 | -------------------------------------------------------------------------------- /SwiftyOnboard.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 69A62A051E885750009788A2 /* SwiftyOnboard.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 69A629FB1E885750009788A2 /* SwiftyOnboard.framework */; }; 11 | 69A62A0A1E885750009788A2 /* SwiftyOnboardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69A62A091E885750009788A2 /* SwiftyOnboardTests.swift */; }; 12 | 69A62A0C1E885750009788A2 /* SwiftyOnboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 69A629FE1E885750009788A2 /* SwiftyOnboard.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 69A62A181E885760009788A2 /* SwiftyOnboardOverlay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69A62A151E885760009788A2 /* SwiftyOnboardOverlay.swift */; }; 14 | 69A62A191E885760009788A2 /* SwiftyOnboardPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69A62A161E885760009788A2 /* SwiftyOnboardPage.swift */; }; 15 | 69A62A1A1E885760009788A2 /* SwiftyOnboard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 69A62A171E885760009788A2 /* SwiftyOnboard.swift */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXContainerItemProxy section */ 19 | 69A62A061E885750009788A2 /* PBXContainerItemProxy */ = { 20 | isa = PBXContainerItemProxy; 21 | containerPortal = 69A629F21E885750009788A2 /* Project object */; 22 | proxyType = 1; 23 | remoteGlobalIDString = 69A629FA1E885750009788A2; 24 | remoteInfo = SwiftyOnboard; 25 | }; 26 | /* End PBXContainerItemProxy section */ 27 | 28 | /* Begin PBXFileReference section */ 29 | 69A629FB1E885750009788A2 /* SwiftyOnboard.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyOnboard.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 30 | 69A629FE1E885750009788A2 /* SwiftyOnboard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftyOnboard.h; sourceTree = ""; }; 31 | 69A629FF1E885750009788A2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 32 | 69A62A041E885750009788A2 /* SwiftyOnboardTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SwiftyOnboardTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 69A62A091E885750009788A2 /* SwiftyOnboardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftyOnboardTests.swift; sourceTree = ""; }; 34 | 69A62A0B1E885750009788A2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 69A62A151E885760009788A2 /* SwiftyOnboardOverlay.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyOnboardOverlay.swift; sourceTree = ""; }; 36 | 69A62A161E885760009788A2 /* SwiftyOnboardPage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyOnboardPage.swift; sourceTree = ""; }; 37 | 69A62A171E885760009788A2 /* SwiftyOnboard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyOnboard.swift; sourceTree = ""; }; 38 | /* End PBXFileReference section */ 39 | 40 | /* Begin PBXFrameworksBuildPhase section */ 41 | 69A629F71E885750009788A2 /* Frameworks */ = { 42 | isa = PBXFrameworksBuildPhase; 43 | buildActionMask = 2147483647; 44 | files = ( 45 | ); 46 | runOnlyForDeploymentPostprocessing = 0; 47 | }; 48 | 69A62A011E885750009788A2 /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | 69A62A051E885750009788A2 /* SwiftyOnboard.framework in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | /* End PBXFrameworksBuildPhase section */ 57 | 58 | /* Begin PBXGroup section */ 59 | 69A629F11E885750009788A2 = { 60 | isa = PBXGroup; 61 | children = ( 62 | 69A629FD1E885750009788A2 /* SwiftyOnboard */, 63 | 69A62A081E885750009788A2 /* SwiftyOnboardTests */, 64 | 69A629FC1E885750009788A2 /* Products */, 65 | ); 66 | sourceTree = ""; 67 | }; 68 | 69A629FC1E885750009788A2 /* Products */ = { 69 | isa = PBXGroup; 70 | children = ( 71 | 69A629FB1E885750009788A2 /* SwiftyOnboard.framework */, 72 | 69A62A041E885750009788A2 /* SwiftyOnboardTests.xctest */, 73 | ); 74 | name = Products; 75 | sourceTree = ""; 76 | }; 77 | 69A629FD1E885750009788A2 /* SwiftyOnboard */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 69A629FE1E885750009788A2 /* SwiftyOnboard.h */, 81 | 69A62A151E885760009788A2 /* SwiftyOnboardOverlay.swift */, 82 | 69A62A161E885760009788A2 /* SwiftyOnboardPage.swift */, 83 | 69A62A171E885760009788A2 /* SwiftyOnboard.swift */, 84 | 69A629FF1E885750009788A2 /* Info.plist */, 85 | ); 86 | path = SwiftyOnboard; 87 | sourceTree = ""; 88 | }; 89 | 69A62A081E885750009788A2 /* SwiftyOnboardTests */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 69A62A091E885750009788A2 /* SwiftyOnboardTests.swift */, 93 | 69A62A0B1E885750009788A2 /* Info.plist */, 94 | ); 95 | path = SwiftyOnboardTests; 96 | sourceTree = ""; 97 | }; 98 | /* End PBXGroup section */ 99 | 100 | /* Begin PBXHeadersBuildPhase section */ 101 | 69A629F81E885750009788A2 /* Headers */ = { 102 | isa = PBXHeadersBuildPhase; 103 | buildActionMask = 2147483647; 104 | files = ( 105 | 69A62A0C1E885750009788A2 /* SwiftyOnboard.h in Headers */, 106 | ); 107 | runOnlyForDeploymentPostprocessing = 0; 108 | }; 109 | /* End PBXHeadersBuildPhase section */ 110 | 111 | /* Begin PBXNativeTarget section */ 112 | 69A629FA1E885750009788A2 /* SwiftyOnboard */ = { 113 | isa = PBXNativeTarget; 114 | buildConfigurationList = 69A62A0F1E885750009788A2 /* Build configuration list for PBXNativeTarget "SwiftyOnboard" */; 115 | buildPhases = ( 116 | 69A629F61E885750009788A2 /* Sources */, 117 | 69A629F71E885750009788A2 /* Frameworks */, 118 | 69A629F81E885750009788A2 /* Headers */, 119 | 69A629F91E885750009788A2 /* Resources */, 120 | ); 121 | buildRules = ( 122 | ); 123 | dependencies = ( 124 | ); 125 | name = SwiftyOnboard; 126 | productName = SwiftyOnboard; 127 | productReference = 69A629FB1E885750009788A2 /* SwiftyOnboard.framework */; 128 | productType = "com.apple.product-type.framework"; 129 | }; 130 | 69A62A031E885750009788A2 /* SwiftyOnboardTests */ = { 131 | isa = PBXNativeTarget; 132 | buildConfigurationList = 69A62A121E885750009788A2 /* Build configuration list for PBXNativeTarget "SwiftyOnboardTests" */; 133 | buildPhases = ( 134 | 69A62A001E885750009788A2 /* Sources */, 135 | 69A62A011E885750009788A2 /* Frameworks */, 136 | 69A62A021E885750009788A2 /* Resources */, 137 | ); 138 | buildRules = ( 139 | ); 140 | dependencies = ( 141 | 69A62A071E885750009788A2 /* PBXTargetDependency */, 142 | ); 143 | name = SwiftyOnboardTests; 144 | productName = SwiftyOnboardTests; 145 | productReference = 69A62A041E885750009788A2 /* SwiftyOnboardTests.xctest */; 146 | productType = "com.apple.product-type.bundle.unit-test"; 147 | }; 148 | /* End PBXNativeTarget section */ 149 | 150 | /* Begin PBXProject section */ 151 | 69A629F21E885750009788A2 /* Project object */ = { 152 | isa = PBXProject; 153 | attributes = { 154 | LastSwiftUpdateCheck = 0820; 155 | LastUpgradeCheck = 1250; 156 | ORGANIZATIONNAME = "Juan Pablo Fernandez"; 157 | TargetAttributes = { 158 | 69A629FA1E885750009788A2 = { 159 | CreatedOnToolsVersion = 8.2.1; 160 | LastSwiftMigration = 1110; 161 | ProvisioningStyle = Automatic; 162 | }; 163 | 69A62A031E885750009788A2 = { 164 | CreatedOnToolsVersion = 8.2.1; 165 | DevelopmentTeam = V92SZ8966T; 166 | LastSwiftMigration = 1110; 167 | ProvisioningStyle = Automatic; 168 | }; 169 | }; 170 | }; 171 | buildConfigurationList = 69A629F51E885750009788A2 /* Build configuration list for PBXProject "SwiftyOnboard" */; 172 | compatibilityVersion = "Xcode 3.2"; 173 | developmentRegion = en; 174 | hasScannedForEncodings = 0; 175 | knownRegions = ( 176 | en, 177 | Base, 178 | ); 179 | mainGroup = 69A629F11E885750009788A2; 180 | productRefGroup = 69A629FC1E885750009788A2 /* Products */; 181 | projectDirPath = ""; 182 | projectRoot = ""; 183 | targets = ( 184 | 69A629FA1E885750009788A2 /* SwiftyOnboard */, 185 | 69A62A031E885750009788A2 /* SwiftyOnboardTests */, 186 | ); 187 | }; 188 | /* End PBXProject section */ 189 | 190 | /* Begin PBXResourcesBuildPhase section */ 191 | 69A629F91E885750009788A2 /* Resources */ = { 192 | isa = PBXResourcesBuildPhase; 193 | buildActionMask = 2147483647; 194 | files = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | 69A62A021E885750009788A2 /* Resources */ = { 199 | isa = PBXResourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | ); 203 | runOnlyForDeploymentPostprocessing = 0; 204 | }; 205 | /* End PBXResourcesBuildPhase section */ 206 | 207 | /* Begin PBXSourcesBuildPhase section */ 208 | 69A629F61E885750009788A2 /* Sources */ = { 209 | isa = PBXSourcesBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | 69A62A1A1E885760009788A2 /* SwiftyOnboard.swift in Sources */, 213 | 69A62A191E885760009788A2 /* SwiftyOnboardPage.swift in Sources */, 214 | 69A62A181E885760009788A2 /* SwiftyOnboardOverlay.swift in Sources */, 215 | ); 216 | runOnlyForDeploymentPostprocessing = 0; 217 | }; 218 | 69A62A001E885750009788A2 /* Sources */ = { 219 | isa = PBXSourcesBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | 69A62A0A1E885750009788A2 /* SwiftyOnboardTests.swift in Sources */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | /* End PBXSourcesBuildPhase section */ 227 | 228 | /* Begin PBXTargetDependency section */ 229 | 69A62A071E885750009788A2 /* PBXTargetDependency */ = { 230 | isa = PBXTargetDependency; 231 | target = 69A629FA1E885750009788A2 /* SwiftyOnboard */; 232 | targetProxy = 69A62A061E885750009788A2 /* PBXContainerItemProxy */; 233 | }; 234 | /* End PBXTargetDependency section */ 235 | 236 | /* Begin XCBuildConfiguration section */ 237 | 69A62A0D1E885750009788A2 /* Debug */ = { 238 | isa = XCBuildConfiguration; 239 | buildSettings = { 240 | ALWAYS_SEARCH_USER_PATHS = NO; 241 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 242 | CLANG_ANALYZER_NONNULL = YES; 243 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 244 | CLANG_CXX_LIBRARY = "libc++"; 245 | CLANG_ENABLE_MODULES = YES; 246 | CLANG_ENABLE_OBJC_ARC = YES; 247 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 248 | CLANG_WARN_BOOL_CONVERSION = YES; 249 | CLANG_WARN_COMMA = YES; 250 | CLANG_WARN_CONSTANT_CONVERSION = YES; 251 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 252 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 253 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 254 | CLANG_WARN_EMPTY_BODY = YES; 255 | CLANG_WARN_ENUM_CONVERSION = YES; 256 | CLANG_WARN_INFINITE_RECURSION = YES; 257 | CLANG_WARN_INT_CONVERSION = YES; 258 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 259 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 260 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 261 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 262 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 263 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 264 | CLANG_WARN_STRICT_PROTOTYPES = YES; 265 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 266 | CLANG_WARN_UNREACHABLE_CODE = YES; 267 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 268 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 269 | COPY_PHASE_STRIP = NO; 270 | CURRENT_PROJECT_VERSION = 1; 271 | DEBUG_INFORMATION_FORMAT = dwarf; 272 | ENABLE_STRICT_OBJC_MSGSEND = YES; 273 | ENABLE_TESTABILITY = YES; 274 | GCC_C_LANGUAGE_STANDARD = gnu99; 275 | GCC_DYNAMIC_NO_PIC = NO; 276 | GCC_NO_COMMON_BLOCKS = YES; 277 | GCC_OPTIMIZATION_LEVEL = 0; 278 | GCC_PREPROCESSOR_DEFINITIONS = ( 279 | "DEBUG=1", 280 | "$(inherited)", 281 | ); 282 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 283 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 284 | GCC_WARN_UNDECLARED_SELECTOR = YES; 285 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 286 | GCC_WARN_UNUSED_FUNCTION = YES; 287 | GCC_WARN_UNUSED_VARIABLE = YES; 288 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 289 | MTL_ENABLE_DEBUG_INFO = YES; 290 | ONLY_ACTIVE_ARCH = YES; 291 | SDKROOT = iphoneos; 292 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 293 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 294 | TARGETED_DEVICE_FAMILY = "1,2"; 295 | VERSIONING_SYSTEM = "apple-generic"; 296 | VERSION_INFO_PREFIX = ""; 297 | }; 298 | name = Debug; 299 | }; 300 | 69A62A0E1E885750009788A2 /* Release */ = { 301 | isa = XCBuildConfiguration; 302 | buildSettings = { 303 | ALWAYS_SEARCH_USER_PATHS = NO; 304 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 305 | CLANG_ANALYZER_NONNULL = YES; 306 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 307 | CLANG_CXX_LIBRARY = "libc++"; 308 | CLANG_ENABLE_MODULES = YES; 309 | CLANG_ENABLE_OBJC_ARC = YES; 310 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 311 | CLANG_WARN_BOOL_CONVERSION = YES; 312 | CLANG_WARN_COMMA = YES; 313 | CLANG_WARN_CONSTANT_CONVERSION = YES; 314 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 315 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 316 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 326 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 327 | CLANG_WARN_STRICT_PROTOTYPES = YES; 328 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 329 | CLANG_WARN_UNREACHABLE_CODE = YES; 330 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 331 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 332 | COPY_PHASE_STRIP = NO; 333 | CURRENT_PROJECT_VERSION = 1; 334 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 335 | ENABLE_NS_ASSERTIONS = NO; 336 | ENABLE_STRICT_OBJC_MSGSEND = YES; 337 | GCC_C_LANGUAGE_STANDARD = gnu99; 338 | GCC_NO_COMMON_BLOCKS = YES; 339 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 340 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 341 | GCC_WARN_UNDECLARED_SELECTOR = YES; 342 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 343 | GCC_WARN_UNUSED_FUNCTION = YES; 344 | GCC_WARN_UNUSED_VARIABLE = YES; 345 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 346 | MTL_ENABLE_DEBUG_INFO = NO; 347 | SDKROOT = iphoneos; 348 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 349 | TARGETED_DEVICE_FAMILY = "1,2"; 350 | VALIDATE_PRODUCT = YES; 351 | VERSIONING_SYSTEM = "apple-generic"; 352 | VERSION_INFO_PREFIX = ""; 353 | }; 354 | name = Release; 355 | }; 356 | 69A62A101E885750009788A2 /* Debug */ = { 357 | isa = XCBuildConfiguration; 358 | buildSettings = { 359 | CLANG_ENABLE_MODULES = YES; 360 | CODE_SIGN_IDENTITY = ""; 361 | DEFINES_MODULE = YES; 362 | DEVELOPMENT_TEAM = ""; 363 | DYLIB_COMPATIBILITY_VERSION = 1; 364 | DYLIB_CURRENT_VERSION = 1; 365 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 366 | INFOPLIST_FILE = SwiftyOnboard/Info.plist; 367 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 368 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 369 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 370 | PRODUCT_BUNDLE_IDENTIFIER = com.juanpablofernandez.SwiftyOnboard; 371 | PRODUCT_NAME = "$(TARGET_NAME)"; 372 | SKIP_INSTALL = YES; 373 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 374 | SWIFT_VERSION = 5.0; 375 | }; 376 | name = Debug; 377 | }; 378 | 69A62A111E885750009788A2 /* Release */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | CLANG_ENABLE_MODULES = YES; 382 | CODE_SIGN_IDENTITY = ""; 383 | DEFINES_MODULE = YES; 384 | DEVELOPMENT_TEAM = ""; 385 | DYLIB_COMPATIBILITY_VERSION = 1; 386 | DYLIB_CURRENT_VERSION = 1; 387 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 388 | INFOPLIST_FILE = SwiftyOnboard/Info.plist; 389 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 390 | IPHONEOS_DEPLOYMENT_TARGET = 12.0; 391 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 392 | PRODUCT_BUNDLE_IDENTIFIER = com.juanpablofernandez.SwiftyOnboard; 393 | PRODUCT_NAME = "$(TARGET_NAME)"; 394 | SKIP_INSTALL = YES; 395 | SWIFT_VERSION = 5.0; 396 | }; 397 | name = Release; 398 | }; 399 | 69A62A131E885750009788A2 /* Debug */ = { 400 | isa = XCBuildConfiguration; 401 | buildSettings = { 402 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 403 | DEVELOPMENT_TEAM = V92SZ8966T; 404 | INFOPLIST_FILE = SwiftyOnboardTests/Info.plist; 405 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 406 | PRODUCT_BUNDLE_IDENTIFIER = com.juanpablofernandez.SwiftyOnboardTests; 407 | PRODUCT_NAME = "$(TARGET_NAME)"; 408 | SWIFT_VERSION = 5.0; 409 | }; 410 | name = Debug; 411 | }; 412 | 69A62A141E885750009788A2 /* Release */ = { 413 | isa = XCBuildConfiguration; 414 | buildSettings = { 415 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 416 | DEVELOPMENT_TEAM = V92SZ8966T; 417 | INFOPLIST_FILE = SwiftyOnboardTests/Info.plist; 418 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 419 | PRODUCT_BUNDLE_IDENTIFIER = com.juanpablofernandez.SwiftyOnboardTests; 420 | PRODUCT_NAME = "$(TARGET_NAME)"; 421 | SWIFT_VERSION = 5.0; 422 | }; 423 | name = Release; 424 | }; 425 | /* End XCBuildConfiguration section */ 426 | 427 | /* Begin XCConfigurationList section */ 428 | 69A629F51E885750009788A2 /* Build configuration list for PBXProject "SwiftyOnboard" */ = { 429 | isa = XCConfigurationList; 430 | buildConfigurations = ( 431 | 69A62A0D1E885750009788A2 /* Debug */, 432 | 69A62A0E1E885750009788A2 /* Release */, 433 | ); 434 | defaultConfigurationIsVisible = 0; 435 | defaultConfigurationName = Release; 436 | }; 437 | 69A62A0F1E885750009788A2 /* Build configuration list for PBXNativeTarget "SwiftyOnboard" */ = { 438 | isa = XCConfigurationList; 439 | buildConfigurations = ( 440 | 69A62A101E885750009788A2 /* Debug */, 441 | 69A62A111E885750009788A2 /* Release */, 442 | ); 443 | defaultConfigurationIsVisible = 0; 444 | defaultConfigurationName = Release; 445 | }; 446 | 69A62A121E885750009788A2 /* Build configuration list for PBXNativeTarget "SwiftyOnboardTests" */ = { 447 | isa = XCConfigurationList; 448 | buildConfigurations = ( 449 | 69A62A131E885750009788A2 /* Debug */, 450 | 69A62A141E885750009788A2 /* Release */, 451 | ); 452 | defaultConfigurationIsVisible = 0; 453 | defaultConfigurationName = Release; 454 | }; 455 | /* End XCConfigurationList section */ 456 | }; 457 | rootObject = 69A629F21E885750009788A2 /* Project object */; 458 | } 459 | -------------------------------------------------------------------------------- /SwiftyOnboard.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftyOnboard.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SwiftyOnboard.xcodeproj/xcshareddata/xcschemes/SwiftyOnboard.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 42 | 48 | 49 | 50 | 51 | 52 | 62 | 63 | 69 | 70 | 71 | 72 | 78 | 79 | 85 | 86 | 87 | 88 | 90 | 91 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /SwiftyOnboard/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIViewControllerBasedStatusBarAppearance 6 | 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | FMWK 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SwiftyOnboard/SwiftyOnboard.h: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftyOnboard.h 3 | // SwiftyOnboard 4 | // 5 | // Created by Jay on 3/26/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for SwiftyOnboard. 12 | FOUNDATION_EXPORT double SwiftyOnboardVersionNumber; 13 | 14 | //! Project version string for SwiftyOnboard. 15 | FOUNDATION_EXPORT const unsigned char SwiftyOnboardVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /SwiftyOnboard/SwiftyOnboard.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwiftyOnboard 4 | // 5 | // Created by Jay on 3/25/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public protocol SwiftyOnboardDataSource: AnyObject { 12 | 13 | func swiftyOnboardBackgroundColorFor(_ swiftyOnboard: SwiftyOnboard, atIndex index: Int) -> UIColor? 14 | func swiftyOnboardNumberOfPages(_ swiftyOnboard: SwiftyOnboard) -> Int 15 | func swiftyOnboardViewForBackground(_ swiftyOnboard: SwiftyOnboard) -> UIView? 16 | func swiftyOnboardPageForIndex(_ swiftyOnboard: SwiftyOnboard, index: Int) -> SwiftyOnboardPage? 17 | func swiftyOnboardViewForOverlay(_ swiftyOnboard: SwiftyOnboard) -> SwiftyOnboardOverlay? 18 | func swiftyOnboardOverlayForPosition(_ swiftyOnboard: SwiftyOnboard, overlay: SwiftyOnboardOverlay, for position: Double) 19 | 20 | } 21 | 22 | public extension SwiftyOnboardDataSource { 23 | 24 | func swiftyOnboardBackgroundColorFor(_ swiftyOnboard: SwiftyOnboard,atIndex index: Int)->UIColor?{ 25 | return nil 26 | } 27 | 28 | func swiftyOnboardViewForBackground(_ swiftyOnboard: SwiftyOnboard) -> UIView? { 29 | return nil 30 | } 31 | 32 | func swiftyOnboardOverlayForPosition(_ swiftyOnboard: SwiftyOnboard, overlay: SwiftyOnboardOverlay, for position: Double) {} 33 | 34 | func swiftyOnboardViewForOverlay(_ swiftyOnboard: SwiftyOnboard) -> SwiftyOnboardOverlay? { 35 | return SwiftyOnboardOverlay() 36 | } 37 | } 38 | 39 | public protocol SwiftyOnboardDelegate: AnyObject { 40 | 41 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, currentPage index: Int) 42 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, leftEdge position: Double) 43 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, tapped index: Int) 44 | 45 | } 46 | 47 | public extension SwiftyOnboardDelegate { 48 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, currentPage index: Int) {} 49 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, leftEdge position: Double) {} 50 | func swiftyOnboard(_ swiftyOnboard: SwiftyOnboard, tapped index: Int) {} 51 | } 52 | 53 | public class SwiftyOnboard: UIView, UIScrollViewDelegate { 54 | 55 | open weak var dataSource: SwiftyOnboardDataSource? { 56 | didSet { 57 | if let color = dataSource?.swiftyOnboardBackgroundColorFor(self, atIndex: 0){ 58 | backgroundColor = color 59 | } 60 | dataSourceSet = true 61 | } 62 | } 63 | 64 | open weak var delegate: SwiftyOnboardDelegate? 65 | 66 | fileprivate var containerView: UIScrollView = { 67 | let scrollView = UIScrollView() 68 | scrollView.isPagingEnabled = true 69 | scrollView.bounces = false 70 | scrollView.showsHorizontalScrollIndicator = false 71 | scrollView.showsVerticalScrollIndicator = false 72 | scrollView.isUserInteractionEnabled = true 73 | scrollView.isScrollEnabled = true 74 | scrollView.setContentOffset(CGPoint(x: 0, y: 0), animated: false) 75 | return scrollView 76 | }() 77 | 78 | fileprivate var dataSourceSet: Bool = false 79 | fileprivate var pageCount = 0 80 | fileprivate var overlay: SwiftyOnboardOverlay? 81 | fileprivate var pages = [SwiftyOnboardPage]() 82 | 83 | open var style: SwiftyOnboardStyle = .dark 84 | open var shouldSwipe: Bool = true 85 | open var fadePages: Bool = true 86 | 87 | 88 | public init(frame: CGRect, style: SwiftyOnboardStyle = .dark) { 89 | super.init(frame: frame) 90 | self.style = style 91 | } 92 | 93 | required public init?(coder aDecoder: NSCoder) { 94 | super.init(coder: aDecoder) 95 | } 96 | 97 | private func loadView() { 98 | setBackgroundView() 99 | setUpContainerView() 100 | setUpPages() 101 | setOverlayView() 102 | containerView.isScrollEnabled = shouldSwipe 103 | } 104 | 105 | override open func layoutSubviews() { 106 | super.layoutSubviews() 107 | if dataSourceSet { 108 | loadView() 109 | dataSourceSet = false 110 | } 111 | } 112 | 113 | fileprivate func setUpContainerView() { 114 | let viewFrame = CGRect(x: 0, y: 0, width: self.frame.width, height: self.frame.height) 115 | self.containerView.frame = viewFrame 116 | containerView.delegate = self 117 | let tap = UITapGestureRecognizer(target: self, action: #selector(tappedPage)) 118 | containerView.addGestureRecognizer(tap) 119 | self.addSubview(containerView) 120 | } 121 | 122 | fileprivate func setBackgroundView() { 123 | if let dataSource = dataSource { 124 | if let background = dataSource.swiftyOnboardViewForBackground(self) { 125 | self.addSubview(background) 126 | self.sendSubviewToBack(background) 127 | } 128 | } 129 | } 130 | 131 | fileprivate func setUpPages() { 132 | if let dataSource = dataSource { 133 | pageCount = dataSource.swiftyOnboardNumberOfPages(self) 134 | for index in 0.. CGFloat { 170 | let boundsWidth = containerView.bounds.width 171 | let contentOffset = containerView.contentOffset.x 172 | let currentPosition = contentOffset / boundsWidth 173 | return currentPosition 174 | } 175 | 176 | fileprivate func colorForPosition(_ pos: CGFloat)->UIColor?{ 177 | let percentage: CGFloat = pos - CGFloat(Int(pos)) 178 | 179 | let currentIndex = Int(pos - percentage) 180 | 181 | if currentIndex < pageCount - 1{ 182 | let color1 = dataSource?.swiftyOnboardBackgroundColorFor(self, atIndex: currentIndex) 183 | let color2 = dataSource?.swiftyOnboardBackgroundColorFor(self, atIndex: currentIndex + 1) 184 | 185 | if let color1 = color1, 186 | let color2 = color2{ 187 | return colorFrom(start: color1, end: color2, percent: percentage) 188 | } 189 | } 190 | return nil 191 | } 192 | 193 | fileprivate func colorFrom(start color1: UIColor, end color2: UIColor, percent: CGFloat)->UIColor{ 194 | func cofd(_ color1: CGFloat,_ color2: CGFloat,_ percent: CGFloat)-> CGFloat{ 195 | let c1 = CGFloat(color1) 196 | let c2 = CGFloat(color2) 197 | return (c1 + ((c2 - c1) * percent)) 198 | } 199 | return UIColor(red: cofd(color1.cgColor.components![0], 200 | color2.cgColor.components![0], 201 | percent), 202 | green: cofd(color1.cgColor.components![1], 203 | color2.cgColor.components![1], 204 | percent), 205 | blue: cofd(color1.cgColor.components![2], 206 | color2.cgColor.components![2], 207 | percent), 208 | alpha: 1) 209 | } 210 | 211 | fileprivate func fadePageTransitions(containerView: UIScrollView, currentPage: Int) { 212 | for (index,page) in pages.enumerated() { 213 | page.alpha = 1 - abs(abs(containerView.contentOffset.x) - page.frame.width * CGFloat(index)) / page.frame.width 214 | } 215 | } 216 | 217 | @objc open func didTapPageControl(_ sender: Any) { 218 | let pager = sender as! UIPageControl 219 | let page = pager.currentPage 220 | self.goToPage(index: page, animated: true) 221 | } 222 | 223 | open var currentPage: Int{ 224 | return Int(getCurrentPosition()) 225 | } 226 | 227 | open func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) { 228 | let currentPage = Int(getCurrentPosition()) 229 | self.delegate?.swiftyOnboard(self, currentPage: currentPage) 230 | } 231 | 232 | open func scrollViewDidScroll(_ scrollView: UIScrollView) { 233 | let currentPosition = Double(getCurrentPosition()) 234 | self.overlay?.currentPage(index: Int(round(currentPosition))) 235 | if self.fadePages { 236 | fadePageTransitions(containerView: scrollView, currentPage: Int(getCurrentPosition())) 237 | } 238 | 239 | self.delegate?.swiftyOnboard(self, leftEdge: currentPosition) 240 | if let overlayView = self.overlay { 241 | self.dataSource?.swiftyOnboardOverlayForPosition(self, overlay: overlayView, for: currentPosition) 242 | } 243 | 244 | if let color = colorForPosition(CGFloat(currentPosition)) { 245 | self.backgroundColor = color 246 | } 247 | } 248 | 249 | open func goToPage(index: Int, animated: Bool) { 250 | if index < self.pageCount { 251 | let index = CGFloat(index) 252 | containerView.setContentOffset(CGPoint(x: index * self.frame.width, y: 0), animated: animated) 253 | } 254 | } 255 | } 256 | 257 | public enum SwiftyOnboardStyle { 258 | case light 259 | case dark 260 | } 261 | -------------------------------------------------------------------------------- /SwiftyOnboard/SwiftyOnboardOverlay.swift: -------------------------------------------------------------------------------- 1 | // 2 | // customOverlayView.swift 3 | // SwiftyOnboard 4 | // 5 | // Created by Jay on 3/26/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class SwiftyOnboardOverlay: UIView { 12 | 13 | open var pageControl: UIPageControl = { 14 | let pageControl = UIPageControl() 15 | pageControl.currentPage = 0 16 | pageControl.pageIndicatorTintColor = UIColor.lightGray 17 | return pageControl 18 | }() 19 | 20 | open var continueButton: UIButton = { 21 | let button = UIButton(type: .system) 22 | button.setTitle("Continue", for: .normal) 23 | button.contentHorizontalAlignment = .center 24 | return button 25 | }() 26 | 27 | open var skipButton: UIButton = { 28 | let button = UIButton(type: .system) 29 | button.setTitle("Skip", for: .normal) 30 | button.contentHorizontalAlignment = .right 31 | return button 32 | }() 33 | 34 | override init(frame: CGRect) { 35 | super.init(frame: frame) 36 | setUp() 37 | } 38 | 39 | required public init?(coder aDecoder: NSCoder) { 40 | super.init(coder: aDecoder) 41 | } 42 | 43 | override open func point(inside point: CGPoint, with event: UIEvent?) -> Bool { 44 | for subview in subviews { 45 | if !subview.isHidden && subview.alpha > 0 && subview.isUserInteractionEnabled && subview.point(inside: convert(point, to: subview), with: event) { 46 | return true 47 | } 48 | } 49 | return false 50 | } 51 | 52 | open func set(style: SwiftyOnboardStyle) { 53 | switch style { 54 | case .light: 55 | continueButton.setTitleColor(.white, for: .normal) 56 | skipButton.setTitleColor(.white, for: .normal) 57 | pageControl.currentPageIndicatorTintColor = UIColor.white 58 | case .dark: 59 | continueButton.setTitleColor(.black, for: .normal) 60 | skipButton.setTitleColor(.black, for: .normal) 61 | pageControl.currentPageIndicatorTintColor = UIColor.black 62 | } 63 | } 64 | 65 | open func page(count: Int) { 66 | pageControl.numberOfPages = count 67 | } 68 | 69 | open func currentPage(index: Int) { 70 | pageControl.currentPage = index 71 | } 72 | 73 | func setUp() { 74 | self.addSubview(pageControl) 75 | 76 | let margin = self.layoutMarginsGuide 77 | pageControl.translatesAutoresizingMaskIntoConstraints = false 78 | pageControl.heightAnchor.constraint(equalToConstant: 15).isActive = true 79 | pageControl.bottomAnchor.constraint(equalTo: margin.bottomAnchor, constant: -10).isActive = true 80 | pageControl.leftAnchor.constraint(equalTo: margin.leftAnchor, constant: 10).isActive = true 81 | pageControl.rightAnchor.constraint(equalTo: margin.rightAnchor, constant: -10).isActive = true 82 | 83 | self.addSubview(continueButton) 84 | continueButton.translatesAutoresizingMaskIntoConstraints = false 85 | continueButton.heightAnchor.constraint(equalToConstant: 20).isActive = true 86 | continueButton.bottomAnchor.constraint(equalTo: pageControl.topAnchor, constant: -20).isActive = true 87 | continueButton.leftAnchor.constraint(equalTo: margin.leftAnchor, constant: 10).isActive = true 88 | continueButton.rightAnchor.constraint(equalTo: margin.rightAnchor, constant: -10).isActive = true 89 | 90 | self.addSubview(skipButton) 91 | skipButton.translatesAutoresizingMaskIntoConstraints = false 92 | skipButton.heightAnchor.constraint(equalToConstant: 20).isActive = true 93 | skipButton.topAnchor.constraint(equalTo: margin.topAnchor, constant: 10).isActive = true 94 | skipButton.leftAnchor.constraint(equalTo: margin.leftAnchor, constant: 10).isActive = true 95 | skipButton.rightAnchor.constraint(equalTo: margin.rightAnchor, constant: -20).isActive = true 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /SwiftyOnboard/SwiftyOnboardPage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // customPageView.swift 3 | // SwiftyOnboard 4 | // 5 | // Created by Jay on 3/25/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | open class SwiftyOnboardPage: UIView { 12 | 13 | public var title: UILabel = { 14 | let label = UILabel() 15 | label.text = "Title" 16 | label.textAlignment = .center 17 | label.numberOfLines = 0 18 | label.lineBreakMode = NSLineBreakMode.byWordWrapping 19 | label.sizeToFit() 20 | return label 21 | }() 22 | 23 | public var subTitle: UILabel = { 24 | let label = UILabel() 25 | label.text = "Sub Title" 26 | label.textAlignment = .center 27 | label.numberOfLines = 0 28 | label.lineBreakMode = NSLineBreakMode.byWordWrapping 29 | label.sizeToFit() 30 | return label 31 | }() 32 | 33 | public var imageView: UIImageView = { 34 | let imageView = UIImageView() 35 | imageView.contentMode = .scaleAspectFit 36 | return imageView 37 | }() 38 | 39 | required public init?(coder aDecoder: NSCoder) { 40 | super.init(coder: aDecoder) 41 | } 42 | 43 | override init(frame: CGRect) { 44 | super.init(frame: frame) 45 | setUp() 46 | } 47 | 48 | func set(style: SwiftyOnboardStyle) { 49 | switch style { 50 | case .light: 51 | title.textColor = .white 52 | subTitle.textColor = .white 53 | case .dark: 54 | title.textColor = .black 55 | subTitle.textColor = .black 56 | } 57 | } 58 | 59 | func setUp() { 60 | self.addSubview(imageView) 61 | 62 | let margin = self.layoutMarginsGuide 63 | imageView.translatesAutoresizingMaskIntoConstraints = false 64 | imageView.leftAnchor.constraint(equalTo: margin.leftAnchor, constant: 30).isActive = true 65 | imageView.rightAnchor.constraint(equalTo: margin.rightAnchor, constant: -30).isActive = true 66 | imageView.topAnchor.constraint(equalTo: margin.topAnchor, constant: 10).isActive = true 67 | imageView.heightAnchor.constraint(equalTo: margin.heightAnchor, multiplier: 0.5).isActive = true 68 | 69 | self.addSubview(title) 70 | title.translatesAutoresizingMaskIntoConstraints = false 71 | title.leftAnchor.constraint(equalTo: margin.leftAnchor, constant: 30).isActive = true 72 | title.rightAnchor.constraint(equalTo: margin.rightAnchor, constant: -30).isActive = true 73 | title.topAnchor.constraint(equalTo: imageView.bottomAnchor, constant: 10).isActive = true 74 | title.heightAnchor.constraint(equalToConstant: 50).isActive = true 75 | 76 | self.addSubview(subTitle) 77 | subTitle.translatesAutoresizingMaskIntoConstraints = false 78 | subTitle.leftAnchor.constraint(equalTo: margin.leftAnchor, constant: 30).isActive = true 79 | subTitle.rightAnchor.constraint(equalTo: margin.rightAnchor, constant: -30).isActive = true 80 | subTitle.topAnchor.constraint(equalTo: title.bottomAnchor, constant: 0).isActive = true 81 | subTitle.heightAnchor.constraint(equalToConstant: 100).isActive = true 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /SwiftyOnboardTests/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 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /SwiftyOnboardTests/SwiftyOnboardTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftyOnboardTests.swift 3 | // SwiftyOnboardTests 4 | // 5 | // Created by Jay on 3/26/17. 6 | // Copyright © 2017 Juan Pablo Fernandez. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import SwiftyOnboard 11 | 12 | class SwiftyOnboardTests: 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 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /screenshots/onboard1.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/screenshots/onboard1.1.png -------------------------------------------------------------------------------- /screenshots/onboard1.2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/screenshots/onboard1.2.png -------------------------------------------------------------------------------- /screenshots/onboard1.3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/screenshots/onboard1.3.png -------------------------------------------------------------------------------- /screenshots/onboard1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/screenshots/onboard1.gif -------------------------------------------------------------------------------- /screenshots/onboard2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/juanpablofernandez/SwiftyOnboard/aae0dbf328475e5bceac29768075340cae2c2b56/screenshots/onboard2.gif --------------------------------------------------------------------------------