├── Onboarding Screen.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── mah.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Onboarding Screen ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-60@2x.png │ │ ├── Icon-60@3x.png │ │ ├── Icon-76.png │ │ ├── Icon-76@2x.png │ │ ├── Icon-83.5@2x.png │ │ ├── Icon-Notification.png │ │ ├── Icon-Notification@2x.png │ │ ├── Icon-Notification@3x.png │ │ ├── Icon-Small-40.png │ │ ├── Icon-Small-40@2x.png │ │ ├── Icon-Small-40@3x.png │ │ ├── Icon-Small.png │ │ ├── Icon-Small@2x.png │ │ ├── Icon-Small@3x.png │ │ └── icon.png │ ├── Characters │ │ ├── Contents.json │ │ ├── character-1.imageset │ │ │ ├── Contents.json │ │ │ └── character-1.png │ │ └── character-2.imageset │ │ │ ├── Contents.json │ │ │ └── character-2.png │ ├── Colors │ │ ├── ColorBlue.colorset │ │ │ └── Contents.json │ │ ├── ColorRed.colorset │ │ │ └── Contents.json │ │ └── Contents.json │ └── Contents.json ├── Onboarding_ScreenApp.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json ├── Screens │ ├── ContentView.swift │ ├── HomeView.swift │ └── OnboardingView.swift ├── Sounds │ ├── chimeup.mp3 │ └── success.m4a ├── Utilities │ └── AudioPlayer.swift └── Views │ └── CircleGroupView.swift ├── Onboarding-Screen-Info.plist └── README.md /Onboarding Screen.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1071552D29CF61940052D657 /* Onboarding_ScreenApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1071552C29CF61940052D657 /* Onboarding_ScreenApp.swift */; }; 11 | 1071552F29CF61940052D657 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1071552E29CF61940052D657 /* ContentView.swift */; }; 12 | 1071553129CF61950052D657 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1071553029CF61950052D657 /* Assets.xcassets */; }; 13 | 1071553429CF61950052D657 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1071553329CF61950052D657 /* Preview Assets.xcassets */; }; 14 | 1071553C29CF62AE0052D657 /* chimeup.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 1071553A29CF62AE0052D657 /* chimeup.mp3 */; }; 15 | 1071553D29CF62AE0052D657 /* success.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 1071553B29CF62AE0052D657 /* success.m4a */; }; 16 | 1071554529CF6C5A0052D657 /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1071554429CF6C5A0052D657 /* OnboardingView.swift */; }; 17 | 1071554729CF6C6F0052D657 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1071554629CF6C6F0052D657 /* HomeView.swift */; }; 18 | 1071554A29D085120052D657 /* CircleGroupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1071554929D085120052D657 /* CircleGroupView.swift */; }; 19 | 10C8039229D885220033B395 /* AudioPlayer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10C8039129D885220033B395 /* AudioPlayer.swift */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXFileReference section */ 23 | 1071552929CF61940052D657 /* Onboarding Screen.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Onboarding Screen.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 24 | 1071552C29CF61940052D657 /* Onboarding_ScreenApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Onboarding_ScreenApp.swift; sourceTree = ""; }; 25 | 1071552E29CF61940052D657 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 26 | 1071553029CF61950052D657 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 27 | 1071553329CF61950052D657 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 28 | 1071553A29CF62AE0052D657 /* chimeup.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; path = chimeup.mp3; sourceTree = ""; }; 29 | 1071553B29CF62AE0052D657 /* success.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = success.m4a; sourceTree = ""; }; 30 | 1071554229CF6B840052D657 /* Onboarding-Screen-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "Onboarding-Screen-Info.plist"; sourceTree = SOURCE_ROOT; }; 31 | 1071554429CF6C5A0052D657 /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingView.swift; sourceTree = ""; }; 32 | 1071554629CF6C6F0052D657 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = ""; }; 33 | 1071554929D085120052D657 /* CircleGroupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CircleGroupView.swift; sourceTree = ""; }; 34 | 10C8039129D885220033B395 /* AudioPlayer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AudioPlayer.swift; sourceTree = ""; }; 35 | /* End PBXFileReference section */ 36 | 37 | /* Begin PBXFrameworksBuildPhase section */ 38 | 1071552629CF61940052D657 /* Frameworks */ = { 39 | isa = PBXFrameworksBuildPhase; 40 | buildActionMask = 2147483647; 41 | files = ( 42 | ); 43 | runOnlyForDeploymentPostprocessing = 0; 44 | }; 45 | /* End PBXFrameworksBuildPhase section */ 46 | 47 | /* Begin PBXGroup section */ 48 | 1071552029CF61940052D657 = { 49 | isa = PBXGroup; 50 | children = ( 51 | 1071552B29CF61940052D657 /* Onboarding Screen */, 52 | 1071552A29CF61940052D657 /* Products */, 53 | ); 54 | sourceTree = ""; 55 | }; 56 | 1071552A29CF61940052D657 /* Products */ = { 57 | isa = PBXGroup; 58 | children = ( 59 | 1071552929CF61940052D657 /* Onboarding Screen.app */, 60 | ); 61 | name = Products; 62 | sourceTree = ""; 63 | }; 64 | 1071552B29CF61940052D657 /* Onboarding Screen */ = { 65 | isa = PBXGroup; 66 | children = ( 67 | 1071554229CF6B840052D657 /* Onboarding-Screen-Info.plist */, 68 | 1071554129CF651C0052D657 /* Utilities */, 69 | 1071554029CF64FC0052D657 /* Views */, 70 | 1071553F29CF64EF0052D657 /* Screens */, 71 | 1071553E29CF630A0052D657 /* Sounds */, 72 | 1071552C29CF61940052D657 /* Onboarding_ScreenApp.swift */, 73 | 1071553029CF61950052D657 /* Assets.xcassets */, 74 | 1071553229CF61950052D657 /* Preview Content */, 75 | ); 76 | path = "Onboarding Screen"; 77 | sourceTree = ""; 78 | }; 79 | 1071553229CF61950052D657 /* Preview Content */ = { 80 | isa = PBXGroup; 81 | children = ( 82 | 1071553329CF61950052D657 /* Preview Assets.xcassets */, 83 | ); 84 | path = "Preview Content"; 85 | sourceTree = ""; 86 | }; 87 | 1071553E29CF630A0052D657 /* Sounds */ = { 88 | isa = PBXGroup; 89 | children = ( 90 | 1071553A29CF62AE0052D657 /* chimeup.mp3 */, 91 | 1071553B29CF62AE0052D657 /* success.m4a */, 92 | ); 93 | path = Sounds; 94 | sourceTree = ""; 95 | }; 96 | 1071553F29CF64EF0052D657 /* Screens */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 1071552E29CF61940052D657 /* ContentView.swift */, 100 | 1071554429CF6C5A0052D657 /* OnboardingView.swift */, 101 | 1071554629CF6C6F0052D657 /* HomeView.swift */, 102 | ); 103 | path = Screens; 104 | sourceTree = ""; 105 | }; 106 | 1071554029CF64FC0052D657 /* Views */ = { 107 | isa = PBXGroup; 108 | children = ( 109 | 1071554929D085120052D657 /* CircleGroupView.swift */, 110 | ); 111 | path = Views; 112 | sourceTree = ""; 113 | }; 114 | 1071554129CF651C0052D657 /* Utilities */ = { 115 | isa = PBXGroup; 116 | children = ( 117 | 10C8039129D885220033B395 /* AudioPlayer.swift */, 118 | ); 119 | path = Utilities; 120 | sourceTree = ""; 121 | }; 122 | /* End PBXGroup section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | 1071552829CF61940052D657 /* Onboarding Screen */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = 1071553729CF61950052D657 /* Build configuration list for PBXNativeTarget "Onboarding Screen" */; 128 | buildPhases = ( 129 | 1071552529CF61940052D657 /* Sources */, 130 | 1071552629CF61940052D657 /* Frameworks */, 131 | 1071552729CF61940052D657 /* Resources */, 132 | ); 133 | buildRules = ( 134 | ); 135 | dependencies = ( 136 | ); 137 | name = "Onboarding Screen"; 138 | productName = "Onboarding Screen"; 139 | productReference = 1071552929CF61940052D657 /* Onboarding Screen.app */; 140 | productType = "com.apple.product-type.application"; 141 | }; 142 | /* End PBXNativeTarget section */ 143 | 144 | /* Begin PBXProject section */ 145 | 1071552129CF61940052D657 /* Project object */ = { 146 | isa = PBXProject; 147 | attributes = { 148 | BuildIndependentTargetsInParallel = 1; 149 | LastSwiftUpdateCheck = 1420; 150 | LastUpgradeCheck = 1420; 151 | TargetAttributes = { 152 | 1071552829CF61940052D657 = { 153 | CreatedOnToolsVersion = 14.2; 154 | }; 155 | }; 156 | }; 157 | buildConfigurationList = 1071552429CF61940052D657 /* Build configuration list for PBXProject "Onboarding Screen" */; 158 | compatibilityVersion = "Xcode 14.0"; 159 | developmentRegion = en; 160 | hasScannedForEncodings = 0; 161 | knownRegions = ( 162 | en, 163 | Base, 164 | ); 165 | mainGroup = 1071552029CF61940052D657; 166 | productRefGroup = 1071552A29CF61940052D657 /* Products */; 167 | projectDirPath = ""; 168 | projectRoot = ""; 169 | targets = ( 170 | 1071552829CF61940052D657 /* Onboarding Screen */, 171 | ); 172 | }; 173 | /* End PBXProject section */ 174 | 175 | /* Begin PBXResourcesBuildPhase section */ 176 | 1071552729CF61940052D657 /* Resources */ = { 177 | isa = PBXResourcesBuildPhase; 178 | buildActionMask = 2147483647; 179 | files = ( 180 | 1071553D29CF62AE0052D657 /* success.m4a in Resources */, 181 | 1071553C29CF62AE0052D657 /* chimeup.mp3 in Resources */, 182 | 1071553429CF61950052D657 /* Preview Assets.xcassets in Resources */, 183 | 1071553129CF61950052D657 /* Assets.xcassets in Resources */, 184 | ); 185 | runOnlyForDeploymentPostprocessing = 0; 186 | }; 187 | /* End PBXResourcesBuildPhase section */ 188 | 189 | /* Begin PBXSourcesBuildPhase section */ 190 | 1071552529CF61940052D657 /* Sources */ = { 191 | isa = PBXSourcesBuildPhase; 192 | buildActionMask = 2147483647; 193 | files = ( 194 | 1071554A29D085120052D657 /* CircleGroupView.swift in Sources */, 195 | 1071554529CF6C5A0052D657 /* OnboardingView.swift in Sources */, 196 | 1071554729CF6C6F0052D657 /* HomeView.swift in Sources */, 197 | 1071552F29CF61940052D657 /* ContentView.swift in Sources */, 198 | 1071552D29CF61940052D657 /* Onboarding_ScreenApp.swift in Sources */, 199 | 10C8039229D885220033B395 /* AudioPlayer.swift in Sources */, 200 | ); 201 | runOnlyForDeploymentPostprocessing = 0; 202 | }; 203 | /* End PBXSourcesBuildPhase section */ 204 | 205 | /* Begin XCBuildConfiguration section */ 206 | 1071553529CF61950052D657 /* Debug */ = { 207 | isa = XCBuildConfiguration; 208 | buildSettings = { 209 | ALWAYS_SEARCH_USER_PATHS = NO; 210 | CLANG_ANALYZER_NONNULL = YES; 211 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 212 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 213 | CLANG_ENABLE_MODULES = YES; 214 | CLANG_ENABLE_OBJC_ARC = YES; 215 | CLANG_ENABLE_OBJC_WEAK = YES; 216 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 217 | CLANG_WARN_BOOL_CONVERSION = YES; 218 | CLANG_WARN_COMMA = YES; 219 | CLANG_WARN_CONSTANT_CONVERSION = YES; 220 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 221 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 222 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 223 | CLANG_WARN_EMPTY_BODY = YES; 224 | CLANG_WARN_ENUM_CONVERSION = YES; 225 | CLANG_WARN_INFINITE_RECURSION = YES; 226 | CLANG_WARN_INT_CONVERSION = YES; 227 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 228 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 229 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 230 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 231 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 232 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 233 | CLANG_WARN_STRICT_PROTOTYPES = YES; 234 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 235 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 236 | CLANG_WARN_UNREACHABLE_CODE = YES; 237 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 238 | COPY_PHASE_STRIP = NO; 239 | DEBUG_INFORMATION_FORMAT = dwarf; 240 | ENABLE_STRICT_OBJC_MSGSEND = YES; 241 | ENABLE_TESTABILITY = YES; 242 | GCC_C_LANGUAGE_STANDARD = gnu11; 243 | GCC_DYNAMIC_NO_PIC = NO; 244 | GCC_NO_COMMON_BLOCKS = YES; 245 | GCC_OPTIMIZATION_LEVEL = 0; 246 | GCC_PREPROCESSOR_DEFINITIONS = ( 247 | "DEBUG=1", 248 | "$(inherited)", 249 | ); 250 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 251 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 252 | GCC_WARN_UNDECLARED_SELECTOR = YES; 253 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 254 | GCC_WARN_UNUSED_FUNCTION = YES; 255 | GCC_WARN_UNUSED_VARIABLE = YES; 256 | IPHONEOS_DEPLOYMENT_TARGET = 16.2; 257 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 258 | MTL_FAST_MATH = YES; 259 | ONLY_ACTIVE_ARCH = YES; 260 | SDKROOT = iphoneos; 261 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 262 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 263 | }; 264 | name = Debug; 265 | }; 266 | 1071553629CF61950052D657 /* Release */ = { 267 | isa = XCBuildConfiguration; 268 | buildSettings = { 269 | ALWAYS_SEARCH_USER_PATHS = NO; 270 | CLANG_ANALYZER_NONNULL = YES; 271 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 272 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 273 | CLANG_ENABLE_MODULES = YES; 274 | CLANG_ENABLE_OBJC_ARC = YES; 275 | CLANG_ENABLE_OBJC_WEAK = YES; 276 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 277 | CLANG_WARN_BOOL_CONVERSION = YES; 278 | CLANG_WARN_COMMA = YES; 279 | CLANG_WARN_CONSTANT_CONVERSION = YES; 280 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 281 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 282 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 283 | CLANG_WARN_EMPTY_BODY = YES; 284 | CLANG_WARN_ENUM_CONVERSION = YES; 285 | CLANG_WARN_INFINITE_RECURSION = YES; 286 | CLANG_WARN_INT_CONVERSION = YES; 287 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 288 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 289 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 290 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 291 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 292 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 293 | CLANG_WARN_STRICT_PROTOTYPES = YES; 294 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 295 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 296 | CLANG_WARN_UNREACHABLE_CODE = YES; 297 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 298 | COPY_PHASE_STRIP = NO; 299 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 300 | ENABLE_NS_ASSERTIONS = NO; 301 | ENABLE_STRICT_OBJC_MSGSEND = YES; 302 | GCC_C_LANGUAGE_STANDARD = gnu11; 303 | GCC_NO_COMMON_BLOCKS = YES; 304 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 305 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 306 | GCC_WARN_UNDECLARED_SELECTOR = YES; 307 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 308 | GCC_WARN_UNUSED_FUNCTION = YES; 309 | GCC_WARN_UNUSED_VARIABLE = YES; 310 | IPHONEOS_DEPLOYMENT_TARGET = 16.2; 311 | MTL_ENABLE_DEBUG_INFO = NO; 312 | MTL_FAST_MATH = YES; 313 | SDKROOT = iphoneos; 314 | SWIFT_COMPILATION_MODE = wholemodule; 315 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 316 | VALIDATE_PRODUCT = YES; 317 | }; 318 | name = Release; 319 | }; 320 | 1071553829CF61950052D657 /* Debug */ = { 321 | isa = XCBuildConfiguration; 322 | buildSettings = { 323 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 324 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 325 | CODE_SIGN_STYLE = Automatic; 326 | CURRENT_PROJECT_VERSION = 1; 327 | DEVELOPMENT_ASSET_PATHS = "\"Onboarding Screen/Preview Content\""; 328 | ENABLE_PREVIEWS = YES; 329 | GENERATE_INFOPLIST_FILE = YES; 330 | INFOPLIST_FILE = "Onboarding-Screen-Info.plist"; 331 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 332 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 333 | INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; 334 | LD_RUNPATH_SEARCH_PATHS = ( 335 | "$(inherited)", 336 | "@executable_path/Frameworks", 337 | ); 338 | MARKETING_VERSION = 1.0; 339 | PRODUCT_BUNDLE_IDENTIFIER = "com.mdabirhossain.Onboarding-Screen"; 340 | PRODUCT_NAME = "$(TARGET_NAME)"; 341 | SWIFT_EMIT_LOC_STRINGS = YES; 342 | SWIFT_VERSION = 5.0; 343 | TARGETED_DEVICE_FAMILY = "1,2"; 344 | }; 345 | name = Debug; 346 | }; 347 | 1071553929CF61950052D657 /* Release */ = { 348 | isa = XCBuildConfiguration; 349 | buildSettings = { 350 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 351 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 352 | CODE_SIGN_STYLE = Automatic; 353 | CURRENT_PROJECT_VERSION = 1; 354 | DEVELOPMENT_ASSET_PATHS = "\"Onboarding Screen/Preview Content\""; 355 | ENABLE_PREVIEWS = YES; 356 | GENERATE_INFOPLIST_FILE = YES; 357 | INFOPLIST_FILE = "Onboarding-Screen-Info.plist"; 358 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 359 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 360 | INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; 361 | LD_RUNPATH_SEARCH_PATHS = ( 362 | "$(inherited)", 363 | "@executable_path/Frameworks", 364 | ); 365 | MARKETING_VERSION = 1.0; 366 | PRODUCT_BUNDLE_IDENTIFIER = "com.mdabirhossain.Onboarding-Screen"; 367 | PRODUCT_NAME = "$(TARGET_NAME)"; 368 | SWIFT_EMIT_LOC_STRINGS = YES; 369 | SWIFT_VERSION = 5.0; 370 | TARGETED_DEVICE_FAMILY = "1,2"; 371 | }; 372 | name = Release; 373 | }; 374 | /* End XCBuildConfiguration section */ 375 | 376 | /* Begin XCConfigurationList section */ 377 | 1071552429CF61940052D657 /* Build configuration list for PBXProject "Onboarding Screen" */ = { 378 | isa = XCConfigurationList; 379 | buildConfigurations = ( 380 | 1071553529CF61950052D657 /* Debug */, 381 | 1071553629CF61950052D657 /* Release */, 382 | ); 383 | defaultConfigurationIsVisible = 0; 384 | defaultConfigurationName = Release; 385 | }; 386 | 1071553729CF61950052D657 /* Build configuration list for PBXNativeTarget "Onboarding Screen" */ = { 387 | isa = XCConfigurationList; 388 | buildConfigurations = ( 389 | 1071553829CF61950052D657 /* Debug */, 390 | 1071553929CF61950052D657 /* Release */, 391 | ); 392 | defaultConfigurationIsVisible = 0; 393 | defaultConfigurationName = Release; 394 | }; 395 | /* End XCConfigurationList section */ 396 | }; 397 | rootObject = 1071552129CF61940052D657 /* Project object */; 398 | } 399 | -------------------------------------------------------------------------------- /Onboarding Screen.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Onboarding Screen.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Onboarding Screen.xcodeproj/xcuserdata/mah.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Onboarding Screen.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AccentColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "display-p3", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xD6", 9 | "green" : "0xA4", 10 | "red" : "0x53" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-Notification@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-Notification@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-Small@2x.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-Small@3x.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-Small-40@2x.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-Small-40@3x.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-60@2x.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-60@3x.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "size" : "1024x1024", 53 | "idiom" : "ios-marketing", 54 | "filename" : "icon.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-Notification.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-Notification@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-Small.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-Small@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-Small-40.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-Small-40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-76.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-83.5@2x.png", 109 | "scale" : "2x" 110 | } 111 | ], 112 | "info" : { 113 | "version" : 1, 114 | "author" : "xcode" 115 | } 116 | } -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-60@2x.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-60@3x.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-76.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-76@2x.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-83.5@2x.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Notification.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Notification@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Notification@2x.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Notification@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Notification@3x.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small-40.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@2x.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small-40@3x.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small@2x.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/Icon-Small@3x.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/AppIcon.appiconset/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/AppIcon.appiconset/icon.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/Characters/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/Characters/character-1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "character-1.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/Characters/character-1.imageset/character-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/Characters/character-1.imageset/character-1.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/Characters/character-2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "character-2.png", 5 | "idiom" : "universal", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "author" : "xcode", 19 | "version" : 1 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/Characters/character-2.imageset/character-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Assets.xcassets/Characters/character-2.imageset/character-2.png -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/Colors/ColorBlue.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "display-p3", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.839", 9 | "green" : "0.643", 10 | "red" : "0.325" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "display-p3", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.839", 27 | "green" : "0.643", 28 | "red" : "0.325" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/Colors/ColorRed.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x76", 9 | "green" : "0x79", 10 | "red" : "0xC6" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "dark" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0x76", 27 | "green" : "0x79", 28 | "red" : "0xC6" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/Colors/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Onboarding Screen/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Onboarding Screen/Onboarding_ScreenApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Onboarding_ScreenApp.swift 3 | // Onboarding Screen 4 | // 5 | // Created by Md Abir Hossain on 25/3/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct Onboarding_ScreenApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Onboarding Screen/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Onboarding Screen/Screens/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Onboarding Screen 4 | // 5 | // Created by Md Abir Hossain on 25/3/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @AppStorage("onBoarding") var isOnboardingViewActive: Bool = true 12 | 13 | var body: some View { 14 | ZStack { 15 | if isOnboardingViewActive { 16 | OnboardingView() 17 | } else { 18 | HomeView() 19 | } 20 | } 21 | } 22 | } 23 | 24 | struct ContentView_Previews: PreviewProvider { 25 | static var previews: some View { 26 | ContentView() 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Onboarding Screen/Screens/HomeView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HomeView.swift 3 | // Onboarding Screen 4 | // 5 | // Created by Md Abir Hossain on 25/3/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct HomeView: View { 11 | // MARK: - Property 12 | 13 | @AppStorage("onBoarding") var isOnboardingViewActive: Bool = false 14 | @State private var isAnimating = false 15 | 16 | // MARK: - BODY 17 | 18 | var body: some View { 19 | // MARK: - Header 20 | 21 | VStack(spacing: 20) { 22 | 23 | Spacer() 24 | 25 | ZStack { 26 | CircleGroupView(ShapeColor: .gray, ShapeOpacity: 0.1) 27 | 28 | Image("character-2") 29 | .resizable() 30 | .scaledToFit() 31 | .padding() 32 | .offset(y: isAnimating ? 35 : -35) 33 | .animation(.easeOut(duration: 4).repeatForever(), value: isAnimating) 34 | } 35 | 36 | // MARK: - Center 37 | 38 | Text("The time that leads to mastery is dependent on the intensity of our focus") 39 | .font(.title3) 40 | .fontWeight(.light) 41 | .foregroundColor(.secondary) 42 | .padding() 43 | 44 | // MARK: - Footer 45 | 46 | Spacer() 47 | 48 | Button(action: { 49 | // Some action 50 | withAnimation { 51 | playSound(sound: "success", type: "m4a") 52 | isOnboardingViewActive = true 53 | } 54 | }) { 55 | Image(systemName: "arrow.triangle.2.circlepath.circle.fill") 56 | .imageScale(.large) 57 | 58 | Text("Restart") 59 | .font(.system(.title3, design: .rounded)) 60 | .fontWeight(.bold) 61 | } //: Button 62 | .buttonStyle(.borderedProminent) 63 | .buttonBorderShape(.capsule) 64 | .controlSize(.large) 65 | } //: VSTACK 66 | .onAppear(perform: { 67 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5, execute: { 68 | isAnimating = true 69 | }) 70 | }) 71 | } 72 | } 73 | 74 | struct HomeView_Previews: PreviewProvider { 75 | static var previews: some View { 76 | HomeView() 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /Onboarding Screen/Screens/OnboardingView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OnboardingView.swift 3 | // Onboarding Screen 4 | // 5 | // Created by Md Abir Hossain on 25/3/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct OnboardingView: View { 11 | // MARK: - Property 12 | 13 | @AppStorage("onBoarding") var isOnboardingViewActive: Bool = true 14 | 15 | @State private var buttonWidth: Double = UIScreen.main.bounds.width - 80 16 | @State private var buttonOffSet: CGFloat = 0 17 | @State private var isAnimating: Bool = false 18 | @State private var imageOffset: CGSize = .zero // CGSize(width: 0, height: 0) 19 | @State private var indicatorOpacity: Double = 1.0 20 | @State private var textTitle: String = "Share." 21 | 22 | let hapticFeedback = UINotificationFeedbackGenerator() 23 | 24 | // MARK: - BODY 25 | 26 | var body: some View { 27 | ZStack { 28 | Color("ColorBlue") 29 | .ignoresSafeArea(.all, edges: .all) 30 | 31 | VStack(spacing: 20) { 32 | // MARK: - Header 33 | 34 | Spacer() 35 | 36 | VStack(spacing: 0) { 37 | Text(textTitle) 38 | .font(.system(size: 60)) 39 | .fontWeight(.heavy) 40 | .foregroundColor(Color.white) 41 | .transition(.opacity) 42 | .id(textTitle) 43 | 44 | Text(""" 45 | It's not how much we give but 46 | how much love we put into giving 47 | """) 48 | .font(.title3) 49 | .fontWeight(.light) 50 | .foregroundColor(Color.white) 51 | .multilineTextAlignment(.center) 52 | .padding(.horizontal, 10) 53 | } //: Header 54 | .opacity(isAnimating ? 1 : 0) 55 | .offset(y: isAnimating ? 0 : -40) 56 | .animation(.easeOut(duration: 1), value: isAnimating) 57 | 58 | // MARK: - Center 59 | 60 | ZStack { 61 | CircleGroupView(ShapeColor: .white, ShapeOpacity: 0.2) 62 | .offset(x: imageOffset.width * -1) 63 | .blur(radius: abs(imageOffset.width / 5)) 64 | .animation(.easeOut(duration: 1), value: imageOffset) 65 | 66 | Image("character-1") 67 | .resizable() 68 | .scaledToFit() 69 | .opacity(isAnimating ? 1 : 0) 70 | .animation(.easeOut(duration: 0.5), value: isAnimating) 71 | .offset(x: imageOffset.width * 1.2, y: 0) 72 | .rotationEffect(.degrees(Double(imageOffset.width / 20))) 73 | .gesture( 74 | DragGesture() 75 | .onChanged { gesture in 76 | if abs(imageOffset.width) <= 150 { 77 | imageOffset = gesture.translation 78 | 79 | withAnimation(.linear(duration: 0.25)) { 80 | indicatorOpacity = 0 81 | textTitle = "Give." 82 | } 83 | } 84 | } 85 | .onEnded { _ in 86 | imageOffset = .zero 87 | 88 | withAnimation(.linear(duration: 0.25)) { 89 | indicatorOpacity = 1 90 | textTitle = "Share." 91 | } 92 | } 93 | ) //: GESTURE 94 | .animation(.easeOut(duration: 1), value: imageOffset) 95 | } //: Center 96 | .overlay ( 97 | Image(systemName: "arrow.left.and.right.circle") 98 | .font(.system(size: 44, weight: .ultraLight)) 99 | .foregroundColor(Color.white) 100 | .offset(y: 20) 101 | .opacity(isAnimating ? 1 : 0) 102 | .animation(.easeOut(duration: 1).delay(2), value: isAnimating) 103 | .opacity(indicatorOpacity) 104 | , alignment: .bottom 105 | ) 106 | 107 | Spacer() 108 | 109 | // MARK: - Footer 110 | 111 | ZStack { 112 | // Parts of the custom button 113 | 114 | // 1. Background (Static) 115 | 116 | Capsule() 117 | .fill(.white.opacity(0.2)) 118 | 119 | Capsule() 120 | .fill(.white.opacity(0.2)) 121 | .padding(8) 122 | 123 | // 2. Call-to-action (Static) 124 | 125 | Text("Get Started") 126 | .font(.system(.title3, design: .rounded)) 127 | .fontWeight(.bold) 128 | .foregroundColor(Color.white) 129 | .offset(x: 20) 130 | 131 | // 3. Capsule (Dynamic Eidth) 132 | 133 | HStack { 134 | Capsule() 135 | .fill(Color("ColorRed")) 136 | .frame(width: buttonOffSet + 80) 137 | 138 | Spacer() 139 | } 140 | 141 | // 4. Circle Draggable 142 | 143 | HStack { 144 | ZStack { 145 | Circle() 146 | .fill(Color("ColorRed")) 147 | Circle() 148 | .fill(.black.opacity(0.15)) 149 | .padding(8) 150 | Image(systemName: "chevron.right.2") 151 | .font(.system(size: 24, weight: .bold)) 152 | } 153 | .foregroundColor(.white) 154 | .frame(width: 80, height: 80, alignment: .center) 155 | .offset(x: buttonOffSet) 156 | .gesture ( 157 | DragGesture() 158 | .onChanged { gesture in 159 | if gesture.translation.width > 0 && buttonOffSet <= buttonWidth - 80 { 160 | buttonOffSet = gesture.translation.width 161 | } 162 | } 163 | .onEnded { _ in 164 | withAnimation( Animation.easeOut(duration: 0.4) ) { 165 | if buttonOffSet > buttonWidth / 2 { 166 | // HapticFeedback 167 | hapticFeedback.notificationOccurred(.success) 168 | // Sound 169 | playSound(sound: "chimeup", type: "mp3") 170 | buttonOffSet = buttonWidth - 80 171 | isOnboardingViewActive = false 172 | } else { 173 | // HapticFeedback 174 | hapticFeedback.notificationOccurred(.warning) 175 | withAnimation { buttonOffSet = 0 } 176 | } 177 | } 178 | } 179 | ) //: DragGesture 180 | 181 | Spacer() 182 | } //: HSTACK 183 | } //: Footer 184 | .frame(width: buttonWidth, height: 80, alignment: .center) 185 | .padding() 186 | .opacity(isAnimating ? 1 : 0) 187 | .offset(y: isAnimating ? 0 : 40) 188 | .animation(.easeOut(duration: 1), value: isAnimating) 189 | } // : VSTACK 190 | } // : ZSTACK 191 | .onAppear { 192 | isAnimating = true 193 | } 194 | .preferredColorScheme(.dark) 195 | } 196 | } 197 | 198 | struct OnboardingView_Previews: PreviewProvider { 199 | static var previews: some View { 200 | OnboardingView() 201 | } 202 | } 203 | -------------------------------------------------------------------------------- /Onboarding Screen/Sounds/chimeup.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Sounds/chimeup.mp3 -------------------------------------------------------------------------------- /Onboarding Screen/Sounds/success.m4a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mdabirhossain-dev/Onboarding-Screen/f0b5e9cc544ee3055f17d29d5d671b2294e329f4/Onboarding Screen/Sounds/success.m4a -------------------------------------------------------------------------------- /Onboarding Screen/Utilities/AudioPlayer.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AudioPlayer.swift 3 | // Onboarding Screen 4 | // 5 | // Created by Md Abir Hossain on 1/4/23. 6 | // 7 | 8 | import Foundation 9 | import AVFoundation 10 | 11 | var audioPlayer: AVAudioPlayer? 12 | 13 | func playSound(sound: String, type: String) { 14 | if let path = Bundle.main.path(forResource: sound, ofType: type) { 15 | do { 16 | audioPlayer = try AVAudioPlayer(contentsOf: URL(filePath: path)) 17 | audioPlayer?.play() 18 | } catch { 19 | print("Could not play sound file.") 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Onboarding Screen/Views/CircleGroupView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CircleGroupView.swift 3 | // Onboarding Screen 4 | // 5 | // Created by Md Abir Hossain on 26/3/23. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct CircleGroupView: View { 11 | // MARK: - Properties 12 | 13 | @State var ShapeColor: Color 14 | @State var ShapeOpacity: Double 15 | @State private var isAnimating: Bool = false 16 | 17 | var body: some View { 18 | ZStack { 19 | Circle() 20 | .stroke(ShapeColor.opacity(ShapeOpacity), lineWidth: 40) 21 | .frame(width: 260, height: 260, alignment: .center) 22 | Circle() 23 | .stroke(ShapeColor.opacity(ShapeOpacity), lineWidth: 80) 24 | .frame(width: 260, height: 260, alignment: .center) 25 | } //: ZSTACK 26 | .blur(radius: isAnimating ? 0 : 10) 27 | .opacity(isAnimating ? 1 : 0) 28 | .scaleEffect(isAnimating ? 1 : 0) 29 | .animation(.easeOut(duration: 1), value: isAnimating) 30 | .onAppear(perform: { 31 | isAnimating = true 32 | }) 33 | } 34 | } 35 | 36 | struct CircleGroupView_Previews: PreviewProvider { 37 | static var previews: some View { 38 | ZStack { 39 | Color("ColorBlue") 40 | .ignoresSafeArea(.all, edges: .all) 41 | 42 | CircleGroupView(ShapeColor: .white, ShapeOpacity: 0.2) 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Onboarding-Screen-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UILaunchScreen 6 | 7 | UIColorName 8 | ColorBlue 9 | UILaunchScreen 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Onboarding-Screen 2 | Onboarding screen project is demo for any application if need to sho a welcome screen only for the first time. 3 | 4 | This app features draggable gesture and gesture actions. 5 | --------------------------------------------------------------------------------