├── App Screenshot ├── Screen1.png ├── Screen2.png └── Screen3.png ├── PastelOnBoarding.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ └── IDEWorkspaceChecks.plist │ └── xcuserdata │ │ └── smitkanojiya.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── smitkanojiya.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── PastelOnBoarding ├── Extension │ ├── Color.swift │ └── View.swift ├── Info.plist ├── Model │ └── OnboardingPage.swift ├── PastelOnBoardingApp.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Resources │ ├── Asap.ttf │ └── Assets.xcassets │ │ ├── AccentColor.colorset │ │ └── Contents.json │ │ ├── AppIcon.appiconset │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── Right.imageset │ │ ├── Contents.json │ │ ├── Right@1x.png │ │ ├── Right@2x.png │ │ └── Right@3x.png │ │ ├── back.imageset │ │ ├── Contents.json │ │ ├── Group 4@1x.png │ │ ├── Group 4@2x.png │ │ └── Group 4@3x.png │ │ ├── onboarding1.imageset │ │ ├── Contents.json │ │ ├── delivery boy with boxes@1x.png │ │ ├── delivery boy with boxes@2x.png │ │ └── delivery boy with boxes@3x.png │ │ ├── onboarding2.imageset │ │ ├── Contents.json │ │ ├── delivery boy on scooter@1x.png │ │ ├── delivery boy on scooter@2x.png │ │ └── delivery boy on scooter@3x.png │ │ └── onboarding3.imageset │ │ ├── Contents.json │ │ ├── delivery boy on scooter@1x.png │ │ ├── delivery boy on scooter@2x.png │ │ └── delivery boy on scooter@3x.png ├── VieModel │ └── OnboardingViewModel.swift └── View │ └── OnboardingView.swift └── README.md /App Screenshot/Screen1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/App Screenshot/Screen1.png -------------------------------------------------------------------------------- /App Screenshot/Screen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/App Screenshot/Screen2.png -------------------------------------------------------------------------------- /App Screenshot/Screen3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/App Screenshot/Screen3.png -------------------------------------------------------------------------------- /PastelOnBoarding.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | C14593E92AA22DB100730853 /* PastelOnBoardingApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = C14593E82AA22DB100730853 /* PastelOnBoardingApp.swift */; }; 11 | C14593ED2AA22DB200730853 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C14593EC2AA22DB200730853 /* Assets.xcassets */; }; 12 | C14593F02AA22DB200730853 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = C14593EF2AA22DB200730853 /* Preview Assets.xcassets */; }; 13 | C14593FC2AA22E2200730853 /* OnboardingPage.swift in Sources */ = {isa = PBXBuildFile; fileRef = C14593FB2AA22E2200730853 /* OnboardingPage.swift */; }; 14 | C14593FE2AA22E4100730853 /* OnboardingViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C14593FD2AA22E4100730853 /* OnboardingViewModel.swift */; }; 15 | C14594002AA2325C00730853 /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C14593FF2AA2325C00730853 /* OnboardingView.swift */; }; 16 | C14594032AA700AC00730853 /* Asap.ttf in Resources */ = {isa = PBXBuildFile; fileRef = C14594022AA700AC00730853 /* Asap.ttf */; }; 17 | C14594072AA72B1700730853 /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = C14594062AA72B1700730853 /* Color.swift */; }; 18 | C14594092AA87F2800730853 /* View.swift in Sources */ = {isa = PBXBuildFile; fileRef = C14594082AA87F2800730853 /* View.swift */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXFileReference section */ 22 | C14593E52AA22DB100730853 /* PastelOnBoarding.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PastelOnBoarding.app; sourceTree = BUILT_PRODUCTS_DIR; }; 23 | C14593E82AA22DB100730853 /* PastelOnBoardingApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PastelOnBoardingApp.swift; sourceTree = ""; }; 24 | C14593EC2AA22DB200730853 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 25 | C14593EF2AA22DB200730853 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 26 | C14593FB2AA22E2200730853 /* OnboardingPage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingPage.swift; sourceTree = ""; }; 27 | C14593FD2AA22E4100730853 /* OnboardingViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingViewModel.swift; sourceTree = ""; }; 28 | C14593FF2AA2325C00730853 /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingView.swift; sourceTree = ""; }; 29 | C14594022AA700AC00730853 /* Asap.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = Asap.ttf; sourceTree = ""; }; 30 | C14594042AA700BE00730853 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 31 | C14594062AA72B1700730853 /* Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = ""; }; 32 | C14594082AA87F2800730853 /* View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = View.swift; sourceTree = ""; }; 33 | /* End PBXFileReference section */ 34 | 35 | /* Begin PBXFrameworksBuildPhase section */ 36 | C14593E22AA22DB100730853 /* Frameworks */ = { 37 | isa = PBXFrameworksBuildPhase; 38 | buildActionMask = 2147483647; 39 | files = ( 40 | ); 41 | runOnlyForDeploymentPostprocessing = 0; 42 | }; 43 | /* End PBXFrameworksBuildPhase section */ 44 | 45 | /* Begin PBXGroup section */ 46 | C14593DC2AA22DB100730853 = { 47 | isa = PBXGroup; 48 | children = ( 49 | C14593E72AA22DB100730853 /* PastelOnBoarding */, 50 | C14593E62AA22DB100730853 /* Products */, 51 | ); 52 | sourceTree = ""; 53 | }; 54 | C14593E62AA22DB100730853 /* Products */ = { 55 | isa = PBXGroup; 56 | children = ( 57 | C14593E52AA22DB100730853 /* PastelOnBoarding.app */, 58 | ); 59 | name = Products; 60 | sourceTree = ""; 61 | }; 62 | C14593E72AA22DB100730853 /* PastelOnBoarding */ = { 63 | isa = PBXGroup; 64 | children = ( 65 | C14594042AA700BE00730853 /* Info.plist */, 66 | C14594052AA72AE600730853 /* Extension */, 67 | C14593F62AA22DBB00730853 /* Model */, 68 | C14593E82AA22DB100730853 /* PastelOnBoardingApp.swift */, 69 | C14593EE2AA22DB200730853 /* Preview Content */, 70 | C14594012AA6FB9000730853 /* Resources */, 71 | C14593FA2AA22DDF00730853 /* VieModel */, 72 | C14593F92AA22DD900730853 /* View */, 73 | ); 74 | path = PastelOnBoarding; 75 | sourceTree = ""; 76 | }; 77 | C14593EE2AA22DB200730853 /* Preview Content */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | C14593EF2AA22DB200730853 /* Preview Assets.xcassets */, 81 | ); 82 | path = "Preview Content"; 83 | sourceTree = ""; 84 | }; 85 | C14593F62AA22DBB00730853 /* Model */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | C14593FB2AA22E2200730853 /* OnboardingPage.swift */, 89 | ); 90 | path = Model; 91 | sourceTree = ""; 92 | }; 93 | C14593F92AA22DD900730853 /* View */ = { 94 | isa = PBXGroup; 95 | children = ( 96 | C14593FF2AA2325C00730853 /* OnboardingView.swift */, 97 | ); 98 | path = View; 99 | sourceTree = ""; 100 | }; 101 | C14593FA2AA22DDF00730853 /* VieModel */ = { 102 | isa = PBXGroup; 103 | children = ( 104 | C14593FD2AA22E4100730853 /* OnboardingViewModel.swift */, 105 | ); 106 | path = VieModel; 107 | sourceTree = ""; 108 | }; 109 | C14594012AA6FB9000730853 /* Resources */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | C14593EC2AA22DB200730853 /* Assets.xcassets */, 113 | C14594022AA700AC00730853 /* Asap.ttf */, 114 | ); 115 | path = Resources; 116 | sourceTree = ""; 117 | }; 118 | C14594052AA72AE600730853 /* Extension */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | C14594062AA72B1700730853 /* Color.swift */, 122 | C14594082AA87F2800730853 /* View.swift */, 123 | ); 124 | path = Extension; 125 | sourceTree = ""; 126 | }; 127 | /* End PBXGroup section */ 128 | 129 | /* Begin PBXNativeTarget section */ 130 | C14593E42AA22DB100730853 /* PastelOnBoarding */ = { 131 | isa = PBXNativeTarget; 132 | buildConfigurationList = C14593F32AA22DB200730853 /* Build configuration list for PBXNativeTarget "PastelOnBoarding" */; 133 | buildPhases = ( 134 | C14593E12AA22DB100730853 /* Sources */, 135 | C14593E22AA22DB100730853 /* Frameworks */, 136 | C14593E32AA22DB100730853 /* Resources */, 137 | ); 138 | buildRules = ( 139 | ); 140 | dependencies = ( 141 | ); 142 | name = PastelOnBoarding; 143 | productName = PastelOnBoarding; 144 | productReference = C14593E52AA22DB100730853 /* PastelOnBoarding.app */; 145 | productType = "com.apple.product-type.application"; 146 | }; 147 | /* End PBXNativeTarget section */ 148 | 149 | /* Begin PBXProject section */ 150 | C14593DD2AA22DB100730853 /* Project object */ = { 151 | isa = PBXProject; 152 | attributes = { 153 | BuildIndependentTargetsInParallel = 1; 154 | LastSwiftUpdateCheck = 1430; 155 | LastUpgradeCheck = 1430; 156 | TargetAttributes = { 157 | C14593E42AA22DB100730853 = { 158 | CreatedOnToolsVersion = 14.3.1; 159 | }; 160 | }; 161 | }; 162 | buildConfigurationList = C14593E02AA22DB100730853 /* Build configuration list for PBXProject "PastelOnBoarding" */; 163 | compatibilityVersion = "Xcode 14.0"; 164 | developmentRegion = en; 165 | hasScannedForEncodings = 0; 166 | knownRegions = ( 167 | en, 168 | Base, 169 | ); 170 | mainGroup = C14593DC2AA22DB100730853; 171 | productRefGroup = C14593E62AA22DB100730853 /* Products */; 172 | projectDirPath = ""; 173 | projectRoot = ""; 174 | targets = ( 175 | C14593E42AA22DB100730853 /* PastelOnBoarding */, 176 | ); 177 | }; 178 | /* End PBXProject section */ 179 | 180 | /* Begin PBXResourcesBuildPhase section */ 181 | C14593E32AA22DB100730853 /* Resources */ = { 182 | isa = PBXResourcesBuildPhase; 183 | buildActionMask = 2147483647; 184 | files = ( 185 | C14593F02AA22DB200730853 /* Preview Assets.xcassets in Resources */, 186 | C14593ED2AA22DB200730853 /* Assets.xcassets in Resources */, 187 | C14594032AA700AC00730853 /* Asap.ttf in Resources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXResourcesBuildPhase section */ 192 | 193 | /* Begin PBXSourcesBuildPhase section */ 194 | C14593E12AA22DB100730853 /* Sources */ = { 195 | isa = PBXSourcesBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | C14593E92AA22DB100730853 /* PastelOnBoardingApp.swift in Sources */, 199 | C14593FC2AA22E2200730853 /* OnboardingPage.swift in Sources */, 200 | C14594092AA87F2800730853 /* View.swift in Sources */, 201 | C14594002AA2325C00730853 /* OnboardingView.swift in Sources */, 202 | C14594072AA72B1700730853 /* Color.swift in Sources */, 203 | C14593FE2AA22E4100730853 /* OnboardingViewModel.swift in Sources */, 204 | ); 205 | runOnlyForDeploymentPostprocessing = 0; 206 | }; 207 | /* End PBXSourcesBuildPhase section */ 208 | 209 | /* Begin XCBuildConfiguration section */ 210 | C14593F12AA22DB200730853 /* Debug */ = { 211 | isa = XCBuildConfiguration; 212 | buildSettings = { 213 | ALWAYS_SEARCH_USER_PATHS = NO; 214 | CLANG_ANALYZER_NONNULL = YES; 215 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 216 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 217 | CLANG_ENABLE_MODULES = YES; 218 | CLANG_ENABLE_OBJC_ARC = YES; 219 | CLANG_ENABLE_OBJC_WEAK = YES; 220 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 221 | CLANG_WARN_BOOL_CONVERSION = YES; 222 | CLANG_WARN_COMMA = YES; 223 | CLANG_WARN_CONSTANT_CONVERSION = YES; 224 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 225 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 226 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 227 | CLANG_WARN_EMPTY_BODY = YES; 228 | CLANG_WARN_ENUM_CONVERSION = YES; 229 | CLANG_WARN_INFINITE_RECURSION = YES; 230 | CLANG_WARN_INT_CONVERSION = YES; 231 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 232 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 233 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 234 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 235 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 236 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 237 | CLANG_WARN_STRICT_PROTOTYPES = YES; 238 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 239 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 240 | CLANG_WARN_UNREACHABLE_CODE = YES; 241 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 242 | COPY_PHASE_STRIP = NO; 243 | DEBUG_INFORMATION_FORMAT = dwarf; 244 | ENABLE_STRICT_OBJC_MSGSEND = YES; 245 | ENABLE_TESTABILITY = YES; 246 | GCC_C_LANGUAGE_STANDARD = gnu11; 247 | GCC_DYNAMIC_NO_PIC = NO; 248 | GCC_NO_COMMON_BLOCKS = YES; 249 | GCC_OPTIMIZATION_LEVEL = 0; 250 | GCC_PREPROCESSOR_DEFINITIONS = ( 251 | "DEBUG=1", 252 | "$(inherited)", 253 | ); 254 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 255 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 256 | GCC_WARN_UNDECLARED_SELECTOR = YES; 257 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 258 | GCC_WARN_UNUSED_FUNCTION = YES; 259 | GCC_WARN_UNUSED_VARIABLE = YES; 260 | IPHONEOS_DEPLOYMENT_TARGET = 16.4; 261 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 262 | MTL_FAST_MATH = YES; 263 | ONLY_ACTIVE_ARCH = YES; 264 | SDKROOT = iphoneos; 265 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 266 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 267 | }; 268 | name = Debug; 269 | }; 270 | C14593F22AA22DB200730853 /* Release */ = { 271 | isa = XCBuildConfiguration; 272 | buildSettings = { 273 | ALWAYS_SEARCH_USER_PATHS = NO; 274 | CLANG_ANALYZER_NONNULL = YES; 275 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 276 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 277 | CLANG_ENABLE_MODULES = YES; 278 | CLANG_ENABLE_OBJC_ARC = YES; 279 | CLANG_ENABLE_OBJC_WEAK = YES; 280 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 281 | CLANG_WARN_BOOL_CONVERSION = YES; 282 | CLANG_WARN_COMMA = YES; 283 | CLANG_WARN_CONSTANT_CONVERSION = YES; 284 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 285 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 286 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 287 | CLANG_WARN_EMPTY_BODY = YES; 288 | CLANG_WARN_ENUM_CONVERSION = YES; 289 | CLANG_WARN_INFINITE_RECURSION = YES; 290 | CLANG_WARN_INT_CONVERSION = YES; 291 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 292 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 293 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 294 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 295 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 296 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 297 | CLANG_WARN_STRICT_PROTOTYPES = YES; 298 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 299 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 300 | CLANG_WARN_UNREACHABLE_CODE = YES; 301 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 302 | COPY_PHASE_STRIP = NO; 303 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 304 | ENABLE_NS_ASSERTIONS = NO; 305 | ENABLE_STRICT_OBJC_MSGSEND = YES; 306 | GCC_C_LANGUAGE_STANDARD = gnu11; 307 | GCC_NO_COMMON_BLOCKS = YES; 308 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 309 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 310 | GCC_WARN_UNDECLARED_SELECTOR = YES; 311 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 312 | GCC_WARN_UNUSED_FUNCTION = YES; 313 | GCC_WARN_UNUSED_VARIABLE = YES; 314 | IPHONEOS_DEPLOYMENT_TARGET = 16.4; 315 | MTL_ENABLE_DEBUG_INFO = NO; 316 | MTL_FAST_MATH = YES; 317 | SDKROOT = iphoneos; 318 | SWIFT_COMPILATION_MODE = wholemodule; 319 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 320 | VALIDATE_PRODUCT = YES; 321 | }; 322 | name = Release; 323 | }; 324 | C14593F42AA22DB200730853 /* Debug */ = { 325 | isa = XCBuildConfiguration; 326 | buildSettings = { 327 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 328 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 329 | CODE_SIGN_STYLE = Automatic; 330 | CURRENT_PROJECT_VERSION = 1; 331 | DEVELOPMENT_ASSET_PATHS = "\"PastelOnBoarding/Preview Content\""; 332 | DEVELOPMENT_TEAM = V6B6JF666R; 333 | ENABLE_PREVIEWS = YES; 334 | GENERATE_INFOPLIST_FILE = YES; 335 | INFOPLIST_FILE = PastelOnBoarding/Info.plist; 336 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 337 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 338 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 339 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 340 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 341 | LD_RUNPATH_SEARCH_PATHS = ( 342 | "$(inherited)", 343 | "@executable_path/Frameworks", 344 | ); 345 | MARKETING_VERSION = 1.0; 346 | PRODUCT_BUNDLE_IDENTIFIER = com.smile.PastelOnBoarding; 347 | PRODUCT_NAME = "$(TARGET_NAME)"; 348 | SWIFT_EMIT_LOC_STRINGS = YES; 349 | SWIFT_VERSION = 5.0; 350 | TARGETED_DEVICE_FAMILY = "1,2"; 351 | }; 352 | name = Debug; 353 | }; 354 | C14593F52AA22DB200730853 /* Release */ = { 355 | isa = XCBuildConfiguration; 356 | buildSettings = { 357 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 358 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 359 | CODE_SIGN_STYLE = Automatic; 360 | CURRENT_PROJECT_VERSION = 1; 361 | DEVELOPMENT_ASSET_PATHS = "\"PastelOnBoarding/Preview Content\""; 362 | DEVELOPMENT_TEAM = V6B6JF666R; 363 | ENABLE_PREVIEWS = YES; 364 | GENERATE_INFOPLIST_FILE = YES; 365 | INFOPLIST_FILE = PastelOnBoarding/Info.plist; 366 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 367 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 368 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 369 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 370 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 371 | LD_RUNPATH_SEARCH_PATHS = ( 372 | "$(inherited)", 373 | "@executable_path/Frameworks", 374 | ); 375 | MARKETING_VERSION = 1.0; 376 | PRODUCT_BUNDLE_IDENTIFIER = com.smile.PastelOnBoarding; 377 | PRODUCT_NAME = "$(TARGET_NAME)"; 378 | SWIFT_EMIT_LOC_STRINGS = YES; 379 | SWIFT_VERSION = 5.0; 380 | TARGETED_DEVICE_FAMILY = "1,2"; 381 | }; 382 | name = Release; 383 | }; 384 | /* End XCBuildConfiguration section */ 385 | 386 | /* Begin XCConfigurationList section */ 387 | C14593E02AA22DB100730853 /* Build configuration list for PBXProject "PastelOnBoarding" */ = { 388 | isa = XCConfigurationList; 389 | buildConfigurations = ( 390 | C14593F12AA22DB200730853 /* Debug */, 391 | C14593F22AA22DB200730853 /* Release */, 392 | ); 393 | defaultConfigurationIsVisible = 0; 394 | defaultConfigurationName = Release; 395 | }; 396 | C14593F32AA22DB200730853 /* Build configuration list for PBXNativeTarget "PastelOnBoarding" */ = { 397 | isa = XCConfigurationList; 398 | buildConfigurations = ( 399 | C14593F42AA22DB200730853 /* Debug */, 400 | C14593F52AA22DB200730853 /* Release */, 401 | ); 402 | defaultConfigurationIsVisible = 0; 403 | defaultConfigurationName = Release; 404 | }; 405 | /* End XCConfigurationList section */ 406 | }; 407 | rootObject = C14593DD2AA22DB100730853 /* Project object */; 408 | } 409 | -------------------------------------------------------------------------------- /PastelOnBoarding.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /PastelOnBoarding.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /PastelOnBoarding.xcodeproj/project.xcworkspace/xcuserdata/smitkanojiya.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding.xcodeproj/project.xcworkspace/xcuserdata/smitkanojiya.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /PastelOnBoarding.xcodeproj/xcuserdata/smitkanojiya.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | PastelOnBoarding.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /PastelOnBoarding/Extension/Color.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Color.swift 3 | // PastelOnBoarding 4 | // 5 | // Created by Smit Kanojiya on 05/09/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | extension Color { 11 | static let background = Color(red: 0.42, green: 0.56, blue: 0.51) 12 | static let textColor = Color(red: 0.33, green: 0.33, blue: 0.33) 13 | static let greenishGray = Color(red: 0.44, green: 0.58, blue: 0.54) 14 | static let oliveGreen = Color(red: 0.33, green: 0.44, blue: 0.39) 15 | static let shadowColor = Color(red: 0.15, green: 0.28, blue: 0.25).opacity(0.35) 16 | } 17 | -------------------------------------------------------------------------------- /PastelOnBoarding/Extension/View.swift: -------------------------------------------------------------------------------- 1 | // 2 | // View.swift 3 | // PastelOnBoarding 4 | // 5 | // Created by Smit Kanojiya on 06/09/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | extension View { 11 | /// Apply corner radius to specific corners of a view. 12 | /// 13 | /// - Parameters: 14 | /// - radius: The corner radius to apply. 15 | /// - corners: The corners to round. 16 | /// 17 | /// - Returns: A modified view with corner radius applied to specified corners. 18 | func cornerRadius(radius: CGFloat, corners: UIRectCorner) -> some View { 19 | ModifiedContent(content: self, modifier: CornerRadiusStyle(radius: radius, corners: corners)) 20 | } 21 | 22 | /// Apply a linear gradient background to a view. 23 | /// 24 | /// - Parameters: 25 | /// - colors: An array of `Color` objects representing the gradient colors. 26 | /// - startPoint: The starting point of the gradient. Defaults to `.top`. 27 | /// - endPoint: The ending point of the gradient. Defaults to `.bottom`. 28 | /// 29 | /// - Returns: A modified view with a linear gradient background. 30 | func commonLinearGradient(colors: [Color], startPoint: UnitPoint = .top, endPoint: UnitPoint = .bottom) -> some View { 31 | self.background( 32 | LinearGradient( 33 | gradient: Gradient(colors: colors), 34 | startPoint: startPoint, 35 | endPoint: endPoint 36 | ) 37 | ) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /PastelOnBoarding/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIAppFonts 6 | 7 | Asap.ttf 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /PastelOnBoarding/Model/OnboardingPage.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OnboardingPage.swift 3 | // PastelOnBoarding 4 | // 5 | // Created by Smit Kanojiya on 01/09/23. 6 | // 7 | 8 | import Foundation 9 | 10 | struct OnboardingPage: Identifiable { 11 | let id = UUID() 12 | let imageName: String // Image name for the onboarding page 13 | let title: String // Title of the onboarding page 14 | let description: String // Description of the onboarding page 15 | } 16 | -------------------------------------------------------------------------------- /PastelOnBoarding/PastelOnBoardingApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PastelOnBoardingApp.swift 3 | // PastelOnBoarding 4 | // 5 | // Created by Smit Kanojiya on 01/09/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct PastelOnBoardingApp: App { 12 | @StateObject var viewModel: OnboardingViewModel = OnboardingViewModel() 13 | var body: some Scene { 14 | WindowGroup { 15 | OnboardingView(viewModel: viewModel) 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /PastelOnBoarding/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Asap.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Asap.ttf -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "platform" : "ios", 6 | "size" : "1024x1024" 7 | } 8 | ], 9 | "info" : { 10 | "author" : "xcode", 11 | "version" : 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/Right.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Right@1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Right@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Right@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/Right.imageset/Right@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/Right.imageset/Right@1x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/Right.imageset/Right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/Right.imageset/Right@2x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/Right.imageset/Right@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/Right.imageset/Right@3x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/back.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Group 4@1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "Group 4@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "Group 4@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/back.imageset/Group 4@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/back.imageset/Group 4@1x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/back.imageset/Group 4@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/back.imageset/Group 4@2x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/back.imageset/Group 4@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/back.imageset/Group 4@3x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "delivery boy with boxes@1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "delivery boy with boxes@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "delivery boy with boxes@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding1.imageset/delivery boy with boxes@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/onboarding1.imageset/delivery boy with boxes@1x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding1.imageset/delivery boy with boxes@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/onboarding1.imageset/delivery boy with boxes@2x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding1.imageset/delivery boy with boxes@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/onboarding1.imageset/delivery boy with boxes@3x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "delivery boy on scooter@1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "delivery boy on scooter@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "delivery boy on scooter@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding2.imageset/delivery boy on scooter@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/onboarding2.imageset/delivery boy on scooter@1x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding2.imageset/delivery boy on scooter@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/onboarding2.imageset/delivery boy on scooter@2x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding2.imageset/delivery boy on scooter@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/onboarding2.imageset/delivery boy on scooter@3x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "delivery boy on scooter@1x.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "filename" : "delivery boy on scooter@2x.png", 10 | "idiom" : "universal", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "filename" : "delivery boy on scooter@3x.png", 15 | "idiom" : "universal", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "author" : "xcode", 21 | "version" : 1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding3.imageset/delivery boy on scooter@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/onboarding3.imageset/delivery boy on scooter@1x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding3.imageset/delivery boy on scooter@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/onboarding3.imageset/delivery boy on scooter@2x.png -------------------------------------------------------------------------------- /PastelOnBoarding/Resources/Assets.xcassets/onboarding3.imageset/delivery boy on scooter@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kanojiyasmit/PastelOnBoarding/0389ebe66bd8e3e0c30b1d8006fe55a2302a7d62/PastelOnBoarding/Resources/Assets.xcassets/onboarding3.imageset/delivery boy on scooter@3x.png -------------------------------------------------------------------------------- /PastelOnBoarding/VieModel/OnboardingViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OnboardingViewModel.swift 3 | // PastelOnBoarding 4 | // 5 | // Created by Smit Kanojiya on 01/09/23. 6 | // 7 | 8 | import Foundation 9 | import SwiftUI 10 | 11 | class OnboardingViewModel: ObservableObject { 12 | // Published properties to hold onboarding data 13 | @Published var onboardingPages: [OnboardingPage] = [ 14 | OnboardingPage(imageName: "onboarding1", 15 | title: "Welcome to our Delivery \nService!", 16 | description: "Get your favorite items delivered right to your doorstep hassle-free."), // First onboarding page data 17 | OnboardingPage(imageName: "onboarding2", 18 | title: "Track Your Delivery in \nReal-Time", 19 | description: "Stay updated with the whereabouts of your package as it makes its way to you."), // Second onboarding page data 20 | OnboardingPage(imageName: "onboarding3", 21 | title: "Enjoy Fast and Reliable \nDelivery", 22 | description: "Experience quick and dependable delivery services that ensure your orders arrive promptly and in perfect condition."), // Third onboarding page data 23 | ] 24 | 25 | // Define colors for each onboarding page 26 | @Published var pageColors: [Color] = [.background.opacity(0.5), .background.opacity(0.75), .background] 27 | 28 | // Published properties to manage onboarding state 29 | @Published var currentPageIndex: Int = 0 // Currently selected onboarding page 30 | @Published var onboardingProgress: CGFloat = 0 // Progress indicator for onboarding 31 | 32 | // Function to update the progress indicator 33 | func updateOnboardingProgress() { 34 | withAnimation { 35 | onboardingProgress = CGFloat(currentPageIndex + 1) / CGFloat(onboardingPages.count) 36 | } 37 | } 38 | 39 | // Function to navigate to the next onboarding page 40 | func goToNextPage() { 41 | if currentPageIndex < onboardingPages.count - 1 { 42 | withAnimation { 43 | currentPageIndex += 1 44 | } 45 | } 46 | } 47 | 48 | // Function to navigate to the previous onboarding page 49 | func goToPreviousPage() { 50 | if currentPageIndex > 0 { 51 | withAnimation { 52 | currentPageIndex -= 1 53 | } 54 | } 55 | } 56 | 57 | // Function to skip the onboarding and proceed to the last page 58 | func skipOnboarding() { 59 | currentPageIndex = onboardingPages.count - 1 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /PastelOnBoarding/View/OnboardingView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OnboardingView.swift 3 | // PastelOnBoarding 4 | // 5 | // Created by Smit Kanojiya on 01/09/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct OnboardingView: View { 11 | @ObservedObject var viewModel: OnboardingViewModel // ViewModel to manage onboarding data 12 | 13 | var body: some View { 14 | ZStack { 15 | Color.black.ignoresSafeArea() 16 | 17 | // Background gradient shape 18 | GeometryReader { geometry in 19 | Path { path in 20 | path.move(to: CGPoint(x: 0, y: 0)) 21 | path.addLine(to: CGPoint(x: geometry.size.width * 0.65, y: 0)) 22 | path.addLine(to: CGPoint(x: geometry.size.width * 0.35, y: geometry.size.height)) 23 | path.addLine(to: CGPoint(x: 0, y: geometry.size.height)) 24 | path.closeSubpath() 25 | } 26 | .fill(viewModel.pageColors[viewModel.currentPageIndex]) 27 | } 28 | .ignoresSafeArea() 29 | 30 | RectangleView() // A white rectangle view 31 | 32 | VStack { 33 | SkipButton { 34 | viewModel.skipOnboarding() 35 | } 36 | 37 | OnboardingPagesView(viewModel: viewModel) // Display onboarding pages 38 | 39 | HStack { 40 | CustomTabIndicator(pageCount: viewModel.onboardingPages.count, currentIndex: viewModel.currentPageIndex) 41 | 42 | Spacer() 43 | 44 | if viewModel.currentPageIndex > 0 { 45 | PreviousPageButton(action: viewModel.goToPreviousPage) 46 | } 47 | 48 | NextPageButton { 49 | viewModel.goToNextPage() 50 | } 51 | } 52 | .padding(EdgeInsets(top: 40, leading: 50, bottom: 30, trailing: 50)) 53 | } 54 | } 55 | } 56 | } 57 | 58 | // OnboardingPageView is used to display individual onboarding pages 59 | struct OnboardingPageView: View { 60 | let page: OnboardingPage 61 | 62 | var body: some View { 63 | VStack(alignment: .leading, spacing: 10) { 64 | Image(page.imageName) 65 | .resizable() 66 | .scaledToFit() 67 | .frame(maxWidth: .infinity, maxHeight: 450, alignment: .trailing) 68 | 69 | Text(page.title) 70 | .font(Font.custom("Asap", size: 22).weight(.semibold)) 71 | .kerning(0.44) 72 | .lineSpacing(2.5) 73 | 74 | Rectangle() 75 | .foregroundColor(.clear) 76 | .frame(width: 50, height: 3) 77 | .background(Color(red: 0.59, green: 0.72, blue: 0.68)) 78 | .cornerRadius(2) 79 | 80 | Text(page.description) 81 | .font(Font.custom("Asap", size: 14)) 82 | .kerning(0.28) 83 | .foregroundColor(.textColor) 84 | .lineSpacing(5) 85 | } 86 | .padding(.horizontal, 50) 87 | } 88 | } 89 | 90 | // RectangleView is a custom view for the white rectangle 91 | struct RectangleView: View { 92 | var body: some View { 93 | Rectangle() 94 | .cornerRadius(radius: 100, corners: [.topRight]) 95 | .cornerRadius(3) 96 | .frame(maxHeight: 350) 97 | .foregroundColor(.white) 98 | .padding(.horizontal, 20) 99 | .frame(maxHeight: .infinity, alignment: .bottom) 100 | } 101 | } 102 | 103 | // SkipButton is a button to skip onboarding 104 | struct SkipButton: View { 105 | var action: () -> Void 106 | 107 | var body: some View { 108 | Button(action: action) { 109 | Rectangle() 110 | .frame(width: 60, height: 25) 111 | .foregroundColor(.white) 112 | .cornerRadius(radius: 15, corners: [.topRight]) 113 | .cornerRadius(3) 114 | .overlay { 115 | Text("Skip") 116 | .foregroundColor(.textColor) 117 | .font(.custom("Asap", size: 12)) 118 | .kerning(0.6) 119 | } 120 | } 121 | .frame(maxWidth: .infinity, alignment: .trailing) 122 | .padding(.horizontal, 30) 123 | .buttonStyle(.plain) 124 | } 125 | } 126 | 127 | // OnboardingPagesView is used to display a collection of onboarding pages 128 | struct OnboardingPagesView: View { 129 | @ObservedObject var viewModel: OnboardingViewModel 130 | 131 | var body: some View { 132 | TabView(selection: $viewModel.currentPageIndex) { 133 | ForEach(viewModel.onboardingPages.indices, id: \.self) { index in 134 | OnboardingPageView(page: viewModel.onboardingPages[index]) 135 | } 136 | } 137 | .tabViewStyle(PageTabViewStyle(indexDisplayMode: .never)) 138 | } 139 | } 140 | 141 | // CustomTabIndicator displays page indicators 142 | struct CustomTabIndicator: View { 143 | let pageCount: Int // Total number of onboarding pages 144 | let currentIndex: Int // Current selected page 145 | 146 | var body: some View { 147 | HStack(spacing: 8) { 148 | ForEach(0.. Void 171 | 172 | var body: some View { 173 | Button(action: action) { 174 | Image("back") 175 | .resizable() 176 | .frame(width: 50, height: 50) 177 | } 178 | } 179 | } 180 | 181 | // NextPageButton is a button to navigate to the next page 182 | struct NextPageButton: View { 183 | var action: () -> Void 184 | 185 | var body: some View { 186 | Button(action: action) { 187 | Rectangle() 188 | .fill(.clear) 189 | .frame(width: 50, height: 50) 190 | .commonLinearGradient(colors: [.greenishGray, .oliveGreen]) 191 | .cornerRadius(10) 192 | .cornerRadius(radius: 25, corners: [.topRight]) 193 | .shadow(color: .shadowColor, radius: 7.5, x: 0, y: 5) 194 | .overlay { 195 | Image("Right") 196 | .resizable() 197 | .frame(width: 18, height: 18) 198 | } 199 | } 200 | } 201 | } 202 | 203 | // CornerRadiusShape and CornerRadiusStyle are reused from your code 204 | struct CornerRadiusShape: Shape { 205 | var radius = CGFloat.infinity 206 | var corners = UIRectCorner.allCorners 207 | 208 | func path(in rect: CGRect) -> Path { 209 | let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius)) 210 | return Path(path.cgPath) 211 | } 212 | } 213 | 214 | struct CornerRadiusStyle: ViewModifier { 215 | var radius: CGFloat 216 | var corners: UIRectCorner 217 | 218 | func body(content: Content) -> some View { 219 | content 220 | .clipShape(CornerRadiusShape(radius: radius, corners: corners)) 221 | } 222 | } 223 | 224 | struct OnboardingView_Previews: PreviewProvider { 225 | static var previews: some View { 226 | OnboardingView(viewModel: OnboardingViewModel()) 227 | } 228 | } 229 | 230 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PastelOnBoarding 2 | 3 | | Screen 1 | Screen 2 | Screen 3 | 4 | |--------------------------|--------------------------|--------------------------| 5 | | ![Image 1](App%20Screenshot/Screen1.png)| ![Image 2](App%20Screenshot/Screen2.png)| ![Image 3](App%20Screenshot/Screen3.png)| 6 | 7 | PastelOnBoarding is a SwiftUI-based iOS application that provides an elegant onboarding experience for users. It allows you to introduce your app's features and benefits through beautifully designed pages. 8 | 9 | ## Features 10 | 11 | - 📦 Easy to integrate into your SwiftUI-based iOS project. 12 | - 🌈 Customizable colors and content for each onboarding page. 13 | - 🚀 Smooth transitions and animations to enhance the user experience. 14 | 15 | ## Getting Started 16 | 17 | These instructions will help you get a copy of the project up and running on your local machine for development and testing purposes. 18 | 19 | ### Prerequisites 20 | 21 | - Xcode (11.0 or later) 22 | - macOS (10.15 or later) 23 | 24 | ### Installation 25 | 26 | 1. Clone the repository to your local machine: 27 | 28 | ```shell 29 | git clone https://github.com/kanojiyasmit/PastelOnBoarding.git 30 | cd PastelOnBoarding 31 | --------------------------------------------------------------------------------