├── .gitignore ├── L-Swift.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ │ └── Package.resolved │ └── xcuserdata │ │ └── darktech4.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── darktech4.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ └── xcschememanagement.plist ├── L-Swift ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── ButtonColor.colorset │ │ └── Contents.json │ ├── Color │ │ ├── Background.colorset │ │ │ └── Contents.json │ │ ├── Background2.colorset │ │ │ └── Contents.json │ │ ├── BgGray.colorset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── Text.colorset │ │ │ └── Contents.json │ │ ├── Text2.colorset │ │ │ └── Contents.json │ │ └── bgrYellow.colorset │ │ │ └── Contents.json │ ├── Contents.json │ ├── Onboarding │ │ ├── Contents.json │ │ ├── Image 1.imageset │ │ │ └── Contents.json │ │ ├── fview.colorset │ │ │ └── Contents.json │ │ ├── page 1.imageset │ │ │ ├── Contents.json │ │ │ └── virtual-onboarding_1.png │ │ ├── page 2.imageset │ │ │ ├── 523_620e36738edd3.png │ │ │ └── Contents.json │ │ ├── sview.colorset │ │ │ └── Contents.json │ │ └── tview.colorset │ │ │ └── Contents.json │ ├── TabBar2 │ │ ├── Blue.colorset │ │ │ └── Contents.json │ │ └── Contents.json │ ├── placeholder_image.imageset │ │ ├── Contents.json │ │ └── no-photo-or-blank-image-icon-loading-images-or-missing-image-mark-image-not-available-or-image-coming-soon-sign-simple-nature-silhouette-in-frame-isolated-illustration-vector.jpg │ └── side-menu │ │ ├── Contents.json │ │ ├── m1.imageset │ │ ├── Contents.json │ │ └── vecteezy_3d-minimal-notification-bell-icon-with-color-objects_7158460.jpg │ │ ├── m2.imageset │ │ ├── 12Podium_generated.jpg │ │ └── Contents.json │ │ ├── m3.imageset │ │ ├── 181Podium_generated.jpg │ │ └── Contents.json │ │ ├── m4.imageset │ │ ├── Contents.json │ │ └── vecteezy_3d-background-platform-with-blue-glass-modern-background_4243557.jpg │ │ ├── m5.imageset │ │ ├── Contents.json │ │ └── vecteezy_3d-calendar-marked-date-for-important-day-in-purple_7503104.jpg │ │ ├── se.colorset │ │ └── Contents.json │ │ └── sideBG.colorset │ │ └── Contents.json ├── Components │ ├── AnimationsOnCards.swift │ ├── ArcMenuButton.swift │ ├── BubbleTransition │ │ └── BubbleTransition.swift │ ├── CustomSearchbar.swift │ ├── CustomSegmentAnimated │ │ └── CustomSegmentAnimated.swift │ ├── LazyCompositional │ │ ├── CompositionalView.swift │ │ └── HomeCompositionalView.swift │ ├── MovableGrids.swift │ ├── Onboarding │ │ ├── FirstView.swift │ │ ├── HomeOnboardingView.swift │ │ ├── OnboardingView.swift │ │ ├── SecondView.swift │ │ └── TypingEffectView.swift │ ├── Onboarding2 │ │ ├── CustomIndicatorView.swift │ │ ├── CustomTextField.swift │ │ └── HomeOnBoarding2.swift │ ├── ParticleEffects │ │ ├── ParticleEffect.swift │ │ └── ParticleEffectsHome.swift │ ├── PasswordStrength.swift │ ├── SideBarView.swift │ ├── SideMenu │ │ ├── SideMenuView.swift │ │ └── TabViewV.swift │ ├── TabBarLightAnimation │ │ ├── DataTabbarModel.swift │ │ ├── LightShape.swift │ │ └── TabBarLightAnimationView.swift │ ├── Tabbar2 │ │ ├── HomeTabbar2View.swift │ │ ├── TabPosition.swift │ │ └── TabShape.swift │ ├── TabbarAnimation.swift │ └── TimeLineAnimation.swift ├── ContentView.swift ├── Extension │ ├── Color.swift │ └── Views.swift ├── Info.plist ├── L_SwiftApp.swift ├── Models │ ├── ImageModel.swift │ ├── PageIntro.swift │ ├── Particle.swift │ └── Tab.swift ├── Preview Content │ └── Preview Assets.xcassets │ │ └── Contents.json └── ViewModel │ └── ImageFetcher.swift └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | # CocoaPods 2 | Podfile.lock 3 | Pods -------------------------------------------------------------------------------- /L-Swift.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DD2B0F552C1BF686005C6BAA /* TimeLineAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD2B0F542C1BF686005C6BAA /* TimeLineAnimation.swift */; }; 11 | DD3A38D02AD8D5F600BA4100 /* ArcMenuButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3A38CF2AD8D5F600BA4100 /* ArcMenuButton.swift */; }; 12 | DD3A38D82AD8EA6000BA4100 /* CompositionalView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3A38D72AD8EA6000BA4100 /* CompositionalView.swift */; }; 13 | DD3A38DA2AD8ED7B00BA4100 /* HomeCompositionalView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3A38D92AD8ED7B00BA4100 /* HomeCompositionalView.swift */; }; 14 | DD3A38DC2AD8F56000BA4100 /* ImageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3A38DB2AD8F56000BA4100 /* ImageModel.swift */; }; 15 | DD3A38DE2AD8F60200BA4100 /* ImageFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD3A38DD2AD8F60200BA4100 /* ImageFetcher.swift */; }; 16 | DD3A38E12AD8FA8D00BA4100 /* SDWebImageSwiftUI in Frameworks */ = {isa = PBXBuildFile; productRef = DD3A38E02AD8FA8D00BA4100 /* SDWebImageSwiftUI */; }; 17 | DD5032652ACFBD730014585A /* FirstView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5032642ACFBD730014585A /* FirstView.swift */; }; 18 | DD5032682ACFC1DE0014585A /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5032672ACFC1DE0014585A /* Color.swift */; }; 19 | DD5079EC2AD781F300D6535C /* Tab.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5079EB2AD781F300D6535C /* Tab.swift */; }; 20 | DD5079EF2AD7835900D6535C /* HomeTabbar2View.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5079EE2AD7835900D6535C /* HomeTabbar2View.swift */; }; 21 | DD5079F12AD7894B00D6535C /* TabShape.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5079F02AD7894B00D6535C /* TabShape.swift */; }; 22 | DD5079F32AD78A5500D6535C /* TabPosition.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5079F22AD78A5500D6535C /* TabPosition.swift */; }; 23 | DD5079F52AD7922300D6535C /* MovableGrids.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5079F42AD7922300D6535C /* MovableGrids.swift */; }; 24 | DD5079F82AD7E38C00D6535C /* ParticleEffectsHome.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5079F72AD7E38C00D6535C /* ParticleEffectsHome.swift */; }; 25 | DD5079FA2AD7E5ED00D6535C /* ParticleEffect.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5079F92AD7E5ED00D6535C /* ParticleEffect.swift */; }; 26 | DD5079FC2AD7E69D00D6535C /* Particle.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD5079FB2AD7E69D00D6535C /* Particle.swift */; }; 27 | DD528DF42AD64DF80030DCB9 /* PageIntro.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD528DF32AD64DF80030DCB9 /* PageIntro.swift */; }; 28 | DD528DF72AD6520C0030DCB9 /* HomeOnBoarding2.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD528DF62AD6520C0030DCB9 /* HomeOnBoarding2.swift */; }; 29 | DD528DF92AD653EC0030DCB9 /* Views.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD528DF82AD653EC0030DCB9 /* Views.swift */; }; 30 | DD528DFB2AD654D80030DCB9 /* CustomIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD528DFA2AD654D80030DCB9 /* CustomIndicatorView.swift */; }; 31 | DD528DFD2AD659B30030DCB9 /* CustomTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD528DFC2AD659B30030DCB9 /* CustomTextField.swift */; }; 32 | DD766DBE2C1D3BD300197C85 /* SideBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD766DBD2C1D3BD300197C85 /* SideBarView.swift */; }; 33 | DD7FAC3C2ADA24A30099C44F /* CustomSearchbar.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD7FAC3B2ADA24A30099C44F /* CustomSearchbar.swift */; }; 34 | DD871AE02B01D5E200F26360 /* BubbleTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD871ADF2B01D5E200F26360 /* BubbleTransition.swift */; }; 35 | DD92C76C2AD936B700A7A48B /* PasswordStrength.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD92C76B2AD936B700A7A48B /* PasswordStrength.swift */; }; 36 | DDB355572AD38FD800E2B4DB /* TypingEffectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB355562AD38FD800E2B4DB /* TypingEffectView.swift */; }; 37 | DDB355592AD39EEA00E2B4DB /* OnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB355582AD39EEA00E2B4DB /* OnboardingView.swift */; }; 38 | DDB3555B2AD39FFE00E2B4DB /* SecondView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB3555A2AD39FFE00E2B4DB /* SecondView.swift */; }; 39 | DDB3555D2AD3A13100E2B4DB /* HomeOnboardingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB3555C2AD3A13100E2B4DB /* HomeOnboardingView.swift */; }; 40 | DDBB89982ACA6E1B00171024 /* L_SwiftApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDBB89972ACA6E1B00171024 /* L_SwiftApp.swift */; }; 41 | DDBB899A2ACA6E1B00171024 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDBB89992ACA6E1B00171024 /* ContentView.swift */; }; 42 | DDBB899C2ACA6E1D00171024 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DDBB899B2ACA6E1D00171024 /* Assets.xcassets */; }; 43 | DDBB899F2ACA6E1D00171024 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = DDBB899E2ACA6E1D00171024 /* Preview Assets.xcassets */; }; 44 | DDBB89A72ACA6E5B00171024 /* AnimationsOnCards.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDBB89A62ACA6E5B00171024 /* AnimationsOnCards.swift */; }; 45 | DDBB89AA2ACA796B00171024 /* SideMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDBB89A92ACA796B00171024 /* SideMenuView.swift */; }; 46 | DDBB89AC2ACAA0A000171024 /* TabViewV.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDBB89AB2ACAA0A000171024 /* TabViewV.swift */; }; 47 | DDCD1F082C185FFD00BF9786 /* CustomSegmentAnimated.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDCD1F072C185FFD00BF9786 /* CustomSegmentAnimated.swift */; }; 48 | DDDD11F52C207506004503AE /* TabBarLightAnimationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDD11F42C207506004503AE /* TabBarLightAnimationView.swift */; }; 49 | DDDD11F72C207563004503AE /* DataTabbarModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDD11F62C207563004503AE /* DataTabbarModel.swift */; }; 50 | DDDD11F92C2079BF004503AE /* LightShape.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDDD11F82C2079BF004503AE /* LightShape.swift */; }; 51 | DDFCD6AB2ACBA3A0003FAA5D /* TabbarAnimation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFCD6AA2ACBA3A0003FAA5D /* TabbarAnimation.swift */; }; 52 | /* End PBXBuildFile section */ 53 | 54 | /* Begin PBXFileReference section */ 55 | DD1651EA2AF8966B004DB3F5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 56 | DD2B0F542C1BF686005C6BAA /* TimeLineAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimeLineAnimation.swift; sourceTree = ""; }; 57 | DD3A38CF2AD8D5F600BA4100 /* ArcMenuButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArcMenuButton.swift; sourceTree = ""; }; 58 | DD3A38D72AD8EA6000BA4100 /* CompositionalView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CompositionalView.swift; sourceTree = ""; }; 59 | DD3A38D92AD8ED7B00BA4100 /* HomeCompositionalView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeCompositionalView.swift; sourceTree = ""; }; 60 | DD3A38DB2AD8F56000BA4100 /* ImageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageModel.swift; sourceTree = ""; }; 61 | DD3A38DD2AD8F60200BA4100 /* ImageFetcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageFetcher.swift; sourceTree = ""; }; 62 | DD5032642ACFBD730014585A /* FirstView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstView.swift; sourceTree = ""; }; 63 | DD5032672ACFC1DE0014585A /* Color.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = ""; }; 64 | DD5079EB2AD781F300D6535C /* Tab.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tab.swift; sourceTree = ""; }; 65 | DD5079EE2AD7835900D6535C /* HomeTabbar2View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeTabbar2View.swift; sourceTree = ""; }; 66 | DD5079F02AD7894B00D6535C /* TabShape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabShape.swift; sourceTree = ""; }; 67 | DD5079F22AD78A5500D6535C /* TabPosition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabPosition.swift; sourceTree = ""; }; 68 | DD5079F42AD7922300D6535C /* MovableGrids.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MovableGrids.swift; sourceTree = ""; }; 69 | DD5079F72AD7E38C00D6535C /* ParticleEffectsHome.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticleEffectsHome.swift; sourceTree = ""; }; 70 | DD5079F92AD7E5ED00D6535C /* ParticleEffect.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParticleEffect.swift; sourceTree = ""; }; 71 | DD5079FB2AD7E69D00D6535C /* Particle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Particle.swift; sourceTree = ""; }; 72 | DD528DF32AD64DF80030DCB9 /* PageIntro.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PageIntro.swift; sourceTree = ""; }; 73 | DD528DF62AD6520C0030DCB9 /* HomeOnBoarding2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeOnBoarding2.swift; sourceTree = ""; }; 74 | DD528DF82AD653EC0030DCB9 /* Views.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Views.swift; sourceTree = ""; }; 75 | DD528DFA2AD654D80030DCB9 /* CustomIndicatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomIndicatorView.swift; sourceTree = ""; }; 76 | DD528DFC2AD659B30030DCB9 /* CustomTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomTextField.swift; sourceTree = ""; }; 77 | DD766DBD2C1D3BD300197C85 /* SideBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideBarView.swift; sourceTree = ""; }; 78 | DD7FAC3B2ADA24A30099C44F /* CustomSearchbar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomSearchbar.swift; sourceTree = ""; }; 79 | DD871ADF2B01D5E200F26360 /* BubbleTransition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BubbleTransition.swift; sourceTree = ""; }; 80 | DD92C76B2AD936B700A7A48B /* PasswordStrength.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasswordStrength.swift; sourceTree = ""; }; 81 | DDB355562AD38FD800E2B4DB /* TypingEffectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypingEffectView.swift; sourceTree = ""; }; 82 | DDB355582AD39EEA00E2B4DB /* OnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingView.swift; sourceTree = ""; }; 83 | DDB3555A2AD39FFE00E2B4DB /* SecondView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondView.swift; sourceTree = ""; }; 84 | DDB3555C2AD3A13100E2B4DB /* HomeOnboardingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeOnboardingView.swift; sourceTree = ""; }; 85 | DDBB89942ACA6E1B00171024 /* L-Swift.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "L-Swift.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 86 | DDBB89972ACA6E1B00171024 /* L_SwiftApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = L_SwiftApp.swift; sourceTree = ""; }; 87 | DDBB89992ACA6E1B00171024 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 88 | DDBB899B2ACA6E1D00171024 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 89 | DDBB899E2ACA6E1D00171024 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 90 | DDBB89A62ACA6E5B00171024 /* AnimationsOnCards.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnimationsOnCards.swift; sourceTree = ""; }; 91 | DDBB89A92ACA796B00171024 /* SideMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SideMenuView.swift; sourceTree = ""; }; 92 | DDBB89AB2ACAA0A000171024 /* TabViewV.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabViewV.swift; sourceTree = ""; }; 93 | DDCD1F072C185FFD00BF9786 /* CustomSegmentAnimated.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CustomSegmentAnimated.swift; sourceTree = ""; }; 94 | DDDD11F42C207506004503AE /* TabBarLightAnimationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabBarLightAnimationView.swift; sourceTree = ""; }; 95 | DDDD11F62C207563004503AE /* DataTabbarModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataTabbarModel.swift; sourceTree = ""; }; 96 | DDDD11F82C2079BF004503AE /* LightShape.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LightShape.swift; sourceTree = ""; }; 97 | DDFCD6AA2ACBA3A0003FAA5D /* TabbarAnimation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabbarAnimation.swift; sourceTree = ""; }; 98 | /* End PBXFileReference section */ 99 | 100 | /* Begin PBXFrameworksBuildPhase section */ 101 | DDBB89912ACA6E1B00171024 /* Frameworks */ = { 102 | isa = PBXFrameworksBuildPhase; 103 | buildActionMask = 2147483647; 104 | files = ( 105 | DD3A38E12AD8FA8D00BA4100 /* SDWebImageSwiftUI in Frameworks */, 106 | ); 107 | runOnlyForDeploymentPostprocessing = 0; 108 | }; 109 | /* End PBXFrameworksBuildPhase section */ 110 | 111 | /* Begin PBXGroup section */ 112 | DD3A38D52AD8E96B00BA4100 /* ViewModel */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | DD3A38DD2AD8F60200BA4100 /* ImageFetcher.swift */, 116 | ); 117 | path = ViewModel; 118 | sourceTree = ""; 119 | }; 120 | DD3A38D62AD8EA2600BA4100 /* LazyCompositional */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | DD3A38D72AD8EA6000BA4100 /* CompositionalView.swift */, 124 | DD3A38D92AD8ED7B00BA4100 /* HomeCompositionalView.swift */, 125 | ); 126 | path = LazyCompositional; 127 | sourceTree = ""; 128 | }; 129 | DD5032632ACFBD460014585A /* Onboarding */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | DD5032642ACFBD730014585A /* FirstView.swift */, 133 | DDB355562AD38FD800E2B4DB /* TypingEffectView.swift */, 134 | DDB355582AD39EEA00E2B4DB /* OnboardingView.swift */, 135 | DDB3555A2AD39FFE00E2B4DB /* SecondView.swift */, 136 | DDB3555C2AD3A13100E2B4DB /* HomeOnboardingView.swift */, 137 | ); 138 | path = Onboarding; 139 | sourceTree = ""; 140 | }; 141 | DD5032662ACFC1D00014585A /* Extension */ = { 142 | isa = PBXGroup; 143 | children = ( 144 | DD528DF82AD653EC0030DCB9 /* Views.swift */, 145 | DD5032672ACFC1DE0014585A /* Color.swift */, 146 | ); 147 | path = Extension; 148 | sourceTree = ""; 149 | }; 150 | DD5079ED2AD7832100D6535C /* Tabbar2 */ = { 151 | isa = PBXGroup; 152 | children = ( 153 | DD5079EE2AD7835900D6535C /* HomeTabbar2View.swift */, 154 | DD5079F22AD78A5500D6535C /* TabPosition.swift */, 155 | DD5079F02AD7894B00D6535C /* TabShape.swift */, 156 | ); 157 | path = Tabbar2; 158 | sourceTree = ""; 159 | }; 160 | DD5079F62AD7E33E00D6535C /* ParticleEffects */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | DD5079F72AD7E38C00D6535C /* ParticleEffectsHome.swift */, 164 | DD5079F92AD7E5ED00D6535C /* ParticleEffect.swift */, 165 | ); 166 | path = ParticleEffects; 167 | sourceTree = ""; 168 | }; 169 | DD528DF22AD64DDD0030DCB9 /* Models */ = { 170 | isa = PBXGroup; 171 | children = ( 172 | DD528DF32AD64DF80030DCB9 /* PageIntro.swift */, 173 | DD5079EB2AD781F300D6535C /* Tab.swift */, 174 | DD5079FB2AD7E69D00D6535C /* Particle.swift */, 175 | DD3A38DB2AD8F56000BA4100 /* ImageModel.swift */, 176 | ); 177 | path = Models; 178 | sourceTree = ""; 179 | }; 180 | DD528DF52AD651BE0030DCB9 /* Onboarding2 */ = { 181 | isa = PBXGroup; 182 | children = ( 183 | DD528DF62AD6520C0030DCB9 /* HomeOnBoarding2.swift */, 184 | DD528DFC2AD659B30030DCB9 /* CustomTextField.swift */, 185 | DD528DFA2AD654D80030DCB9 /* CustomIndicatorView.swift */, 186 | ); 187 | path = Onboarding2; 188 | sourceTree = ""; 189 | }; 190 | DD871ADE2B01D5C200F26360 /* BubbleTransition */ = { 191 | isa = PBXGroup; 192 | children = ( 193 | DD871ADF2B01D5E200F26360 /* BubbleTransition.swift */, 194 | ); 195 | path = BubbleTransition; 196 | sourceTree = ""; 197 | }; 198 | DDBB898B2ACA6E1B00171024 = { 199 | isa = PBXGroup; 200 | children = ( 201 | DDBB89962ACA6E1B00171024 /* L-Swift */, 202 | DDBB89952ACA6E1B00171024 /* Products */, 203 | ); 204 | sourceTree = ""; 205 | }; 206 | DDBB89952ACA6E1B00171024 /* Products */ = { 207 | isa = PBXGroup; 208 | children = ( 209 | DDBB89942ACA6E1B00171024 /* L-Swift.app */, 210 | ); 211 | name = Products; 212 | sourceTree = ""; 213 | }; 214 | DDBB89962ACA6E1B00171024 /* L-Swift */ = { 215 | isa = PBXGroup; 216 | children = ( 217 | DD1651EA2AF8966B004DB3F5 /* Info.plist */, 218 | DD3A38D52AD8E96B00BA4100 /* ViewModel */, 219 | DD528DF22AD64DDD0030DCB9 /* Models */, 220 | DD5032662ACFC1D00014585A /* Extension */, 221 | DDBB89A52ACA6E3C00171024 /* Components */, 222 | DDBB89972ACA6E1B00171024 /* L_SwiftApp.swift */, 223 | DDBB89992ACA6E1B00171024 /* ContentView.swift */, 224 | DDBB899B2ACA6E1D00171024 /* Assets.xcassets */, 225 | DDBB899D2ACA6E1D00171024 /* Preview Content */, 226 | ); 227 | path = "L-Swift"; 228 | sourceTree = ""; 229 | }; 230 | DDBB899D2ACA6E1D00171024 /* Preview Content */ = { 231 | isa = PBXGroup; 232 | children = ( 233 | DDBB899E2ACA6E1D00171024 /* Preview Assets.xcassets */, 234 | ); 235 | path = "Preview Content"; 236 | sourceTree = ""; 237 | }; 238 | DDBB89A52ACA6E3C00171024 /* Components */ = { 239 | isa = PBXGroup; 240 | children = ( 241 | DD766DBD2C1D3BD300197C85 /* SideBarView.swift */, 242 | DDBB89A62ACA6E5B00171024 /* AnimationsOnCards.swift */, 243 | DD3A38CF2AD8D5F600BA4100 /* ArcMenuButton.swift */, 244 | DD7FAC3B2ADA24A30099C44F /* CustomSearchbar.swift */, 245 | DD5079F42AD7922300D6535C /* MovableGrids.swift */, 246 | DD92C76B2AD936B700A7A48B /* PasswordStrength.swift */, 247 | DDFCD6AA2ACBA3A0003FAA5D /* TabbarAnimation.swift */, 248 | DD2B0F542C1BF686005C6BAA /* TimeLineAnimation.swift */, 249 | DDDD11F32C2074EE004503AE /* TabBarLightAnimation */, 250 | DD871ADE2B01D5C200F26360 /* BubbleTransition */, 251 | DDCD1F062C185FFD00BF9786 /* CustomSegmentAnimated */, 252 | DD3A38D62AD8EA2600BA4100 /* LazyCompositional */, 253 | DD5032632ACFBD460014585A /* Onboarding */, 254 | DD528DF52AD651BE0030DCB9 /* Onboarding2 */, 255 | DD5079F62AD7E33E00D6535C /* ParticleEffects */, 256 | DDBB89A82ACA794F00171024 /* SideMenu */, 257 | DD5079ED2AD7832100D6535C /* Tabbar2 */, 258 | ); 259 | path = Components; 260 | sourceTree = ""; 261 | }; 262 | DDBB89A82ACA794F00171024 /* SideMenu */ = { 263 | isa = PBXGroup; 264 | children = ( 265 | DDBB89A92ACA796B00171024 /* SideMenuView.swift */, 266 | DDBB89AB2ACAA0A000171024 /* TabViewV.swift */, 267 | ); 268 | path = SideMenu; 269 | sourceTree = ""; 270 | }; 271 | DDCD1F062C185FFD00BF9786 /* CustomSegmentAnimated */ = { 272 | isa = PBXGroup; 273 | children = ( 274 | DDCD1F072C185FFD00BF9786 /* CustomSegmentAnimated.swift */, 275 | ); 276 | path = CustomSegmentAnimated; 277 | sourceTree = ""; 278 | }; 279 | DDDD11F32C2074EE004503AE /* TabBarLightAnimation */ = { 280 | isa = PBXGroup; 281 | children = ( 282 | DDDD11F42C207506004503AE /* TabBarLightAnimationView.swift */, 283 | DDDD11F62C207563004503AE /* DataTabbarModel.swift */, 284 | DDDD11F82C2079BF004503AE /* LightShape.swift */, 285 | ); 286 | path = TabBarLightAnimation; 287 | sourceTree = ""; 288 | }; 289 | /* End PBXGroup section */ 290 | 291 | /* Begin PBXNativeTarget section */ 292 | DDBB89932ACA6E1B00171024 /* L-Swift */ = { 293 | isa = PBXNativeTarget; 294 | buildConfigurationList = DDBB89A22ACA6E1D00171024 /* Build configuration list for PBXNativeTarget "L-Swift" */; 295 | buildPhases = ( 296 | DDBB89902ACA6E1B00171024 /* Sources */, 297 | DDBB89912ACA6E1B00171024 /* Frameworks */, 298 | DDBB89922ACA6E1B00171024 /* Resources */, 299 | ); 300 | buildRules = ( 301 | ); 302 | dependencies = ( 303 | ); 304 | name = "L-Swift"; 305 | packageProductDependencies = ( 306 | DD3A38E02AD8FA8D00BA4100 /* SDWebImageSwiftUI */, 307 | ); 308 | productName = "L-Swift"; 309 | productReference = DDBB89942ACA6E1B00171024 /* L-Swift.app */; 310 | productType = "com.apple.product-type.application"; 311 | }; 312 | /* End PBXNativeTarget section */ 313 | 314 | /* Begin PBXProject section */ 315 | DDBB898C2ACA6E1B00171024 /* Project object */ = { 316 | isa = PBXProject; 317 | attributes = { 318 | BuildIndependentTargetsInParallel = 1; 319 | LastSwiftUpdateCheck = 1420; 320 | LastUpgradeCheck = 1420; 321 | TargetAttributes = { 322 | DDBB89932ACA6E1B00171024 = { 323 | CreatedOnToolsVersion = 14.2; 324 | }; 325 | }; 326 | }; 327 | buildConfigurationList = DDBB898F2ACA6E1B00171024 /* Build configuration list for PBXProject "L-Swift" */; 328 | compatibilityVersion = "Xcode 14.0"; 329 | developmentRegion = en; 330 | hasScannedForEncodings = 0; 331 | knownRegions = ( 332 | en, 333 | Base, 334 | ); 335 | mainGroup = DDBB898B2ACA6E1B00171024; 336 | packageReferences = ( 337 | DD3A38DF2AD8FA8D00BA4100 /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */, 338 | ); 339 | productRefGroup = DDBB89952ACA6E1B00171024 /* Products */; 340 | projectDirPath = ""; 341 | projectRoot = ""; 342 | targets = ( 343 | DDBB89932ACA6E1B00171024 /* L-Swift */, 344 | ); 345 | }; 346 | /* End PBXProject section */ 347 | 348 | /* Begin PBXResourcesBuildPhase section */ 349 | DDBB89922ACA6E1B00171024 /* Resources */ = { 350 | isa = PBXResourcesBuildPhase; 351 | buildActionMask = 2147483647; 352 | files = ( 353 | DDBB899F2ACA6E1D00171024 /* Preview Assets.xcassets in Resources */, 354 | DDBB899C2ACA6E1D00171024 /* Assets.xcassets in Resources */, 355 | ); 356 | runOnlyForDeploymentPostprocessing = 0; 357 | }; 358 | /* End PBXResourcesBuildPhase section */ 359 | 360 | /* Begin PBXSourcesBuildPhase section */ 361 | DDBB89902ACA6E1B00171024 /* Sources */ = { 362 | isa = PBXSourcesBuildPhase; 363 | buildActionMask = 2147483647; 364 | files = ( 365 | DD528DF72AD6520C0030DCB9 /* HomeOnBoarding2.swift in Sources */, 366 | DD5079FC2AD7E69D00D6535C /* Particle.swift in Sources */, 367 | DD528DF42AD64DF80030DCB9 /* PageIntro.swift in Sources */, 368 | DD5032652ACFBD730014585A /* FirstView.swift in Sources */, 369 | DDFCD6AB2ACBA3A0003FAA5D /* TabbarAnimation.swift in Sources */, 370 | DDBB899A2ACA6E1B00171024 /* ContentView.swift in Sources */, 371 | DD871AE02B01D5E200F26360 /* BubbleTransition.swift in Sources */, 372 | DDDD11F92C2079BF004503AE /* LightShape.swift in Sources */, 373 | DD5079EF2AD7835900D6535C /* HomeTabbar2View.swift in Sources */, 374 | DDB355592AD39EEA00E2B4DB /* OnboardingView.swift in Sources */, 375 | DDBB89AC2ACAA0A000171024 /* TabViewV.swift in Sources */, 376 | DD3A38DE2AD8F60200BA4100 /* ImageFetcher.swift in Sources */, 377 | DD3A38D82AD8EA6000BA4100 /* CompositionalView.swift in Sources */, 378 | DD5079FA2AD7E5ED00D6535C /* ParticleEffect.swift in Sources */, 379 | DD2B0F552C1BF686005C6BAA /* TimeLineAnimation.swift in Sources */, 380 | DD528DFB2AD654D80030DCB9 /* CustomIndicatorView.swift in Sources */, 381 | DD3A38DA2AD8ED7B00BA4100 /* HomeCompositionalView.swift in Sources */, 382 | DD5079F12AD7894B00D6535C /* TabShape.swift in Sources */, 383 | DD528DFD2AD659B30030DCB9 /* CustomTextField.swift in Sources */, 384 | DDB3555B2AD39FFE00E2B4DB /* SecondView.swift in Sources */, 385 | DD528DF92AD653EC0030DCB9 /* Views.swift in Sources */, 386 | DDBB89A72ACA6E5B00171024 /* AnimationsOnCards.swift in Sources */, 387 | DD766DBE2C1D3BD300197C85 /* SideBarView.swift in Sources */, 388 | DD5079F32AD78A5500D6535C /* TabPosition.swift in Sources */, 389 | DD92C76C2AD936B700A7A48B /* PasswordStrength.swift in Sources */, 390 | DD3A38DC2AD8F56000BA4100 /* ImageModel.swift in Sources */, 391 | DD7FAC3C2ADA24A30099C44F /* CustomSearchbar.swift in Sources */, 392 | DD5079F82AD7E38C00D6535C /* ParticleEffectsHome.swift in Sources */, 393 | DD5032682ACFC1DE0014585A /* Color.swift in Sources */, 394 | DD5079F52AD7922300D6535C /* MovableGrids.swift in Sources */, 395 | DDDD11F72C207563004503AE /* DataTabbarModel.swift in Sources */, 396 | DDBB89AA2ACA796B00171024 /* SideMenuView.swift in Sources */, 397 | DDB355572AD38FD800E2B4DB /* TypingEffectView.swift in Sources */, 398 | DDCD1F082C185FFD00BF9786 /* CustomSegmentAnimated.swift in Sources */, 399 | DD5079EC2AD781F300D6535C /* Tab.swift in Sources */, 400 | DD3A38D02AD8D5F600BA4100 /* ArcMenuButton.swift in Sources */, 401 | DDDD11F52C207506004503AE /* TabBarLightAnimationView.swift in Sources */, 402 | DDB3555D2AD3A13100E2B4DB /* HomeOnboardingView.swift in Sources */, 403 | DDBB89982ACA6E1B00171024 /* L_SwiftApp.swift in Sources */, 404 | ); 405 | runOnlyForDeploymentPostprocessing = 0; 406 | }; 407 | /* End PBXSourcesBuildPhase section */ 408 | 409 | /* Begin XCBuildConfiguration section */ 410 | DDBB89A02ACA6E1D00171024 /* Debug */ = { 411 | isa = XCBuildConfiguration; 412 | buildSettings = { 413 | ALWAYS_SEARCH_USER_PATHS = NO; 414 | CLANG_ANALYZER_NONNULL = YES; 415 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 416 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 417 | CLANG_ENABLE_MODULES = YES; 418 | CLANG_ENABLE_OBJC_ARC = YES; 419 | CLANG_ENABLE_OBJC_WEAK = YES; 420 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 421 | CLANG_WARN_BOOL_CONVERSION = YES; 422 | CLANG_WARN_COMMA = YES; 423 | CLANG_WARN_CONSTANT_CONVERSION = YES; 424 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 425 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 426 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 427 | CLANG_WARN_EMPTY_BODY = YES; 428 | CLANG_WARN_ENUM_CONVERSION = YES; 429 | CLANG_WARN_INFINITE_RECURSION = YES; 430 | CLANG_WARN_INT_CONVERSION = YES; 431 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 432 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 433 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 434 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 435 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 436 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 437 | CLANG_WARN_STRICT_PROTOTYPES = YES; 438 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 439 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 440 | CLANG_WARN_UNREACHABLE_CODE = YES; 441 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 442 | COPY_PHASE_STRIP = NO; 443 | DEBUG_INFORMATION_FORMAT = dwarf; 444 | ENABLE_STRICT_OBJC_MSGSEND = YES; 445 | ENABLE_TESTABILITY = YES; 446 | GCC_C_LANGUAGE_STANDARD = gnu11; 447 | GCC_DYNAMIC_NO_PIC = NO; 448 | GCC_NO_COMMON_BLOCKS = YES; 449 | GCC_OPTIMIZATION_LEVEL = 0; 450 | GCC_PREPROCESSOR_DEFINITIONS = ( 451 | "DEBUG=1", 452 | "$(inherited)", 453 | ); 454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 455 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 456 | GCC_WARN_UNDECLARED_SELECTOR = YES; 457 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 458 | GCC_WARN_UNUSED_FUNCTION = YES; 459 | GCC_WARN_UNUSED_VARIABLE = YES; 460 | IPHONEOS_DEPLOYMENT_TARGET = 16.2; 461 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 462 | MTL_FAST_MATH = YES; 463 | ONLY_ACTIVE_ARCH = YES; 464 | SDKROOT = iphoneos; 465 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 466 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 467 | }; 468 | name = Debug; 469 | }; 470 | DDBB89A12ACA6E1D00171024 /* Release */ = { 471 | isa = XCBuildConfiguration; 472 | buildSettings = { 473 | ALWAYS_SEARCH_USER_PATHS = NO; 474 | CLANG_ANALYZER_NONNULL = YES; 475 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 476 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 477 | CLANG_ENABLE_MODULES = YES; 478 | CLANG_ENABLE_OBJC_ARC = YES; 479 | CLANG_ENABLE_OBJC_WEAK = YES; 480 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 481 | CLANG_WARN_BOOL_CONVERSION = YES; 482 | CLANG_WARN_COMMA = YES; 483 | CLANG_WARN_CONSTANT_CONVERSION = YES; 484 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 485 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 486 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 487 | CLANG_WARN_EMPTY_BODY = YES; 488 | CLANG_WARN_ENUM_CONVERSION = YES; 489 | CLANG_WARN_INFINITE_RECURSION = YES; 490 | CLANG_WARN_INT_CONVERSION = YES; 491 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 492 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 493 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 494 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 495 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 496 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 497 | CLANG_WARN_STRICT_PROTOTYPES = YES; 498 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 499 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 500 | CLANG_WARN_UNREACHABLE_CODE = YES; 501 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 502 | COPY_PHASE_STRIP = NO; 503 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 504 | ENABLE_NS_ASSERTIONS = NO; 505 | ENABLE_STRICT_OBJC_MSGSEND = YES; 506 | GCC_C_LANGUAGE_STANDARD = gnu11; 507 | GCC_NO_COMMON_BLOCKS = YES; 508 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 509 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 510 | GCC_WARN_UNDECLARED_SELECTOR = YES; 511 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 512 | GCC_WARN_UNUSED_FUNCTION = YES; 513 | GCC_WARN_UNUSED_VARIABLE = YES; 514 | IPHONEOS_DEPLOYMENT_TARGET = 16.2; 515 | MTL_ENABLE_DEBUG_INFO = NO; 516 | MTL_FAST_MATH = YES; 517 | SDKROOT = iphoneos; 518 | SWIFT_COMPILATION_MODE = wholemodule; 519 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 520 | VALIDATE_PRODUCT = YES; 521 | }; 522 | name = Release; 523 | }; 524 | DDBB89A32ACA6E1D00171024 /* Debug */ = { 525 | isa = XCBuildConfiguration; 526 | buildSettings = { 527 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 528 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 529 | CODE_SIGN_STYLE = Automatic; 530 | CURRENT_PROJECT_VERSION = 1; 531 | DEVELOPMENT_ASSET_PATHS = "\"L-Swift/Preview Content\""; 532 | DEVELOPMENT_TEAM = 4BB9BFSL47; 533 | ENABLE_PREVIEWS = YES; 534 | GENERATE_INFOPLIST_FILE = YES; 535 | INFOPLIST_FILE = "L-Swift/Info.plist"; 536 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 537 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 538 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 539 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 540 | LD_RUNPATH_SEARCH_PATHS = ( 541 | "$(inherited)", 542 | "@executable_path/Frameworks", 543 | ); 544 | MARKETING_VERSION = 1.0; 545 | PRODUCT_BUNDLE_IDENTIFIER = "com.a.L-Swift"; 546 | PRODUCT_NAME = "$(TARGET_NAME)"; 547 | SWIFT_EMIT_LOC_STRINGS = YES; 548 | SWIFT_VERSION = 5.0; 549 | TARGETED_DEVICE_FAMILY = "1,2"; 550 | }; 551 | name = Debug; 552 | }; 553 | DDBB89A42ACA6E1D00171024 /* Release */ = { 554 | isa = XCBuildConfiguration; 555 | buildSettings = { 556 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 557 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 558 | CODE_SIGN_STYLE = Automatic; 559 | CURRENT_PROJECT_VERSION = 1; 560 | DEVELOPMENT_ASSET_PATHS = "\"L-Swift/Preview Content\""; 561 | DEVELOPMENT_TEAM = 4BB9BFSL47; 562 | ENABLE_PREVIEWS = YES; 563 | GENERATE_INFOPLIST_FILE = YES; 564 | INFOPLIST_FILE = "L-Swift/Info.plist"; 565 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 566 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 567 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 568 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 569 | LD_RUNPATH_SEARCH_PATHS = ( 570 | "$(inherited)", 571 | "@executable_path/Frameworks", 572 | ); 573 | MARKETING_VERSION = 1.0; 574 | PRODUCT_BUNDLE_IDENTIFIER = "com.a.L-Swift"; 575 | PRODUCT_NAME = "$(TARGET_NAME)"; 576 | SWIFT_EMIT_LOC_STRINGS = YES; 577 | SWIFT_VERSION = 5.0; 578 | TARGETED_DEVICE_FAMILY = "1,2"; 579 | }; 580 | name = Release; 581 | }; 582 | /* End XCBuildConfiguration section */ 583 | 584 | /* Begin XCConfigurationList section */ 585 | DDBB898F2ACA6E1B00171024 /* Build configuration list for PBXProject "L-Swift" */ = { 586 | isa = XCConfigurationList; 587 | buildConfigurations = ( 588 | DDBB89A02ACA6E1D00171024 /* Debug */, 589 | DDBB89A12ACA6E1D00171024 /* Release */, 590 | ); 591 | defaultConfigurationIsVisible = 0; 592 | defaultConfigurationName = Release; 593 | }; 594 | DDBB89A22ACA6E1D00171024 /* Build configuration list for PBXNativeTarget "L-Swift" */ = { 595 | isa = XCConfigurationList; 596 | buildConfigurations = ( 597 | DDBB89A32ACA6E1D00171024 /* Debug */, 598 | DDBB89A42ACA6E1D00171024 /* Release */, 599 | ); 600 | defaultConfigurationIsVisible = 0; 601 | defaultConfigurationName = Release; 602 | }; 603 | /* End XCConfigurationList section */ 604 | 605 | /* Begin XCRemoteSwiftPackageReference section */ 606 | DD3A38DF2AD8FA8D00BA4100 /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */ = { 607 | isa = XCRemoteSwiftPackageReference; 608 | repositoryURL = "https://github.com/SDWebImage/SDWebImageSwiftUI"; 609 | requirement = { 610 | kind = upToNextMajorVersion; 611 | minimumVersion = 2.0.0; 612 | }; 613 | }; 614 | /* End XCRemoteSwiftPackageReference section */ 615 | 616 | /* Begin XCSwiftPackageProductDependency section */ 617 | DD3A38E02AD8FA8D00BA4100 /* SDWebImageSwiftUI */ = { 618 | isa = XCSwiftPackageProductDependency; 619 | package = DD3A38DF2AD8FA8D00BA4100 /* XCRemoteSwiftPackageReference "SDWebImageSwiftUI" */; 620 | productName = SDWebImageSwiftUI; 621 | }; 622 | /* End XCSwiftPackageProductDependency section */ 623 | }; 624 | rootObject = DDBB898C2ACA6E1B00171024 /* Project object */; 625 | } 626 | -------------------------------------------------------------------------------- /L-Swift.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /L-Swift.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /L-Swift.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "sdwebimage", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/SDWebImage/SDWebImage.git", 7 | "state" : { 8 | "revision" : "1f06ef5007b6a580b3873ed2adee19e05d3b215a", 9 | "version" : "5.18.3" 10 | } 11 | }, 12 | { 13 | "identity" : "sdwebimageswiftui", 14 | "kind" : "remoteSourceControl", 15 | "location" : "https://github.com/SDWebImage/SDWebImageSwiftUI", 16 | "state" : { 17 | "revision" : "e837c37d45449fbd3b4745c10c5b5274e73edead", 18 | "version" : "2.2.3" 19 | } 20 | } 21 | ], 22 | "version" : 2 23 | } 24 | -------------------------------------------------------------------------------- /L-Swift.xcodeproj/project.xcworkspace/xcuserdata/darktech4.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xqsadness/SwiftUI-Animation/276423fa9b481e7c8a999b0725c1603a10d951a2/L-Swift.xcodeproj/project.xcworkspace/xcuserdata/darktech4.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /L-Swift.xcodeproj/xcuserdata/darktech4.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /L-Swift.xcodeproj/xcuserdata/darktech4.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | L-Swift.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /L-Swift/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 | -------------------------------------------------------------------------------- /L-Swift/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 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/ButtonColor.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x1E", 9 | "green" : "0x1E", 10 | "red" : "0x1E" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Color/Background.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "1.000", 9 | "green" : "1.000", 10 | "red" : "1.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "light" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "1.000", 27 | "green" : "1.000", 28 | "red" : "1.000" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | }, 33 | { 34 | "appearances" : [ 35 | { 36 | "appearance" : "luminosity", 37 | "value" : "dark" 38 | } 39 | ], 40 | "color" : { 41 | "color-space" : "srgb", 42 | "components" : { 43 | "alpha" : "1.000", 44 | "blue" : "0.039", 45 | "green" : "0.008", 46 | "red" : "0.031" 47 | } 48 | }, 49 | "idiom" : "universal" 50 | } 51 | ], 52 | "info" : { 53 | "author" : "xcode", 54 | "version" : 1 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Color/Background2.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.580", 9 | "green" : "0.580", 10 | "red" : "0.580" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "light" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.580", 27 | "green" : "0.580", 28 | "red" : "0.580" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | }, 33 | { 34 | "appearances" : [ 35 | { 36 | "appearance" : "luminosity", 37 | "value" : "dark" 38 | } 39 | ], 40 | "color" : { 41 | "color-space" : "srgb", 42 | "components" : { 43 | "alpha" : "1.000", 44 | "blue" : "0.145", 45 | "green" : "0.118", 46 | "red" : "0.122" 47 | } 48 | }, 49 | "idiom" : "universal" 50 | } 51 | ], 52 | "info" : { 53 | "author" : "xcode", 54 | "version" : 1 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Color/BgGray.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x22", 9 | "green" : "0x22", 10 | "red" : "0x22" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Color/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Color/Text.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.000", 9 | "green" : "0.000", 10 | "red" : "0.000" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "light" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.000", 27 | "green" : "0.000", 28 | "red" : "0.000" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | }, 33 | { 34 | "appearances" : [ 35 | { 36 | "appearance" : "luminosity", 37 | "value" : "dark" 38 | } 39 | ], 40 | "color" : { 41 | "color-space" : "srgb", 42 | "components" : { 43 | "alpha" : "1.000", 44 | "blue" : "1.000", 45 | "green" : "1.000", 46 | "red" : "1.000" 47 | } 48 | }, 49 | "idiom" : "universal" 50 | } 51 | ], 52 | "info" : { 53 | "author" : "xcode", 54 | "version" : 1 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Color/Text2.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0.925", 9 | "green" : "0.925", 10 | "red" : "0.925" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | }, 15 | { 16 | "appearances" : [ 17 | { 18 | "appearance" : "luminosity", 19 | "value" : "light" 20 | } 21 | ], 22 | "color" : { 23 | "color-space" : "srgb", 24 | "components" : { 25 | "alpha" : "1.000", 26 | "blue" : "0.925", 27 | "green" : "0.925", 28 | "red" : "0.925" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | }, 33 | { 34 | "appearances" : [ 35 | { 36 | "appearance" : "luminosity", 37 | "value" : "dark" 38 | } 39 | ], 40 | "color" : { 41 | "color-space" : "srgb", 42 | "components" : { 43 | "alpha" : "1.000", 44 | "blue" : "0.651", 45 | "green" : "0.651", 46 | "red" : "0.651" 47 | } 48 | }, 49 | "idiom" : "universal" 50 | } 51 | ], 52 | "info" : { 53 | "author" : "xcode", 54 | "version" : 1 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Color/bgrYellow.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x51", 9 | "green" : "0xC9", 10 | "red" : "0xE2" 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" : "0x51", 27 | "green" : "0xC9", 28 | "red" : "0xE2" 29 | } 30 | }, 31 | "idiom" : "universal" 32 | } 33 | ], 34 | "info" : { 35 | "author" : "xcode", 36 | "version" : 1 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Onboarding/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Onboarding/Image 1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "scale" : "2x" 10 | }, 11 | { 12 | "idiom" : "universal", 13 | "scale" : "3x" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Onboarding/fview.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xAB", 9 | "green" : "0x9D", 10 | "red" : "0x7D" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Onboarding/page 1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "virtual-onboarding_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 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Onboarding/page 1.imageset/virtual-onboarding_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xqsadness/SwiftUI-Animation/276423fa9b481e7c8a999b0725c1603a10d951a2/L-Swift/Assets.xcassets/Onboarding/page 1.imageset/virtual-onboarding_1.png -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Onboarding/page 2.imageset/523_620e36738edd3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xqsadness/SwiftUI-Animation/276423fa9b481e7c8a999b0725c1603a10d951a2/L-Swift/Assets.xcassets/Onboarding/page 2.imageset/523_620e36738edd3.png -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Onboarding/page 2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "523_620e36738edd3.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 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Onboarding/sview.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xAE", 9 | "green" : "0xC6", 10 | "red" : "0xD7" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/Onboarding/tview.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xDB", 9 | "green" : "0xE4", 10 | "red" : "0xE6" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/TabBar2/Blue.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0xF2", 9 | "green" : "0x96", 10 | "red" : "0x2B" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/TabBar2/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/placeholder_image.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "no-photo-or-blank-image-icon-loading-images-or-missing-image-mark-image-not-available-or-image-coming-soon-sign-simple-nature-silhouette-in-frame-isolated-illustration-vector.jpg", 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 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/placeholder_image.imageset/no-photo-or-blank-image-icon-loading-images-or-missing-image-mark-image-not-available-or-image-coming-soon-sign-simple-nature-silhouette-in-frame-isolated-illustration-vector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xqsadness/SwiftUI-Animation/276423fa9b481e7c8a999b0725c1603a10d951a2/L-Swift/Assets.xcassets/placeholder_image.imageset/no-photo-or-blank-image-icon-loading-images-or-missing-image-mark-image-not-available-or-image-coming-soon-sign-simple-nature-silhouette-in-frame-isolated-illustration-vector.jpg -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/m1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "vecteezy_3d-minimal-notification-bell-icon-with-color-objects_7158460.jpg", 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 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/m1.imageset/vecteezy_3d-minimal-notification-bell-icon-with-color-objects_7158460.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xqsadness/SwiftUI-Animation/276423fa9b481e7c8a999b0725c1603a10d951a2/L-Swift/Assets.xcassets/side-menu/m1.imageset/vecteezy_3d-minimal-notification-bell-icon-with-color-objects_7158460.jpg -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/m2.imageset/12Podium_generated.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xqsadness/SwiftUI-Animation/276423fa9b481e7c8a999b0725c1603a10d951a2/L-Swift/Assets.xcassets/side-menu/m2.imageset/12Podium_generated.jpg -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/m2.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "12Podium_generated.jpg", 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 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/m3.imageset/181Podium_generated.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xqsadness/SwiftUI-Animation/276423fa9b481e7c8a999b0725c1603a10d951a2/L-Swift/Assets.xcassets/side-menu/m3.imageset/181Podium_generated.jpg -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/m3.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "181Podium_generated.jpg", 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 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/m4.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "vecteezy_3d-background-platform-with-blue-glass-modern-background_4243557.jpg", 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 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/m4.imageset/vecteezy_3d-background-platform-with-blue-glass-modern-background_4243557.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xqsadness/SwiftUI-Animation/276423fa9b481e7c8a999b0725c1603a10d951a2/L-Swift/Assets.xcassets/side-menu/m4.imageset/vecteezy_3d-background-platform-with-blue-glass-modern-background_4243557.jpg -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/m5.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "vecteezy_3d-calendar-marked-date-for-important-day-in-purple_7503104.jpg", 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 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/m5.imageset/vecteezy_3d-calendar-marked-date-for-important-day-in-purple_7503104.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xqsadness/SwiftUI-Animation/276423fa9b481e7c8a999b0725c1603a10d951a2/L-Swift/Assets.xcassets/side-menu/m5.imageset/vecteezy_3d-calendar-marked-date-for-important-day-in-purple_7503104.jpg -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/se.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x61", 9 | "green" : "0x39", 10 | "red" : "0x2B" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /L-Swift/Assets.xcassets/side-menu/sideBG.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "color" : { 5 | "color-space" : "srgb", 6 | "components" : { 7 | "alpha" : "1.000", 8 | "blue" : "0x4A", 9 | "green" : "0x25", 10 | "red" : "0x22" 11 | } 12 | }, 13 | "idiom" : "universal" 14 | } 15 | ], 16 | "info" : { 17 | "author" : "xcode", 18 | "version" : 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /L-Swift/Components/AnimationsOnCards.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AnimationsOnCards.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 02/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct AnimationsOnCards: View { 11 | @State var rotation: CGFloat = 0.0 12 | 13 | var body: some View { 14 | ZStack{ 15 | RoundedRectangle(cornerRadius: 20, style: .continuous) 16 | .frame(width: 260, height: 340) 17 | .foregroundColor(.black) 18 | 19 | RoundedRectangle(cornerRadius: 20, style: .continuous) 20 | .frame(width: 500, height: 200) 21 | .foregroundStyle(LinearGradient (gradient: Gradient (colors: 22 | [.red.opacity(0.4),.orange, .yellow, .green, .blue,.purple,.pink.opacity(0.4)]), startPoint: 23 | .top, endPoint: .bottom)) 24 | .rotationEffect(.degrees(rotation)) 25 | .mask { 26 | RoundedRectangle(cornerRadius: 20, style: .continuous) 27 | .stroke(lineWidth: 5) 28 | .frame(width: 256, height: 336) 29 | } 30 | Text("Card").bold() 31 | .font(.largeTitle) 32 | .foregroundColor(.white) 33 | } 34 | .ignoresSafeArea() 35 | .onAppear{ 36 | withAnimation(.linear(duration: 4).repeatForever(autoreverses: false)) { 37 | rotation = 360 38 | } 39 | } 40 | } 41 | } 42 | 43 | struct AnimationsOnCards_Previews: PreviewProvider { 44 | static var previews: some View { 45 | AnimationsOnCards() 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /L-Swift/Components/ArcMenuButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArcMenuButton.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 13/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ArcMenuButton: View { 11 | @State var isExpanded = false 12 | let buttons: [ArcMenuButtonName] 13 | 14 | var ontap: (ArcMenuButtonName) -> Void 15 | var body: some View { 16 | ZStack{ 17 | ForEach(buttons.indices, id: \.self){ index in 18 | Image(systemName: buttons[index].rawValue) 19 | .frame(width: 10, height: 10) 20 | .padding() 21 | .background(Color(.systemGray6)) 22 | .foregroundColor(.gray) 23 | .cornerRadius(20) 24 | .offset(x: isExpanded ? CGFloat(Foundation.cos((Double(index) * 45 + 135) * Double.pi / 180) * 60 ) : 0, 25 | y: isExpanded ? CGFloat(Foundation.sin((Double(index) * 45 + 135) * Double.pi / 180) * 60) : 0) 26 | .animation(.spring(response: 0.5, dampingFraction: 0.5, blendDuration: 0).delay(Double(index) * 0.15), value: isExpanded) 27 | .onTapGesture { 28 | ontap(buttons[index]) 29 | } 30 | } 31 | 32 | Button{ 33 | withAnimation { 34 | isExpanded.toggle() 35 | } 36 | }label :{ 37 | Image(systemName: isExpanded ? "xmark" : "plus") 38 | .frame(width: 20, height:20) 39 | .foregroundColor(.gray) 40 | .padding(15) 41 | .background(Color(.systemGray6)) 42 | .cornerRadius(25) 43 | } 44 | } 45 | } 46 | } 47 | 48 | // Use like this 49 | struct ArcMenuButton_Previews: PreviewProvider { 50 | static var previews: some View { 51 | VStack{ 52 | ArcMenuButton(buttons: Array(ArcMenuButtonName.allCases)) { button in 53 | switch button { 54 | case .capture: 55 | print("Capture button tapped.") 56 | case .star: 57 | print("star button tapped.") 58 | case .noti: 59 | print("noti button tapped.") 60 | case .bookmark: 61 | print("bookmark button tapped.") 62 | } 63 | } 64 | .hAlign(.trailing) 65 | .vAlign(.bottom) 66 | .padding() 67 | } 68 | } 69 | } 70 | 71 | //Add button here 72 | enum ArcMenuButtonName: String { 73 | case capture = "circle" 74 | case star = "star" 75 | case noti = "bell" 76 | case bookmark = "bookmark" 77 | 78 | static var allCases: [ArcMenuButtonName] { 79 | return [.capture, .star, .noti, .bookmark] 80 | } 81 | } 82 | 83 | -------------------------------------------------------------------------------- /L-Swift/Components/BubbleTransition/BubbleTransition.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BubbleTransition.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 13/11/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct BubbleTransition: View { 11 | var body: some View { 12 | VStack{ 13 | BubbleTransitionView() 14 | 15 | DrawBubbleView2() 16 | } 17 | } 18 | } 19 | 20 | struct BubbleTransitionView: View { 21 | @State var isVisible: Bool = false 22 | 23 | var body: some View { 24 | VStack { 25 | ZStack { 26 | if isVisible { 27 | Text("Hello!") 28 | .padding(30) 29 | .background { 30 | MapOnboardingBubbleShape().fill(Color(.systemGray5)) 31 | } 32 | .transition(.opacity.combined(with: .scale).animation(.spring(response: 0.25, dampingFraction: 0.7))) 33 | } 34 | } 35 | .frame(width: 200, height: 100) 36 | .padding(.bottom, 50) 37 | 38 | Button(isVisible ? "Hide" : "Show") { 39 | isVisible.toggle() 40 | } 41 | } 42 | } 43 | } 44 | 45 | struct DrawBubbleView2: View { 46 | @State var drawFraction: CGFloat = 0 47 | 48 | var body: some View { 49 | VStack { 50 | MapOnboardingBubbleShape() 51 | .trim(from: 0, to: drawFraction) 52 | .stroke(.gray, lineWidth: 3) 53 | .animation(.spring(), value: drawFraction) 54 | .frame(width: 150, height: 100) 55 | .padding(.bottom, 50) 56 | 57 | Button(drawFraction > 0.0 ? "Hide" : "Show") { 58 | drawFraction = drawFraction > 0.0 ? 0.0 : 1.0 59 | } 60 | .tint(Color.gray) 61 | } 62 | } 63 | } 64 | 65 | 66 | struct MapOnboardingBubbleShape: Shape { 67 | var cornerRadius: CGFloat = 12 68 | var arrowRectSize: CGFloat = 20 69 | var arcLength: CGFloat = 12 70 | 71 | /// 0.0 = left, 0.5 = center, 1.0 = right 72 | var arrowOffsetFraction: CGFloat = 0.5 73 | 74 | func baseXPos(for rect: CGRect) -> CGFloat { 75 | (rect.maxX - cornerRadius - cornerRadius - arrowRectSize) * arrowOffsetFraction + cornerRadius 76 | } 77 | 78 | func path(in rect: CGRect) -> Path { 79 | let roundedRect = Path(roundedRect: rect, cornerRadius: cornerRadius) 80 | let arrowPath = Path { p in 81 | p.move(to: .init(x: baseXPos(for: rect), y: rect.maxY)) 82 | p.addLine(to: .init( 83 | x: baseXPos(for: rect) + arrowRectSize - arcLength, 84 | y: rect.maxY + arrowRectSize - arcLength 85 | )) 86 | p.addQuadCurve( 87 | to: .init( 88 | x: baseXPos(for: rect) + arrowRectSize, 89 | y: rect.maxY + arrowRectSize - arcLength 90 | ), 91 | control: .init( 92 | x: baseXPos(for: rect) + arrowRectSize, 93 | y: rect.maxY + arrowRectSize 94 | ) 95 | ) 96 | p.addLine(to: .init(x: baseXPos(for: rect) + arrowRectSize, y: rect.maxY)) 97 | p.closeSubpath() 98 | } 99 | let combinedCGPath = roundedRect.cgPath.union(arrowPath.cgPath) 100 | let combinedPath = Path(combinedCGPath) 101 | return combinedPath 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /L-Swift/Components/CustomSearchbar.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomSearchbar.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 14/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct CustomSearchbar: View { 11 | @Binding var searchText : String 12 | @State var iconOffset = false 13 | @State var state = false 14 | @State var progress: CGFloat = 1.0 15 | @State var showTextFi = false 16 | 17 | var body: some View { 18 | ZStack(alignment: .trailing){ 19 | ZStack{ 20 | RoundedRectangle(cornerRadius: 10, style: .continuous) 21 | RoundedRectangle(cornerRadius: 10, style: .continuous) 22 | .stroke(lineWidth: 1.5) 23 | .foregroundColor(Color.gray) 24 | if showTextFi{ 25 | TextField("", text: $searchText) 26 | .placeholder(when: searchText.isEmpty) { 27 | Text("Search").foregroundColor(.text.opacity(0.4)) 28 | } 29 | .padding(.horizontal) 30 | .foregroundColor(.text) .foregroundColor(.text) 31 | .padding(.trailing, 22) 32 | 33 | } 34 | } 35 | .frame(width: state ? 350 : 35, height: 35) 36 | .foregroundColor(Color.white) 37 | 38 | CustomIcon(searchText: $searchText,progress: $progress, iconOffset: $iconOffset, stete: $state, showTextFi: $showTextFi) 39 | } 40 | .padding(.horizontal) 41 | .hAlign(.trailing) 42 | .vAlign(.top) 43 | } 44 | } 45 | 46 | struct CustomIcon: View{ 47 | @Binding var searchText : String 48 | @Binding var progress : CGFloat 49 | @Binding var iconOffset: Bool 50 | @Binding var stete: Bool 51 | @Binding var showTextFi: Bool 52 | var body: some View{ 53 | Button { 54 | if showTextFi{ 55 | showTextFi = false 56 | searchText = "" 57 | } 58 | 59 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.3){ 60 | withAnimation { 61 | if !showTextFi && stete{ 62 | showTextFi = true 63 | } 64 | } 65 | } 66 | 67 | withAnimation { 68 | stete.toggle() 69 | } 70 | 71 | if progress == 1.0{ 72 | withAnimation(.linear(duration: 0.5)) { 73 | progress = 0.0 74 | } 75 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.3){ 76 | withAnimation(.linear(duration: 0.3)) { 77 | iconOffset.toggle() 78 | } 79 | } 80 | }else{ 81 | withAnimation { 82 | iconOffset.toggle() 83 | } 84 | 85 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.4){ 86 | withAnimation(.linear(duration: 0.5)) { 87 | progress = 1.0 88 | } 89 | } 90 | } 91 | } label: { 92 | VStack{ 93 | Circle() 94 | .trim(from: 0.0, to: progress) 95 | .stroke(lineWidth: 3) 96 | .rotationEffect(.degrees(88)) 97 | .frame(width: 9, height: 9) 98 | .padding() 99 | RoundedRectangle(cornerRadius: 5) 100 | .frame(width: 3, height: iconOffset ? 20 : 15) 101 | .offset(y: -20) 102 | .overlay { 103 | RoundedRectangle(cornerRadius: 5) 104 | .frame(width: 3, height: iconOffset ? 20 : 15) 105 | .rotationEffect(.degrees( iconOffset ? 80 : 0), anchor: .center) 106 | .offset(y: -20) 107 | 108 | } 109 | .padding(.top,iconOffset ? -9 : 0) 110 | } 111 | } 112 | .offset(x: iconOffset ? -5 : 2, y: iconOffset ? -5 : 5) 113 | .rotationEffect(.degrees(-40)) 114 | .foregroundColor(Color.text) 115 | .frame(width: 40, height: 40) 116 | } 117 | } 118 | 119 | struct CustomSearchbar_Previews: PreviewProvider { 120 | static var previews: some View { 121 | CustomSearchbar(searchText: .constant("123123")) 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /L-Swift/Components/CustomSegmentAnimated/CustomSegmentAnimated.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomSegment.swift 3 | // IOS17-Swift 4 | // 5 | // Created by xqsadness on 11/06/2024. 6 | // 7 | 8 | import SwiftUI 9 | 10 | //MARK: This view is for testing purposes only, do not use it !!! 11 | struct SegmentAnimatedView: View { 12 | @State private var isVideo: Bool = false 13 | var body: some View { 14 | CustomSegmentAnimated(isSelected: $isVideo, text1: "Song", text2: "Video") 15 | .frame(width: 180) 16 | } 17 | } 18 | 19 | struct CustomSegmentAnimated: View { 20 | @Binding var isSelected: Bool 21 | @State private var shakeValue: CGFloat = 0 22 | 23 | var text1: String = "text1" 24 | var text2: String = "text2" 25 | 26 | var body: some View { 27 | HStack(spacing: 0) { 28 | TabableText(title: "\(text1)") 29 | .foregroundColor(.accentColor) 30 | .overlay { 31 | Rectangle() 32 | .fill(Color.accentColor) 33 | .clipShape( 34 | .rect( 35 | topLeadingRadius: 30, 36 | bottomLeadingRadius: 30, 37 | bottomTrailingRadius: 0, 38 | topTrailingRadius: 0 39 | ) 40 | ) 41 | .overlay { 42 | TabableText(title: "\(text2)") 43 | .foregroundColor(isSelected ? .white : .clear) 44 | .scaleEffect(x: -1) 45 | } 46 | .rotation3DEffect(.init(degrees: isSelected ? 180 : 0), axis: (x: 0, y: 1, z: 0), anchor: .trailing, perspective: 0.4) 47 | } 48 | .overlay(content: { 49 | TabableText(title: "\(text1)") 50 | .foregroundColor(isSelected ? .clear : .white) 51 | }) 52 | .zIndex(1) 53 | .contentShape(Rectangle()) 54 | .shadow(color: Color.white.opacity(0.4), radius: 3, x: 0, y: 1) 55 | 56 | TabableText(title: "\(text2)") 57 | .foregroundColor(.accentColor) 58 | .zIndex(0) 59 | .shadow(color: Color.green.opacity(0.4), radius: 3, x: 0, y: 1) 60 | 61 | } 62 | .background { 63 | ZStack { 64 | Capsule().fill(Color.white) 65 | Capsule().stroke(Color.accentColor, lineWidth: 3) 66 | } 67 | } 68 | .rotation3DEffect(.init(degrees: shakeValue), axis: (x: 0, y: 1, z: 0)) 69 | } 70 | 71 | private func TabableText(title: String) -> some View { 72 | Text(title) 73 | .font(Font.system(size: 14)) 74 | .padding(.vertical, 5) 75 | .padding(.horizontal, 20) 76 | .frame(maxWidth: .infinity) 77 | .contentShape(Rectangle()) 78 | .onTapGesture { 79 | withAnimation(.interactiveSpring(response: 0.4, dampingFraction: 1, blendDuration: 1)) { 80 | self.isSelected = (title == "\(text2)") 81 | 82 | self.shakeValue = (title == "\(text2)" ? 10 : -10) 83 | 84 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { 85 | withAnimation(.interactiveSpring(response: 0.4, dampingFraction: 1, blendDuration: 1)) { 86 | self.shakeValue = 0 87 | } 88 | } 89 | } 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /L-Swift/Components/LazyCompositional/CompositionalView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CompositionalView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 13/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | // MARK: Building custom view like foreach 11 | struct CompositionalView: View where Content: View, ID: Hashable, Item: RandomAccessCollection, Item.Element: Hashable{ 12 | var content: (Item.Element)->Content 13 | var items: Item 14 | var id: KeyPath 15 | var spacing: CGFloat 16 | 17 | init(items: Item,id: KeyPath, spacing: CGFloat = 5, @ViewBuilder 18 | content: @escaping (Item.Element)->Content) { 19 | self.content = content 20 | self.id = id 21 | self.items = items 22 | self.spacing = spacing 23 | } 24 | 25 | var body: some View { 26 | LazyVStack(spacing: spacing){ 27 | ForEach(generateColumns(), id: \.self){ row in 28 | RowView(row: row) 29 | } 30 | } 31 | } 32 | 33 | // MARK: identifying row type 34 | func layoutType(row: [Item.Element]) -> LayoutType{ 35 | let index = generateColumns().firstIndex{item in 36 | return item == row 37 | } ?? 0 38 | 39 | //MARK: Layout order will be 1,2,3,1,2,3,... 40 | var types: [LayoutType] = [] 41 | generateColumns().forEach { _ in 42 | if types.isEmpty{ 43 | types.append(.type1) 44 | }else if types.last == .type1{ 45 | types.append(.type2) 46 | }else if types.last == .type2{ 47 | types.append(.type3) 48 | }else if types.last == .type3{ 49 | types.append(.type1) 50 | }else {} 51 | } 52 | 53 | return types[index] 54 | } 55 | 56 | // MARK: row view 57 | @ViewBuilder 58 | func RowView(row: [Item.Element]) -> some View{ 59 | GeometryReader{proxy in 60 | let width = proxy.size.width 61 | let height = (proxy.size.height - spacing) / 2 62 | let type = layoutType(row: row) 63 | let columnWidth = (width > 0 ? ((width - (spacing * 2)) / 3 ) : 0) 64 | 65 | HStack(spacing: spacing){ 66 | //MARK: this order in your wish 67 | if type == .type1{ 68 | SafeView(row: row, index: 0) 69 | VStack(spacing: spacing){ 70 | SafeView(row: row, index: 1) 71 | .frame(height: height) 72 | SafeView(row: row, index: 2) 73 | .frame(height: height) 74 | } 75 | .frame(width: columnWidth) 76 | } 77 | if type == .type2{ 78 | HStack(spacing: spacing){ 79 | SafeView(row: row, index: 1) 80 | .frame(width: columnWidth) 81 | SafeView(row: row, index: 2) 82 | .frame(width: columnWidth) 83 | SafeView(row: row, index: 0) 84 | .frame(width: columnWidth) 85 | } 86 | } 87 | if type == .type3{ 88 | VStack(spacing: spacing){ 89 | SafeView(row: row, index: 0) 90 | .frame(height: height) 91 | SafeView(row: row, index: 1) 92 | .frame(height: height) 93 | } 94 | .frame(width: columnWidth) 95 | SafeView(row: row, index: 2) 96 | } 97 | } 98 | } 99 | .frame(height: layoutType(row: row) == .type1 || layoutType(row: row) == .type3 ? 250 : 120) 100 | } 101 | 102 | // MARK: safely. unwrapping content index 103 | @ViewBuilder 104 | func SafeView(row: [Item.Element], index: Int) -> some View{ 105 | if (row.count - 1) >= index{ 106 | content(row[index]) 107 | } 108 | } 109 | 110 | //MARK: Constructing custom rows and columns 111 | func generateColumns() -> [[Item.Element]]{ 112 | var column: [[Item.Element]] = [] 113 | var row: [Item.Element] = [] 114 | 115 | for item in items{ 116 | // Mark: Each row consists of 3 views 117 | // optional you can modify 118 | if row.count == 3{ 119 | column.append(row) 120 | row.removeAll() 121 | row.append(item) 122 | }else{ 123 | row.append(item) 124 | } 125 | } 126 | // Mark: adding exhaust ones 127 | column.append(row) 128 | row.removeAll() 129 | return column 130 | } 131 | } 132 | 133 | 134 | struct CompositionalView_Previews: PreviewProvider { 135 | static var previews: some View { 136 | HomeCompositional() 137 | } 138 | } 139 | 140 | enum LayoutType{ 141 | case type1 142 | case type2 143 | case type3 144 | } 145 | -------------------------------------------------------------------------------- /L-Swift/Components/LazyCompositional/HomeCompositionalView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HomeCompositional.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 13/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | import SDWebImageSwiftUI 10 | 11 | struct HomeCompositional: View { 12 | @StateObject var imageFetcher: ImageFetcher = .init() 13 | var body: some View { 14 | NavigationView { 15 | Group{ 16 | // Mark: Custom view 17 | if let images = imageFetcher.fetchedImage{ 18 | ScrollView{ 19 | CompositionalView(items: images, id: \.id) { item in 20 | GeometryReader{proxy in 21 | let size = proxy.size 22 | 23 | WebImage(url: URL(string: item.download_url)) 24 | .placeholder( 25 | Image("placeholder_image") 26 | .resizable() 27 | ) 28 | .resizable() 29 | .aspectRatio(contentMode: .fill) 30 | .frame(width: size.width, height: size.height) 31 | .cornerRadius(10) 32 | .onAppear{ 33 | if images.last?.id == item.id{ 34 | imageFetcher.startPagination = true 35 | } 36 | } 37 | } 38 | } 39 | .padding() 40 | .padding(.bottom,10) 41 | 42 | if imageFetcher.startPagination && !imageFetcher.endPagination{ 43 | ProgressView() 44 | .offset(y: -15) 45 | .onAppear{ 46 | //MARK: slight delay 47 | DispatchQueue.main.asyncAfter(deadline: .now() + 1.5){ 48 | imageFetcher.updateImages() 49 | } 50 | } 51 | } 52 | } 53 | }else{ 54 | ProgressView() 55 | } 56 | } 57 | .navigationTitle("Compositional Layout") 58 | } 59 | } 60 | } 61 | 62 | struct HomeCompositional_Previews: PreviewProvider { 63 | static var previews: some View { 64 | HomeCompositional() 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /L-Swift/Components/MovableGrids.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MovableGrids.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 12/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct MovableGrids: View { 11 | @State private var colors: [Color] = [.red, .blue, .purple, .yellow, .black, .indigo, .cyan, .pink, .brown, .mint, .orange] 12 | @State private var draggingItem: Color? 13 | 14 | var body: some View { 15 | NavigationStack{ 16 | ScrollView(.vertical){ 17 | let columns = Array(repeating: GridItem(spacing: 10), count: 3) 18 | LazyVGrid(columns: columns,spacing: 10) { 19 | ForEach(colors, id: \.self){ color in 20 | GeometryReader { 21 | let size = $0.size 22 | 23 | RoundedRectangle(cornerRadius: 10) 24 | .fill(color.gradient) 25 | .draggable(color){ 26 | // custom preview view 27 | RoundedRectangle(cornerRadius: 10) 28 | .fill(.ultraThinMaterial) 29 | .frame(width: size.width, height: size.height) 30 | .onAppear{ 31 | draggingItem = color 32 | } 33 | } 34 | // drop 35 | .dropDestination(for: Color.self) { items, location in 36 | draggingItem = nil 37 | return false 38 | }isTargeted: { status in 39 | if let draggingItem, status, draggingItem != color{ 40 | //moving color from source to destination 41 | if let sourceIndex = colors.firstIndex(of: draggingItem), let destinationIndex = colors.firstIndex(of: color){ 42 | 43 | withAnimation(.spring()) { 44 | let souceItem = colors.remove(at: sourceIndex) 45 | 46 | colors.insert(souceItem, at: destinationIndex) 47 | } 48 | } 49 | } 50 | } 51 | } 52 | .frame(height: 100) 53 | } 54 | } 55 | .padding(15) 56 | } 57 | .navigationTitle("Movable Grid") 58 | } 59 | } 60 | } 61 | 62 | struct MovableGrids_Previews: PreviewProvider { 63 | static var previews: some View { 64 | MovableGrids() 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /L-Swift/Components/Onboarding/FirstView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FirstView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 06/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct FirstView: View { 11 | @Binding var showNextView: Bool 12 | @State var isExpanded = false 13 | @State var startTyping = false 14 | @State var showText = false 15 | var body: some View { 16 | ZStack{ 17 | GeoView(isExpanded: $isExpanded, startTyping: $startTyping, showText: $showText, color: "fview", showNextView: $showNextView) 18 | 19 | VStack(alignment: .leading){ 20 | Text("Swiftui \nFramework").font(.system(size: 50)).bold() 21 | 22 | TypingEffectView(fullText: """ 23 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. 24 | 25 | Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, 26 | 27 | when an unknown printer took a galley of type and scrambled it to make a type 28 | """, isExpanded: $startTyping) 29 | } 30 | .opacity(isExpanded ? 1 : 0) 31 | .scaleEffect(isExpanded ? 1 : 0) 32 | .offset(x: showText ? 0 : UIScreen.main.bounds.width) 33 | } 34 | .ignoresSafeArea() 35 | } 36 | } 37 | 38 | struct FirstView_Previews: PreviewProvider { 39 | static var previews: some View { 40 | FirstView(showNextView: .constant(false)) 41 | } 42 | } 43 | 44 | struct GeoView: View { 45 | @Binding var isExpanded: Bool 46 | @Binding var startTyping: Bool 47 | @Binding var showText: Bool 48 | 49 | var color: String 50 | var text: String = "NEXT" 51 | var showNextView: Binding? 52 | var showToogleExpand: Bool = true 53 | 54 | var body: some View { 55 | GeometryReader{ geometry in 56 | ZStack{ 57 | Circle().foregroundColor(Color("\(color)")) 58 | .frame(width: isExpanded ? max(geometry.size.width, geometry.size.height) * 1.5 : 200, height: isExpanded ? max(geometry.size.width, geometry.size.height) * 1.5 : 200) 59 | if !isExpanded{ 60 | HStack{ 61 | Text(text) 62 | Image(systemName: "arrow.right") 63 | } 64 | .bold().font(.system(size: 20)) 65 | .foregroundColor(.black) 66 | } 67 | } 68 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottomTrailing) 69 | .offset(x: isExpanded ? -250 : 40, y: isExpanded ? -150 : 20) 70 | } 71 | .onTapGesture { 72 | withAnimation(.spring(response: 0.9, dampingFraction: 0.8)) { 73 | if showToogleExpand{ 74 | isExpanded.toggle() 75 | }else{ 76 | isExpanded = true 77 | } 78 | 79 | showText.toggle() 80 | startTyping = true 81 | 82 | if let showNextViewBinding = showNextView{ 83 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { 84 | showNextViewBinding.wrappedValue.toggle() 85 | } 86 | } 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /L-Swift/Components/Onboarding/HomeOnboardingView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HomeOnboardingView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 09/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct HomeOnboardingView: View { 11 | @Binding var showNextView: Bool 12 | @State var isExpanded = false 13 | @State var startTyping = false 14 | @State var showText = false 15 | var body: some View { 16 | ZStack{ 17 | GeoView(isExpanded: $isExpanded, startTyping: $startTyping, showText: $showText, color: "tview", text: "START", showToogleExpand: false) 18 | 19 | VStack(alignment: .leading){ 20 | Text("Swiftui \nFramework").font(.system(size: 50)).bold() 21 | } 22 | .opacity(isExpanded ? 1 : 0) 23 | .scaleEffect(isExpanded ? 1 : 0) 24 | .offset(x: isExpanded ? 0 : UIScreen.main.bounds.width) 25 | } 26 | .ignoresSafeArea() 27 | } 28 | } 29 | 30 | struct HomeOnboardingView_Previews: PreviewProvider { 31 | static var previews: some View { 32 | HomeOnboardingView(showNextView: .constant(false)) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /L-Swift/Components/Onboarding/OnboardingView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // OnboardingView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 09/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct OnboardingView: View { 11 | @State private var showSview = false 12 | @State private var showTview = false 13 | @State private var showFview = false 14 | var body: some View { 15 | ZStack{ 16 | Text("Swiftui Onboarding").bold().font(.largeTitle) 17 | .offset(y: -100) 18 | .padding(.leading,8) 19 | FirstView(showNextView: $showSview) 20 | 21 | SecondView(showNextView: $showTview) 22 | .modifier(ViewAnimation(isShow: showSview)) 23 | 24 | HomeOnboardingView(showNextView: $showTview) 25 | .modifier(ViewAnimation(isShow: showTview)) 26 | } 27 | } 28 | } 29 | 30 | struct OnboardingView_Previews: PreviewProvider { 31 | static var previews: some View { 32 | OnboardingView() 33 | } 34 | } 35 | 36 | struct ViewAnimation: ViewModifier{ 37 | 38 | var isShow: Bool 39 | func body(content: Content) -> some View{ 40 | content 41 | .offset(x: isShow ? 0 : 200) 42 | .scaleEffect(isShow ? 1 : 0, anchor: .bottomTrailing) 43 | .animation(.spring(), value: isShow) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /L-Swift/Components/Onboarding/SecondView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SecondView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 09/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct SecondView: View { 11 | @Binding var showNextView: Bool 12 | @State var isExpanded = false 13 | @State var startTyping = false 14 | @State var showText = false 15 | var body: some View { 16 | ZStack{ 17 | GeoView(isExpanded: $isExpanded, startTyping: $startTyping, showText: $showText, color: "sview", showNextView: $showNextView) 18 | 19 | VStack(alignment: .leading){ 20 | Text("Swiftui \nFramework").font(.system(size: 50)).bold() 21 | 22 | TypingEffectView(fullText: """ 23 | Lorem Ipsum is simply dummy text of the printing and typesetting industry. 24 | 25 | Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, 26 | 27 | when an unknown printer took a galley of type and scrambled it to make a type 28 | """, isExpanded: $startTyping) 29 | } 30 | .opacity(isExpanded ? 1 : 0) 31 | .scaleEffect(isExpanded ? 1 : 0) 32 | .offset(x: showText ? 0 : UIScreen.main.bounds.width) 33 | } 34 | .ignoresSafeArea() 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /L-Swift/Components/Onboarding/TypingEffectView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TypingEffectView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 09/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct TypingEffectView: View { 11 | @State private var displayedText = "" 12 | var fullText: String 13 | @State private var currentCharIndex: String.Index! 14 | @Binding var isExpanded: Bool 15 | var body: some View { 16 | VStack{ 17 | Text(displayedText).font(.custom("Corier", size: 15)) 18 | .foregroundColor(.black) 19 | .frame(width: 380, height: 150, alignment: .topLeading) 20 | } 21 | .onChange(of: isExpanded) { newValue in 22 | if newValue{ 23 | startTypingEffect() 24 | } 25 | } 26 | } 27 | 28 | func startTypingEffect(){ 29 | DispatchQueue.main.asyncAfter(deadline: .now() + 1.0){ 30 | currentCharIndex = fullText.startIndex 31 | Timer.scheduledTimer(withTimeInterval: 0.03, repeats: true) { timer in 32 | displayedText.append(fullText[currentCharIndex]) 33 | currentCharIndex = fullText.index(after: currentCharIndex) 34 | if currentCharIndex == fullText.endIndex{ 35 | timer.invalidate() 36 | } 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /L-Swift/Components/Onboarding2/CustomIndicatorView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomIndicatorView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 11/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct CustomIndicatorView: View { 11 | //view prop 12 | var totalPages: Int 13 | var currentPages: Int 14 | var activeInt: Color = .black 15 | var inActiveInt: Color = .gray.opacity(0.5) 16 | 17 | 18 | var body: some View { 19 | HStack(spacing: 8){ 20 | ForEach(0..: View{ 72 | @Binding var intro: PageIntro 73 | var size: CGSize 74 | var actionView: ActionView 75 | 76 | init(intro: Binding, size: CGSize, @ViewBuilder actionView: @escaping () -> ActionView) { 77 | self._intro = intro 78 | self.size = size 79 | self.actionView = actionView() 80 | } 81 | ///Animation prop 82 | @State private var showView: Bool = false 83 | @State private var hideWholeView: Bool = false 84 | var body : some View{ 85 | VStack{ 86 | GeometryReader{ 87 | let size = $0.size 88 | 89 | Image(intro.introAssetImage) 90 | .resizable() 91 | .aspectRatio(contentMode: .fit) 92 | .frame(width: size.width, height: size.height) 93 | } 94 | ///moving up 95 | .offset(y: showView ? 0 : -size.height / 2) 96 | .opacity(showView ? 1 : 0) 97 | 98 | ///title and action 99 | VStack(alignment: .leading, spacing: 10){ 100 | Spacer(minLength: 0) 101 | 102 | Text(intro.title) 103 | .font(.system(size: 40)) 104 | .fontWeight(.black) 105 | 106 | Text(intro.subTitle) 107 | .font(.caption) 108 | .foregroundColor(.gray) 109 | .padding(.top, 15) 110 | 111 | if !intro.displayAction{ 112 | Group{ 113 | Spacer(minLength: 25) 114 | 115 | CustomIndicatorView(totalPages: pageIntros.count, currentPages: pageIntros.firstIndex(of: intro) ?? 0) 116 | 117 | Button{ 118 | changeIntro() 119 | }label: { 120 | Text("NEXT") 121 | .fontWeight(.semibold) 122 | .foregroundColor(.white) 123 | .frame(width: size.width * 0.4) 124 | .padding(.vertical, 15) 125 | .background( 126 | Capsule() 127 | .fill(.black) 128 | ) 129 | } 130 | .hAlign(.center) 131 | } 132 | }else{ 133 | actionView 134 | .offset(y: showView ? 0 : size.height / 2) 135 | .opacity(showView ? 1 : 0) 136 | } 137 | } 138 | .hAlign(.leading) 139 | ///moving down 140 | .offset(y: showView ? 0 : size.height / 2) 141 | .opacity(showView ? 1 : 0) 142 | } 143 | .offset(y: hideWholeView ? size.height / 2 : 0) 144 | .opacity(hideWholeView ? 0 : 1) 145 | 146 | ///back button 147 | .overlay(alignment: .topLeading) { 148 | /// hiding it for very first page , since there is no previous page present 149 | if intro != pageIntros.first{ 150 | Button{ 151 | changeIntro(true) 152 | }label: { 153 | Image(systemName: "chevron.left") 154 | .font(.title) 155 | .fontWeight(.semibold) 156 | .foregroundColor(.black) 157 | .contentShape(Rectangle()) 158 | } 159 | .padding(10) 160 | ///Animating back button 161 | ///Comes from top when active 162 | .offset(y: showView ? 0 : -200) 163 | ///hides by going back to top when in active 164 | .offset(y: hideWholeView ? -200 : 0) 165 | } 166 | } 167 | .onAppear{ 168 | withAnimation(.spring(response: 0.8, dampingFraction: 0.8, blendDuration: 0).delay(0.1)) { 169 | showView = true 170 | } 171 | } 172 | } 173 | 174 | func changeIntro(_ isprevious: Bool = false){ 175 | withAnimation(.spring(response: 0.8, dampingFraction: 0.8, blendDuration: 0)) { 176 | hideWholeView = true 177 | } 178 | 179 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5){ 180 | //updating page 181 | if let index = pageIntros.firstIndex(of: intro), (isprevious ? index != 0 : index != pageIntros.count - 1){ 182 | intro = isprevious ? pageIntros[index - 1] : pageIntros[index + 1] 183 | }else{ 184 | intro = isprevious ? pageIntros[0] : pageIntros[pageIntros.count - 1] 185 | } 186 | //re-animation as split page 187 | hideWholeView = false 188 | showView = false 189 | 190 | withAnimation(.spring(response: 0.8, dampingFraction: 0.8, blendDuration: 0)) { 191 | showView = true 192 | } 193 | } 194 | } 195 | 196 | var filterPages: [PageIntro]{ 197 | return pageIntros.filter { !$0.displayAction } 198 | } 199 | } 200 | -------------------------------------------------------------------------------- /L-Swift/Components/ParticleEffects/ParticleEffect.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ParticleEffect.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 12/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | extension View{ 11 | @ViewBuilder 12 | func particaleEffect(systemImage: String, font: Font, status: Bool, activeTint: Color, inActiveTint: Color) -> some View{ 13 | self 14 | .modifier( 15 | ParticleModifier(systemImage: systemImage, font: font, status: status, activeTint: activeTint, inActiveTint: inActiveTint) 16 | ) 17 | } 18 | } 19 | 20 | fileprivate struct ParticleModifier: ViewModifier{ 21 | var systemImage: String 22 | var font: Font 23 | var status: Bool 24 | var activeTint: Color 25 | var inActiveTint: Color 26 | /// View Props 27 | @State private var particles: [Particale] = [] 28 | 29 | func body(content: Content) -> some View { 30 | content 31 | .overlay(alignment: .top) { 32 | ZStack{ 33 | ForEach(particles){ particle in 34 | Image(systemName: systemImage) 35 | .foregroundColor(status ? activeTint : inActiveTint) 36 | .scaleEffect(particle.scale) 37 | .offset(x: particle.randomX, y: particle.randomY) 38 | .opacity(particle.opacity) 39 | // only visible when status is active 40 | .opacity(status ? 1 : 0) 41 | // making base visibility with zero animation 42 | .animation(.none, value: status) 43 | } 44 | } 45 | .onAppear{ 46 | //Adding base particles for animation 47 | if particles.isEmpty{ 48 | /// change count as per your wish 49 | for _ in 1...15{ 50 | let pratice = Particale() 51 | particles.append(pratice) 52 | } 53 | } 54 | } 55 | .onChange(of: status) { newValue in 56 | if !newValue{ 57 | // reset animation 58 | for index in particles.indices{ 59 | particles[index].reset() 60 | } 61 | }else{ 62 | //activating particle 63 | for index in particles.indices{ 64 | //random x & y caculation based on index 65 | let total: CGFloat = CGFloat(particles.count) 66 | let progress: CGFloat = CGFloat(index) / total 67 | 68 | let maxX: CGFloat = (progress > 0.5) ? 100 : -100 69 | let maxY: CGFloat = 60 70 | 71 | let randomX: CGFloat = ((progress > 0.5 ? progress - 0.5 : progress) * maxX) 72 | let randomY: CGFloat = ((progress > 0.5 ? progress - 0.5 : progress) * maxY) + 35 73 | 74 | // MIN SCALE = 0.35 75 | // MAX. SCALE = 1 76 | let radomScale: CGFloat = .random(in: 0.35...1) 77 | 78 | withAnimation(.interactiveSpring(response: 0.6, dampingFraction: 0.7, blendDuration: 0.7)) { 79 | 80 | let extraRandomX: CGFloat = (progress < 0.5 ? .random(in: 0...10) : .random(in: -10...0)) 81 | let extraRandomY: CGFloat = .random(in: 0...30) 82 | 83 | particles[index].randomX = randomX + extraRandomX 84 | particles[index].randomY = -randomY - extraRandomY 85 | } 86 | 87 | // scaling with ease animation 88 | withAnimation(.easeInOut(duration: 0.4)) { 89 | particles[index].scale = radomScale 90 | } 91 | 92 | // removing. particle based on index 93 | withAnimation(.interactiveSpring(response: 0.6, dampingFraction: 0.7, blendDuration: 0.7).delay(0.25 + (Double(index) * 0.005))) { 94 | particles[index].scale = 0.001 95 | 96 | } 97 | } 98 | } 99 | } 100 | } 101 | } 102 | } 103 | 104 | 105 | -------------------------------------------------------------------------------- /L-Swift/Components/ParticleEffects/ParticleEffectsHome.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ParticleEffectsHome.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 12/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ParticleEffectsHome: View { 11 | @State private var isLiked: [Bool] = [false, false, false] 12 | 13 | var body: some View { 14 | VStack{ 15 | HStack(spacing: 20){ 16 | CustomButton(systemImage: "suit.heart.fill", status: isLiked[0], activeTint: .pink, inActiveTint: .gray) { 17 | isLiked[0].toggle() 18 | } 19 | 20 | CustomButton(systemImage: "star.fill", status: isLiked[1], activeTint: .yellow, inActiveTint: .gray) { 21 | isLiked[1].toggle() 22 | } 23 | 24 | CustomButton(systemImage: "square.and.arrow.up.fill", status: isLiked[2], activeTint: .blue, inActiveTint: .gray) { 25 | isLiked[2].toggle() 26 | } 27 | } 28 | } 29 | } 30 | 31 | //Custom Button View 32 | @ViewBuilder 33 | func CustomButton(systemImage: String, status: Bool, activeTint: Color, inActiveTint: Color, onTap: @escaping () -> ()) -> some View{ 34 | Button{ 35 | onTap() 36 | }label: { 37 | Image(systemName: systemImage) 38 | .font(.title2) 39 | .particaleEffect(systemImage: systemImage, font: .title2, status: status, activeTint: activeTint, inActiveTint: inActiveTint) 40 | .foregroundColor(status ? activeTint : inActiveTint) 41 | .padding(.horizontal, 18) 42 | .padding(.vertical, 8) 43 | .background { 44 | Capsule() 45 | .fill(status ? activeTint.opacity(0.25) : Color("ButtonColor")) 46 | } 47 | } 48 | } 49 | } 50 | 51 | struct ParticleEffectsHome_Previews: PreviewProvider { 52 | static var previews: some View { 53 | ParticleEffectsHome() 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /L-Swift/Components/PasswordStrength.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PasswordStrength.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 13/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct PasswordStrength: View { 11 | @State var text = "" 12 | @State var progress: CGFloat = 0 13 | @State var checkMinChars = false 14 | @State var checkLetter = false 15 | @State var checkPunctuation = false 16 | @State var checkNumber = false 17 | @State var showPassword = false 18 | 19 | var progressColor: Color{ 20 | let containsLetters = text.rangeOfCharacter(from: .letters) != nil 21 | 22 | let containsNumbers = text.rangeOfCharacter(from: .decimalDigits) != nil 23 | 24 | let containsPunctuation = text.rangeOfCharacter(from: CharacterSet(charactersIn: "!@#%^&")) != nil 25 | 26 | if containsLetters && containsNumbers && containsPunctuation && text.count >= 8{ 27 | return Color.green 28 | }else if containsLetters && !containsNumbers && !containsPunctuation{ 29 | return Color.red 30 | }else if containsNumbers && !containsLetters && !containsPunctuation{ 31 | return Color.red 32 | }else if containsLetters && containsNumbers && !containsPunctuation{ 33 | return Color.yellow 34 | }else if containsLetters && containsNumbers && containsPunctuation{ 35 | return Color.blue 36 | }else { 37 | return Color.gray 38 | } 39 | } 40 | 41 | var body: some View { 42 | VStack(alignment: .leading, spacing: 40){ 43 | VStack(alignment: .leading, spacing: 10) { 44 | CheckText (text: "Minimum 8 characters", check: $checkMinChars) 45 | CheckText (text: "At least one letter", check: $checkLetter) 46 | CheckText (text: "(I@#$%*^&)", check: $checkPunctuation) 47 | CheckText (text: "Number", check: $checkNumber) 48 | } 49 | 50 | ZStack{ 51 | if !showPassword{ 52 | SecureField("Password", text: $text) 53 | .padding(.leading).bold() 54 | .onChange(of: text, perform: { newValue in 55 | withAnimation { 56 | progress = min(1.0, max(0, CGFloat(newValue.count) / 8.0)) 57 | 58 | checkMinChars = newValue .count >= 8 59 | checkLetter = newValue.rangeOfCharacter(from: .letters) != nil 60 | checkNumber = newValue.rangeOfCharacter(from: .decimalDigits) != nil 61 | checkPunctuation = newValue.rangeOfCharacter(from: 62 | CharacterSet (charactersIn: "!©#%^&")) != nil 63 | } 64 | }) 65 | .frame(height: 60) 66 | .background( 67 | RoundedRectangle(cornerRadius: 10).foregroundColor (.white) 68 | .shadow(color: .black.opacity(0.2), radius: 5, x: 10, y: 4) 69 | ) 70 | }else{ 71 | TextField("Password", text: $text) 72 | .padding(.leading).bold() 73 | .onChange(of: text, perform: { newValue in 74 | withAnimation { 75 | progress = min(1.0, max(0, CGFloat(newValue.count) / 8.0)) 76 | 77 | checkMinChars = newValue .count >= 8 78 | checkLetter = newValue.rangeOfCharacter(from: .letters) != nil 79 | checkNumber = newValue.rangeOfCharacter(from: .decimalDigits) != nil 80 | checkPunctuation = newValue.rangeOfCharacter(from: 81 | CharacterSet (charactersIn: "!©#%^&")) != nil 82 | } 83 | }) 84 | .frame(height: 60) 85 | .background( 86 | RoundedRectangle(cornerRadius: 10).foregroundColor (.white) 87 | .shadow(color: .black.opacity(0.2), radius: 5, x: 10, y: 4) 88 | ) 89 | } 90 | 91 | RoundedRectangle (cornerRadius: 10) .trim(from: 0, to: progress) 92 | .stroke(progressColor,lineWidth: 3) 93 | .frame(height: 60) 94 | .rotationEffect(.degrees(-180)) 95 | } 96 | .overlay(alignment: .trailing){ 97 | Image(systemName: showPassword ? "eye.fill" : "eye.slash.fill") 98 | .padding(.trailing, 10) 99 | .onTapGesture { 100 | withAnimation { 101 | showPassword.toggle() 102 | } 103 | } 104 | } 105 | } 106 | .padding () 107 | } 108 | } 109 | 110 | 111 | struct PasswordStrength_Previews: PreviewProvider { 112 | static var previews: some View { 113 | PasswordStrength() 114 | } 115 | } 116 | 117 | struct CheckText: View { 118 | let text: String 119 | @Binding var check:Bool 120 | var body: some View { 121 | HStack{ 122 | Image (systemName: check ? "checkmark.circle.fill" : "circle") 123 | Text (text) 124 | } 125 | .foregroundColor (check ? .green : .gray) 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /L-Swift/Components/SideBarView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SideBarView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 15/06/2024. 6 | // 7 | 8 | import SwiftUI 9 | 10 | enum Tab2: String, CaseIterable { 11 | case home = "Home" 12 | case table = "Table" 13 | case menu = "Menu" 14 | case order = "Order" 15 | case history = "History" 16 | case report = "Report" 17 | case alert = "Alert" 18 | case settings = "Settings" 19 | } 20 | 21 | struct SideBarView: View { 22 | @State private var currentTab: Tab2 = .home 23 | @State private var showSidebar: Bool = false 24 | @Namespace var animation 25 | 26 | init() { 27 | UITabBar.appearance().isHidden = true 28 | } 29 | 30 | var body: some View { 31 | VStack(spacing: 0) { 32 | Image(systemName: "square.grid.2x2.fill") 33 | .imageScale(.large) 34 | .onTapGesture { 35 | withAnimation { showSidebar.toggle() } 36 | } 37 | .padding() 38 | .hAlign(.leading) 39 | 40 | TabView(selection: $currentTab) { 41 | ForEach(Tab2.allCases, id: \.self) { tab in 42 | Text(tab.rawValue) 43 | .tag(tab) 44 | } 45 | } 46 | } 47 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .leading) 48 | .background { 49 | Color.black 50 | .opacity(0.04) 51 | .ignoresSafeArea() 52 | } 53 | .overlay(alignment: .leading) { 54 | ViewThatFits { 55 | SideBar() 56 | ScrollView { 57 | SideBar() 58 | } 59 | .scrollIndicators(.hidden) 60 | .background(Color.white).ignoresSafeArea() 61 | } 62 | .offset(x: showSidebar ? 0 : -100) 63 | .frame(maxWidth: .infinity, alignment: .leading) 64 | .background { 65 | Color.black 66 | .opacity(showSidebar ? 0.25 : 0) 67 | .ignoresSafeArea() 68 | .onTapGesture { 69 | withAnimation { showSidebar.toggle() } 70 | } 71 | } 72 | } 73 | } 74 | 75 | @ViewBuilder 76 | func SideBar() -> some View { 77 | VStack(spacing: 10) { 78 | Image("placeholder_image") 79 | .resizable() 80 | .aspectRatio(contentMode: .fill) 81 | .frame(width: 55, height: 55) 82 | .clipShape(Circle()) 83 | .padding(.bottom, 10) 84 | 85 | ForEach(Tab2.allCases, id: \.self) { tab in 86 | VStack(spacing: 8) { 87 | Image(systemName: "xbox.logo") 88 | .resizable() 89 | .renderingMode(.template) 90 | .aspectRatio(contentMode: .fit) 91 | .frame(width: 22, height: 22) 92 | 93 | Text(tab.rawValue) 94 | .font(.caption) 95 | .fontWeight(.semibold) 96 | } 97 | .foregroundStyle(currentTab == tab ? Color.orange : .gray) 98 | .padding(.vertical, 13) 99 | .frame(width: 65) 100 | .background { 101 | if currentTab == tab { 102 | RoundedRectangle(cornerRadius: 15, style: .continuous) 103 | .fill(Color.orange).opacity(0.1) 104 | .matchedGeometryEffect(id: "TAB", in: animation) 105 | } 106 | } 107 | .onTapGesture { 108 | withAnimation(.easeInOut) { 109 | currentTab = tab 110 | } 111 | } 112 | } 113 | 114 | Button { 115 | 116 | } label: { 117 | VStack { 118 | Image("placeholder_image") 119 | .resizable() 120 | .aspectRatio(contentMode: .fill) 121 | .frame(width: 45, height: 45) 122 | .clipShape(Circle()) 123 | 124 | Text("Profile") 125 | .font(.caption) 126 | .fontWeight(.semibold) 127 | .foregroundStyle(.gray) 128 | } 129 | } 130 | .padding(.top, 10) 131 | } 132 | .padding(.vertical) 133 | .frame(maxHeight: .infinity, alignment: .top) 134 | .frame(width: 100) 135 | .background( 136 | Color.white.ignoresSafeArea() 137 | ) 138 | } 139 | } 140 | 141 | #Preview { 142 | SideBarView() 143 | } 144 | -------------------------------------------------------------------------------- /L-Swift/Components/SideMenu/SideMenuView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SideMenuView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 02/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | class SidebarState: ObservableObject { 11 | @Published var isSideBarOpened = false 12 | } 13 | 14 | struct sideBar: Identifiable { 15 | var id = UUID() 16 | var icon: String 17 | var title: String 18 | var tab: TabIcon 19 | var index: Int 20 | } 21 | let sidebar = [ 22 | sideBar (icon: "house.fill", title: "Home", tab: .Home, index: 0), 23 | sideBar (icon: "creditcard.fill", title: "Card", tab: .Card, index: 1), 24 | sideBar(icon: "heart.fill", title: "Favorite", tab: .Favorite, index: 2), 25 | sideBar(icon: "cart.fill", title: "Purchases", tab: .Purchases, index: 3), 26 | sideBar(icon: "bell.badge.fill", title: "Notification", tab: .Notification, index: 4), 27 | ] 28 | enum TabIcon :String { 29 | case Home 30 | case Card 31 | case Favorite 32 | case Purchases 33 | case Notification 34 | } 35 | 36 | struct SideMenuView: View { 37 | @State var selectedItem:TabIcon = .Home 38 | @State var yOffset:CGFloat = 0 39 | @Binding var show: Bool 40 | let minDrag: CGFloat = 100 41 | 42 | var body: some View { 43 | VStack{ 44 | //sideMenu 45 | HStack(spacing: 0){ 46 | HStack{ 47 | content 48 | .offset(x: show ? 0 : -270) 49 | .gesture( 50 | DragGesture() 51 | .onEnded({ value in 52 | let shouldShow = value.translation.width > self.minDrag 53 | withAnimation { 54 | show = shouldShow 55 | } 56 | }) 57 | ) 58 | } 59 | .frame(maxWidth: .infinity, maxHeight: .infinity) 60 | 61 | HStack{ } 62 | .frame(maxWidth: .infinity, maxHeight: .infinity) 63 | .contentShape(Rectangle()) 64 | .onTapGesture { 65 | withAnimation { 66 | show = false 67 | } 68 | } 69 | } 70 | } 71 | } 72 | 73 | var content: some View { 74 | ZStack{ 75 | Color("sideBG") 76 | .frame(width: 266) 77 | .mask(RoundedRectangle (cornerRadius: 10, style: 78 | .continuous)) 79 | VStack(alignment: .leading){ 80 | VStack(alignment: .leading){ 81 | UserInfoView() 82 | 83 | TabSideview(selecteditem: $selectedItem, yOffset: $yOffset) 84 | } 85 | .padding(.leading,15) 86 | 87 | DividerSide() 88 | 89 | TabviewV() 90 | 91 | HStack{ 92 | Text("Learn more about the app ") 93 | .padding(.leading) 94 | Image(systemName: "questionmark.circle") 95 | } 96 | .foregroundColor(.white) 97 | .padding(.top,5) 98 | 99 | Spacer() 100 | 101 | HStack{ 102 | Bicon(icon: "moon.zzz.fill") 103 | Spacer() 104 | Text("Shpoing") 105 | .foregroundColor(.white) 106 | Spacer() 107 | Bicon(icon: "gearshape.fill") 108 | } 109 | .padding(.bottom,20) 110 | .frame(width: 230,height: 90) 111 | .padding(.leading,17) 112 | } 113 | } 114 | .ignoresSafeArea() 115 | .frame(maxHeight: .infinity) 116 | .frame(maxWidth: .infinity, alignment: .leading) 117 | } 118 | } 119 | 120 | struct SideMenuView_Previews: PreviewProvider { 121 | @StateObject var sidebarState: SidebarState = .init() 122 | static var previews: some View { 123 | SideMenuView(show: .constant(true)) 124 | } 125 | } 126 | 127 | struct UserInfoView: View { 128 | var body: some View { 129 | HStack{ 130 | Circle() 131 | .frame(width: 65, height: 65) 132 | VStack (alignment: .leading, spacing: 4){ 133 | RoundedRectangle(cornerRadius: 3, style: 134 | .continuous) 135 | .frame(width: 100, height: 14) 136 | RoundedRectangle (cornerRadius: 3, style: 137 | .continuous) 138 | .frame (width: 80, height: 7) 139 | .opacity (0.5) 140 | RoundedRectangle (cornerRadius: 3, style: 141 | .continuous) 142 | .frame(width: 52, height: 7) 143 | .opacity (0.5) 144 | } 145 | } 146 | .foregroundColor(.white) 147 | .padding(.top, 60) 148 | } 149 | } 150 | 151 | struct TabSideview: View { 152 | @Binding var selecteditem: TabIcon 153 | @Binding var yOffset:CGFloat 154 | @State var isAnimation = false 155 | 156 | var body: some View { 157 | ZStack (alignment: .leading) { 158 | Rectangle() 159 | .frame(width: isAnimation ? 7 : 230, height: 45) 160 | .foregroundColor(Color("se")) 161 | .cornerRadius (7) 162 | .offset(y: yOffset) 163 | .padding(.vertical, 8) 164 | .padding(. horizontal, 5) 165 | .offset(y: -125) 166 | .offset(x: -20) 167 | .animation(.default, value: isAnimation) 168 | VStack (spacing: 0) { 169 | ForEach(sidebar) { item in 170 | Button { 171 | withAnimation { 172 | isAnimation = true 173 | } 174 | DispatchQueue.main.asyncAfter (deadline: .now() + 0.3) { 175 | withAnimation { 176 | selecteditem = item.tab 177 | yOffset = CGFloat(item.index) * 70 178 | } 179 | } 180 | DispatchQueue.main.asyncAfter (deadline: .now() + 0.6){ 181 | withAnimation { 182 | isAnimation = false 183 | } 184 | } 185 | } label: { 186 | HStack{ 187 | ZStack{ 188 | Circle() 189 | .frame(width: 39, height: 40) 190 | .foregroundStyle(.ultraThinMaterial) 191 | Image(systemName: item.icon) 192 | . foregroundColor(.white) 193 | } 194 | Text(item.title).bold() 195 | .font (.title3) 196 | .foregroundColor(.white) 197 | .padding(.leading, 10) 198 | Spacer() 199 | } 200 | .padding(.top,30) 201 | } 202 | } 203 | } 204 | .frame(width: 246, height: 330) 205 | } 206 | } 207 | } 208 | 209 | struct DividerSide: View { 210 | var body: some View { 211 | Rectangle ().frame(width: 266, height: 1) 212 | .foregroundColor(.gray.opacity (0.4)) 213 | .padding(.top,30) 214 | } 215 | } 216 | 217 | struct Bicon: View { 218 | var icon = "" 219 | var body: some View { 220 | ZStack{ 221 | Circle() 222 | .frame(width: 48, height: 48) 223 | .foregroundStyle(.ultraThinMaterial) 224 | Image(systemName: icon) 225 | .foregroundColor(.white) 226 | } 227 | } 228 | } 229 | -------------------------------------------------------------------------------- /L-Swift/Components/SideMenu/TabViewV.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TabViewV.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 02/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct TabviewV: View { 11 | @State var selctedIndex = 0 12 | let timer = Timer.publish (every: 2, on: .main, in: .common).autoconnect() 13 | 14 | var body: some View { 15 | TabView(selection: $selctedIndex) { 16 | imageview(image: "m1") 17 | .tag(1) 18 | imageview(image: "m2") 19 | .tag(2) 20 | imageview(image: "m3") 21 | .tag(3) 22 | imageview(image: "m4") 23 | .tag(4) 24 | imageview(image: "m5") 25 | .tag(5) 26 | } 27 | .tabViewStyle(PageTabViewStyle()) 28 | .offset(x: -10) 29 | .frame(width: 266,height: 175) 30 | .padding(.top, 10) 31 | .onReceive(timer){ _ in 32 | withAnimation { 33 | selctedIndex = selctedIndex == 5 ? 0 : selctedIndex + 1 34 | } 35 | } 36 | .onAppear{ 37 | selctedIndex = 1 38 | } 39 | } 40 | } 41 | 42 | struct tabviewV_Previews: PreviewProvider { 43 | static var previews : some View { 44 | TabviewV() 45 | } 46 | } 47 | 48 | struct imageview: View { 49 | var image = "" 50 | var body: some View { 51 | Image (image) 52 | .resizable() 53 | .scaledToFill() 54 | .frame(width: 230, height: 157) 55 | .clipped () 56 | .cornerRadius (10) 57 | .padding(.leading, 15) 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /L-Swift/Components/TabBarLightAnimation/DataTabbarModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataTabbarModel.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 17/06/2024. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct TabbarLightModel: Identifiable { 11 | var id = UUID() 12 | var iconName: String 13 | var tab: TabbarLightIcon 14 | var index: Int 15 | } 16 | 17 | let tabLightItems = [ 18 | TabbarLightModel(iconName: "house", tab: .Discovery, index: 0), 19 | TabbarLightModel(iconName: "star", tab: .Playlists, index: 1), 20 | TabbarLightModel(iconName: "square.stack", tab: .Files, index: 2), 21 | TabbarLightModel(iconName: "person", tab: .Setting, index: 3) 22 | ] 23 | 24 | enum TabbarLightIcon: String{ 25 | case Discovery 26 | case Playlists 27 | case Files 28 | case Setting 29 | } 30 | -------------------------------------------------------------------------------- /L-Swift/Components/TabBarLightAnimation/LightShape.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LightShape.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 17/06/2024. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct Lightshape: View { 11 | var body: some View { 12 | LineShape() 13 | .frame(width: 50, height: 150) 14 | .foregroundStyle ( 15 | LinearGradient( 16 | stops: 17 | [ 18 | .init( 19 | color: .bgrYellow, 20 | location: 0.30 21 | ), 22 | .init( 23 | color: .clear, 24 | location: 0.64 25 | ) 26 | ], 27 | startPoint: .top, 28 | endPoint: .bottom 29 | ) 30 | ) 31 | .overlay (alignment: .bottom) { 32 | Rectangle() 33 | .frame(width: 50, height: 25) 34 | .offset(y: -46) 35 | .foregroundStyle(LinearGradient (gradient: Gradient (colors: [.clear,.bgGray,.bgGray]), startPoint: .top, endPoint: .bottom)) 36 | .blur(radius: 4) 37 | } 38 | } 39 | } 40 | 41 | #Preview { 42 | Lightshape() 43 | } 44 | 45 | struct LineShape: Shape{ 46 | func path (in rect: CGRect) -> Path { 47 | var path = Path() 48 | path.move(to: CGPoint(x: 12, y: 40)) 49 | path.addLine(to: CGPoint(x: 38, y: 40)) 50 | path.addLine(to: CGPoint(x: 50, y: 100)) 51 | path.addLine(to: CGPoint(x: 0.5, y: 100)) 52 | return path 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /L-Swift/Components/TabBarLightAnimation/TabBarLightAnimationView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TabBarLightAnimationView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 17/06/2024. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct TabBarLightAnimationView: View { 11 | 12 | @State private var selectedTab: TabbarLightIcon = .Discovery 13 | @State private var Xoffset = 0 * 70.0 14 | @State private var isVisible = true 15 | var flashing:Bool = false 16 | 17 | var body: some View { 18 | VStack{ 19 | ZStack{ 20 | HStack{ 21 | ForEach(tabLightItems){ item in 22 | Spacer() 23 | 24 | // VStack{ 25 | Image(systemName: item.iconName) 26 | .bold() 27 | .font(.title2) 28 | .foregroundStyle(.gray.opacity(0.4)) 29 | // Text(item.tab.rawValue) 30 | // .font(.subheadline) 31 | // .lineLimit(1) 32 | // } 33 | 34 | Spacer() 35 | } 36 | .frame(width: 33) 37 | } 38 | .frame(maxWidth: .infinity) 39 | .frame(height: 70) 40 | .background(Color.bgGray, in: .rect(cornerRadius: 24)) 41 | .overlay(alignment: .topLeading){ 42 | VStack(spacing: 0){ 43 | RoundedRectangle(cornerRadius: 10) 44 | .foregroundColor(.bgrYellow) 45 | .frame(width: 50, height: 4) 46 | 47 | Lightshape() 48 | .frame(height: 70) 49 | .opacity(isVisible ? 1 : 0) 50 | } 51 | .offset(x: 24, y: 0) 52 | .offset(x: Xoffset) 53 | } 54 | 55 | HStack{ 56 | ForEach(tabLightItems){ item in 57 | Spacer() 58 | 59 | // VStack{ 60 | Image(systemName: item.iconName) 61 | .bold() 62 | .font(.title2) 63 | .foregroundStyle(LinearGradient(gradient: Gradient(colors: [Color.bgrYellow, Color.bgrYellow.opacity(0.8)]), startPoint: .top, endPoint: .bottom)) 64 | .opacity(isVisible ? 1 : 0) 65 | .onTapGesture { 66 | withAnimation(.spring){ 67 | selectedTab = item.tab 68 | Xoffset = CGFloat(item.index) * 99 69 | } 70 | 71 | if flashing{ 72 | performFlashing() 73 | } 74 | } 75 | // Text(item.tab.rawValue) 76 | // .font(.subheadline) 77 | // .lineLimit(1) 78 | // } 79 | 80 | Spacer() 81 | } 82 | .frame(width: 33) 83 | } 84 | .frame(maxWidth: .infinity) 85 | .frame(height: 70) 86 | .mask { 87 | VStack(spacing: 0){ 88 | RoundedRectangle(cornerRadius: 10) 89 | .foregroundColor(.bgrYellow) 90 | .frame(width: 50, height: 4) 91 | 92 | Lightshape() 93 | .frame(height: 70) 94 | } 95 | .offset(x: 24, y: 0) 96 | .offset(x: Xoffset) 97 | .frame(maxWidth: .infinity, alignment: .topLeading) 98 | } 99 | } 100 | } 101 | .padding(.horizontal) 102 | } 103 | 104 | func performFlashing(){ 105 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.0){ 106 | isVisible = false 107 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.2){ 108 | isVisible = true 109 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.1){ 110 | isVisible = false 111 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.1){ 112 | isVisible = true 113 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.1){ 114 | isVisible = false 115 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.3){ 116 | isVisible = true 117 | } 118 | } 119 | } 120 | } 121 | } 122 | } 123 | } 124 | } 125 | 126 | #Preview { 127 | TabBarLightAnimationView() 128 | } 129 | -------------------------------------------------------------------------------- /L-Swift/Components/Tabbar2/HomeTabbar2View.swift: -------------------------------------------------------------------------------- 1 | // 2 | // HomeTabbar2View.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 12/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct HomeTabbar2View: View { 11 | @State private var activeTab: Tab = .home 12 | @Namespace private var animation 13 | @State private var tabShapePosition: CGPoint = .zero 14 | init(){ 15 | ///Hiding tab bar due to swiftui ios 16 bug 16 | UITabBar.appearance().isHidden = true 17 | } 18 | var body: some View { 19 | VStack(spacing: 0){ 20 | TabView(selection: $activeTab) { 21 | Text("Home") 22 | .tag(Tab.home) 23 | ///hiding native tab bar 24 | // .toolbar(.hidden, for: .tabBar) 25 | 26 | Text("Service") 27 | .tag(Tab.services) 28 | ///hiding native tab bar 29 | // .toolbar(.hidden, for: .tabBar) 30 | 31 | Text("Partners") 32 | .tag(Tab.partners) 33 | ///hiding native tab bar 34 | // .toolbar(.hidden, for: .tabBar) 35 | 36 | Text("Activity") 37 | .tag(Tab.activity) 38 | ///hiding native tab bar 39 | // .toolbar(.hidden, for: .tabBar) 40 | } 41 | 42 | CustomTabbar() 43 | } 44 | } 45 | 46 | ///Custom tab bar 47 | ///With more easy customization 48 | @ViewBuilder 49 | func CustomTabbar(_ tint: Color = Color("Blue"), _ inactiveTint: Color = .blue) -> some View{ 50 | HStack(alignment: .bottom,spacing: 0){ 51 | ForEach(Tab.allCases, id: \.rawValue){ 52 | TabItem(tint: tint, inativeTint: inactiveTint, tab: $0,animation: animation ,activeTab: $activeTab, position: $tabShapePosition) 53 | } 54 | } 55 | .padding(.horizontal, 15) 56 | .padding(.vertical,10) 57 | .background(content: { 58 | TabShape(midpoint: tabShapePosition.x) 59 | .fill(.white) 60 | .ignoresSafeArea() 61 | ///Adding blur + shadow 62 | ///for shape smoothening 63 | .shadow(color: tint.opacity(0.2), radius: 5,x: 0, y: -5) 64 | .blur(radius: 2) 65 | .padding(.top, 25) 66 | }) 67 | .animation(.interactiveSpring(response: 0.6, dampingFraction: 0.7, blendDuration: 0.7), value: activeTab) 68 | } 69 | } 70 | 71 | struct TabItem: View{ 72 | var tint: Color 73 | var inativeTint: Color 74 | var tab: Tab 75 | var animation: Namespace.ID 76 | @Binding var activeTab: Tab 77 | @Binding var position: CGPoint 78 | 79 | @State private var tabPosition: CGPoint = .zero 80 | var body: some View{ 81 | VStack(spacing: 5){ 82 | Image(systemName: tab.systemImage) 83 | .font(.title2) 84 | .foregroundColor(activeTab == tab ? .white : inativeTint) 85 | .frame(width: activeTab == tab ? 58 : 35, height: activeTab == tab ? 58 : 35) 86 | .background { 87 | if activeTab == tab{ 88 | Circle() 89 | .fill(tint.gradient) 90 | .matchedGeometryEffect(id: "ACTIVETAB", in: animation) 91 | } 92 | } 93 | 94 | Text(tab.rawValue) 95 | .font(.caption) 96 | .foregroundColor(activeTab == tab ? tint : .gray) 97 | } 98 | .hAlign(.center) 99 | .contentShape(Rectangle()) 100 | .viewPosition(completion: { rect in 101 | tabPosition.x = rect.midX 102 | 103 | /// updating active tab position 104 | if activeTab == tab{ 105 | position.x = rect.midX 106 | } 107 | }) 108 | .onTapGesture { 109 | activeTab = tab 110 | 111 | withAnimation(.interactiveSpring(response: 0.6, dampingFraction: 0.7, blendDuration: 0.7)){ 112 | position.x = tabPosition.x 113 | } 114 | } 115 | } 116 | } 117 | 118 | struct HomeTabbar2View_Previews: PreviewProvider { 119 | static var previews: some View { 120 | HomeTabbar2View() 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /L-Swift/Components/Tabbar2/TabPosition.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TabPosition.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 12/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | 11 | /// Custom View Extension 12 | /// Which will Return View Position 13 | struct PositionKey: PreferenceKey { 14 | static var defaultValue: CGRect = .zero 15 | static func reduce(value: inout CGRect, nextValue: () -> CGRect) { 16 | value = nextValue() 17 | } 18 | } 19 | 20 | extension View { 21 | @ViewBuilder 22 | func viewPosition (completion: @escaping (CGRect) -> ()) -> some View { 23 | self 24 | .overlay { 25 | GeometryReader { 26 | let rect = $0.frame(in: .global) 27 | Color.clear 28 | .preference(key: PositionKey.self, value: rect) 29 | .onPreferenceChange (PositionKey.self, perform: completion) 30 | } 31 | } 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /L-Swift/Components/Tabbar2/TabShape.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TabShape.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 12/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | /// Custom Tab Shape 11 | struct TabShape: Shape { 12 | var midpoint: CGFloat 13 | 14 | ///adding shape animation 15 | var animatableData: CGFloat{ 16 | get { midpoint } 17 | set { 18 | midpoint = newValue 19 | } 20 | } 21 | 22 | func path(in rect: CGRect) -> Path { 23 | return Path { path in 24 | /// First Drawing the Rectangle Shape 25 | path.addPath (Rectangle().path(in: rect)) 26 | /// Now Drawing Upward Curve Shape 27 | path.move(to: .init(x: midpoint - 60, y: 0)) 28 | 29 | let to = CGPoint(x: midpoint, y: -25) 30 | let control1 = CGPoint(x: midpoint - 25, y: 0) 31 | let control2 = CGPoint(x: midpoint - 25, y: -25) 32 | 33 | path.addCurve(to: to, control1: control1, control2: control2) 34 | 35 | let to1 = CGPoint (x: midpoint + 60, y: 0) 36 | let control3 = CGPoint (x: midpoint + 25, y:-25) 37 | let control4 = CGPoint (x: midpoint + 25, y: 0) 38 | path.addCurve(to: to1, control1: control3, control2: control4) 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /L-Swift/Components/TabbarAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TabbarAnimation.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 02/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct Tabbar: Identifiable{ 11 | var id = UUID() 12 | var iconName: String 13 | var tab: TabbarIcon 14 | var index: Int 15 | } 16 | 17 | enum TabbarIcon: String{ 18 | case Home 19 | case Card 20 | case Favorite 21 | case Purchases 22 | case Notification 23 | } 24 | 25 | let tabItems = [Tabbar(iconName: "square.stack", tab: .Card, index: 0), 26 | Tabbar(iconName: "magnifyingglass", tab: .Favorite, index: 1), 27 | Tabbar(iconName: "house", tab: .Home, index: 2), 28 | Tabbar(iconName: "star", tab: .Purchases, index: 3), 29 | Tabbar(iconName: "person", tab: .Notification, index: 4)] 30 | 31 | struct TabbarAnimation: View { 32 | @State var progress: CGFloat = 0.5 33 | @State var selectedTab: TabbarIcon = .Home 34 | @State var xOffset = 2 * 70.0 35 | 36 | var body: some View { 37 | GeometryReader { geometry in 38 | HStack { 39 | ForEach(tabItems) { item in 40 | Spacer() 41 | Image(systemName: item.iconName) 42 | .foregroundColor(.black) 43 | .onTapGesture { 44 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) { 45 | withAnimation() { 46 | selectedTab = item.tab 47 | xOffset = CGFloat(item.index) * 70.0 48 | } 49 | } 50 | withAnimation { 51 | progress = 0.0 52 | } 53 | DispatchQueue.main.asyncAfter(deadline: .now() + 0.9) { 54 | withAnimation() { 55 | progress = 0.5 56 | } 57 | } 58 | } 59 | Spacer() 60 | } 61 | .frame(width: 23.3, height: 23) 62 | } 63 | .frame(maxWidth: geometry.size.width - 77) 64 | .frame(height: 73) 65 | .background(.ultraThickMaterial) 66 | .cornerRadius(20) 67 | .overlay(alignment: .topLeading) { 68 | CircleAnimation(circleA: $progress) 69 | .offset(x: 16.3, y: 17) 70 | .offset(x: xOffset) 71 | } 72 | .frame(maxWidth: .infinity) 73 | } 74 | } 75 | } 76 | 77 | struct TabbarAnimation_Previews: PreviewProvider { 78 | static var previews: some View { 79 | TabbarAnimation() 80 | } 81 | } 82 | 83 | struct CircleAnimation: View { 84 | @Binding var circleA: CGFloat 85 | 86 | var body: some View { 87 | VStack{ 88 | Button{ 89 | withAnimation(.easeInOut(duration: 2.0)) { 90 | circleA = circleA == 0.0 ? 0.5 : 0.0 91 | } 92 | }label: { 93 | ZStack{ 94 | Circle() 95 | .trim(from: 0.0, to: circleA) 96 | .stroke(lineWidth: 4) 97 | .frame(width: 40, height: 40) 98 | .rotationEffect(.degrees(-90)) 99 | Circle() 100 | .frame(width: 4, height: 4) 101 | .offset(y: -20) 102 | } 103 | } 104 | 105 | Button{ 106 | withAnimation(.easeInOut(duration: 2.0)) { 107 | circleA = circleA == 0.0 ? 0.5 : 0.0 108 | } 109 | }label: { 110 | ZStack{ 111 | Circle() 112 | .trim(from: 0.0, to: circleA) 113 | .stroke(lineWidth: 4) 114 | .frame(width: 40, height: 40) 115 | .rotationEffect(.degrees(90)) 116 | Circle() 117 | .frame(width: 4, height: 4) 118 | .offset(y: 20) 119 | } 120 | } 121 | .offset(y: -48) 122 | } 123 | .foregroundColor(.black) 124 | } 125 | } 126 | -------------------------------------------------------------------------------- /L-Swift/Components/TimeLineAnimation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TimeLineAnimationView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 14/06/2024. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct TLModel: Identifiable{ 11 | var id = UUID() 12 | var title: String 13 | var isCompleted: Bool 14 | } 15 | 16 | struct TimeLineAnimationView: View { 17 | 18 | @State private var list: [TLModel] = [ 19 | TLModel( 20 | title: "Hello world", 21 | isCompleted: false 22 | ), 23 | TLModel( 24 | title: "SwiftUI Animation", 25 | isCompleted: false 26 | ), 27 | TLModel( 28 | title: "Xcode 14+, IOS 16+", 29 | isCompleted: false 30 | ) 31 | ] 32 | 33 | var body: some View { 34 | LazyVStack(spacing: 0){ 35 | ForEach(list.indices, id: \.self) { item in 36 | let todo = list[item] 37 | 38 | HStack(spacing: 15){ 39 | Image(systemName: todo.isCompleted ? "checkmark.circle.fill" : "circle") 40 | .imageScale(.medium) 41 | .foregroundStyle(todo.isCompleted ? .green : .text) 42 | 43 | Text(todo.title) 44 | .strikethrough(todo.isCompleted) 45 | .lineLimit(1) 46 | .animation(.none, value: todo.isCompleted) 47 | Spacer() 48 | } 49 | .overlay(alignment: .topLeading) { 50 | Rectangle() 51 | .frame(width: 1, height: todo.isCompleted ? 53 : 0) 52 | .offset(y: 20) 53 | .padding(.leading, 9) 54 | } 55 | .frame(height: 70) 56 | .animation(.bouncy, value: todo.isCompleted) 57 | .hAlign(.leading) 58 | .contentShape(Rectangle()) 59 | .onTapGesture { 60 | withAnimation { 61 | list[item].isCompleted.toggle() 62 | } 63 | } 64 | } 65 | 66 | VStack{ 67 | if !list.isEmpty{ 68 | HStack(spacing: 15){ 69 | Image(systemName: list.allSatisfy({$0.isCompleted}) ? "checkmark.circle.fill" : "circle") 70 | .imageScale(.medium) 71 | 72 | Text("Finish") 73 | 74 | Spacer() 75 | } 76 | .foregroundStyle(list.allSatisfy({$0.isCompleted}) ? .green : .gray) 77 | .frame(height: 46, alignment: .bottom) 78 | .animation(.bouncy, value: list.allSatisfy({$0.isCompleted})) 79 | .onTapGesture { 80 | let allTrue = list.allSatisfy({$0.isCompleted}) 81 | 82 | let delayStep = 0.5 83 | let indices = allTrue ? Array(list.indices.reversed()) : Array(list.indices) 84 | for (offset , item) in indices.enumerated(){ 85 | let delay = Double (offset) * delayStep 86 | DispatchQueue.main.asyncAfter (deadline: .now() + delay) { 87 | self.list[item].isCompleted = !allTrue 88 | } 89 | } 90 | } 91 | } 92 | } 93 | } 94 | .padding(.horizontal) 95 | } 96 | } 97 | 98 | #Preview { 99 | TimeLineAnimationView() 100 | } 101 | -------------------------------------------------------------------------------- /L-Swift/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 02/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ContentView: View { 11 | @State var show = true 12 | @State var searchText = "" 13 | 14 | var body: some View { 15 | NavigationStack{ 16 | ScrollView(showsIndicators: false){ 17 | VStack(spacing: 15) { 18 | navigationScreen("Compositional") { 19 | HomeCompositional() 20 | } 21 | 22 | navigationScreen("Particle Effects") { 23 | ParticleEffectsHome() 24 | } 25 | 26 | navigationScreen("Tab bar") { 27 | HomeTabbar2View() 28 | } 29 | 30 | navigationScreen("Side Menu") { 31 | SideMenuView(show: $show) 32 | } 33 | 34 | navigationScreen("Onboarding") { 35 | OnboardingView() 36 | } 37 | 38 | navigationScreen("Onboarding 2") { 39 | HomeOnBoarding2() 40 | } 41 | 42 | navigationScreen("Movable Grids") { 43 | MovableGrids() 44 | } 45 | 46 | navigationScreen("Arc Menu Button") { 47 | ArcMenuButton(buttons: Array(ArcMenuButtonName.allCases)) { button in 48 | switch button { 49 | case .capture: 50 | print("Capture button tapped.") 51 | case .star: 52 | print("star button tapped.") 53 | case .noti: 54 | print("noti button tapped.") 55 | case .bookmark: 56 | print("bookmark button tapped.") 57 | } 58 | } 59 | } 60 | 61 | navigationScreen("Password Strength") { 62 | PasswordStrength() 63 | } 64 | 65 | navigationScreen("Custom Search bar") { 66 | CustomSearchbar(searchText: $searchText) 67 | } 68 | 69 | navigationScreen("Bubble Transition") { 70 | BubbleTransition() 71 | } 72 | 73 | navigationScreen("Segment Animated") { 74 | SegmentAnimatedView() 75 | } 76 | 77 | navigationScreen("Time Line Animation") { 78 | TimeLineAnimationView() 79 | } 80 | 81 | navigationScreen("TabBar Light Animation") { 82 | TabBarLightAnimationView(flashing: true) 83 | } 84 | } 85 | .padding() 86 | } 87 | } 88 | } 89 | 90 | @ViewBuilder 91 | func navigationScreen(_ title: String, @ViewBuilder content: @escaping () -> Content) -> some View { 92 | NavigationLink { 93 | content() 94 | } label: { 95 | HStack { 96 | Text("\(title)") 97 | .font(.title3) 98 | .foregroundStyle(Color.text) 99 | 100 | Spacer() 101 | 102 | Image(systemName: "chevron.right") 103 | .imageScale(.large) 104 | .foregroundStyle(Color.text) 105 | } 106 | } 107 | } 108 | } 109 | 110 | struct ContentView_Previews: PreviewProvider { 111 | static var previews: some View { 112 | ContentView() 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /L-Swift/Extension/Color.swift: -------------------------------------------------------------------------------- 1 | 2 | import Foundation 3 | import SwiftUI 4 | extension Color{ 5 | init(hex string: String) { 6 | var string: String = string.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) 7 | if string.hasPrefix("#") { 8 | _ = string.removeFirst() 9 | } 10 | 11 | // Double the last value if incomplete hex 12 | if !string.count.isMultiple(of: 2), let last = string.last { 13 | string.append(last) 14 | } 15 | 16 | // Fix invalid values 17 | if string.count > 8 { 18 | string = String(string.prefix(8)) 19 | } 20 | 21 | // Scanner creation 22 | let scanner = Scanner(string: string) 23 | 24 | var color: UInt64 = 0 25 | scanner.scanHexInt64(&color) 26 | 27 | if string.count == 2 { 28 | let mask = 0xFF 29 | 30 | let g = Int(color) & mask 31 | 32 | let gray = Double(g) / 255.0 33 | 34 | self.init(.sRGB, red: gray, green: gray, blue: gray, opacity: 1) 35 | 36 | } else if string.count == 4 { 37 | let mask = 0x00FF 38 | 39 | let g = Int(color >> 8) & mask 40 | let a = Int(color) & mask 41 | 42 | let gray = Double(g) / 255.0 43 | let alpha = Double(a) / 255.0 44 | 45 | self.init(.sRGB, red: gray, green: gray, blue: gray, opacity: alpha) 46 | 47 | } else if string.count == 6 { 48 | let mask = 0x0000FF 49 | let r = Int(color >> 16) & mask 50 | let g = Int(color >> 8) & mask 51 | let b = Int(color) & mask 52 | 53 | let red = Double(r) / 255.0 54 | let green = Double(g) / 255.0 55 | let blue = Double(b) / 255.0 56 | 57 | self.init(.sRGB, red: red, green: green, blue: blue, opacity: 1) 58 | 59 | } else if string.count == 8 { 60 | let mask = 0x000000FF 61 | let r = Int(color >> 24) & mask 62 | let g = Int(color >> 16) & mask 63 | let b = Int(color >> 8) & mask 64 | let a = Int(color) & mask 65 | 66 | let red = Double(r) / 255.0 67 | let green = Double(g) / 255.0 68 | let blue = Double(b) / 255.0 69 | let alpha = Double(a) / 255.0 70 | 71 | self.init(.sRGB, red: red, green: green, blue: blue, opacity: alpha) 72 | 73 | } else { 74 | self.init(.sRGB, red: 1, green: 1, blue: 1, opacity: 1) 75 | } 76 | } 77 | func hexValue() -> String { 78 | guard let values = self.cgColor?.components else {return "000000"} 79 | var outputR: Int = 0 80 | var outputG: Int = 0 81 | var outputB: Int = 0 82 | var outputA: Int = 1 83 | 84 | switch values.count { 85 | case 1: 86 | outputR = Int(values[0] * 255) 87 | outputG = Int(values[0] * 255) 88 | outputB = Int(values[0] * 255) 89 | outputA = 1 90 | case 2: 91 | outputR = Int(values[0] * 255) 92 | outputG = Int(values[0] * 255) 93 | outputB = Int(values[0] * 255) 94 | outputA = Int(values[1] * 255) 95 | case 3: 96 | outputR = Int(values[0] * 255) 97 | outputG = Int(values[1] * 255) 98 | outputB = Int(values[2] * 255) 99 | outputA = 1 100 | case 4: 101 | outputR = Int(values[0] * 255) 102 | outputG = Int(values[1] * 255) 103 | outputB = Int(values[2] * 255) 104 | outputA = Int(values[3] * 255) 105 | default: 106 | break 107 | } 108 | return String(format:"%02X", outputR) + String(format:"%02X", outputG) + String(format:"%02X", outputB) + String(format:"%02X", outputA) 109 | } 110 | 111 | public static var text: Color = Color("Text") 112 | public static var text2: Color = Color("Text2") 113 | public static var toastBackground: Color = Color("toastBackground") 114 | public static var toastForeground: Color = Color("toastForeground") 115 | public static var text5: LinearGradient = LinearGradient(colors: [Color(hex: "0067E0"), Color(hex: "00336F")], startPoint: .top, endPoint: .bottom) 116 | public static var background: Color = Color("Background") 117 | public static var background2: Color = Color("Background2") 118 | public static var bgGray: Color = Color("BgGray") 119 | public static var bgrYellow: Color = Color("bgrYellow") 120 | static var random: Color { 121 | return Color( 122 | red: .random(in: 0...1), 123 | green: .random(in: 0...1), 124 | blue: .random(in: 0...1) 125 | ) 126 | } 127 | } 128 | extension UIColor{ 129 | convenience init(hex string: String) { 130 | var string: String = string.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) 131 | if string.hasPrefix("#") { 132 | _ = string.removeFirst() 133 | } 134 | 135 | // Double the last value if incomplete hex 136 | if !string.count.isMultiple(of: 2), let last = string.last { 137 | string.append(last) 138 | } 139 | 140 | // Fix invalid values 141 | if string.count > 8 { 142 | string = String(string.prefix(8)) 143 | } 144 | 145 | // Scanner creation 146 | let scanner = Scanner(string: string) 147 | 148 | var color: UInt64 = 0 149 | scanner.scanHexInt64(&color) 150 | 151 | if string.count == 2 { 152 | let mask = 0xFF 153 | 154 | let g = Int(color) & mask 155 | 156 | let gray = CGFloat(g) / 255.0 157 | 158 | self.init(red: gray, green: gray, blue: gray, alpha: 1) 159 | 160 | } else if string.count == 4 { 161 | let mask = 0x00FF 162 | 163 | let g = Int(color >> 8) & mask 164 | let a = Int(color) & mask 165 | 166 | let gray = CGFloat(g) / 255.0 167 | let alpha = CGFloat(a) / 255.0 168 | 169 | self.init(red: gray, green: gray, blue: gray, alpha: alpha) 170 | 171 | } else if string.count == 6 { 172 | let mask = 0x0000FF 173 | let r = Int(color >> 16) & mask 174 | let g = Int(color >> 8) & mask 175 | let b = Int(color) & mask 176 | 177 | let red = CGFloat(r) / 255.0 178 | let green = CGFloat(g) / 255.0 179 | let blue = CGFloat(b) / 255.0 180 | 181 | self.init(red: red, green: green, blue: blue, alpha: 1) 182 | 183 | } else if string.count == 8 { 184 | let mask = 0x000000FF 185 | let r = Int(color >> 24) & mask 186 | let g = Int(color >> 16) & mask 187 | let b = Int(color >> 8) & mask 188 | let a = Int(color) & mask 189 | 190 | let red = CGFloat(r) / 255.0 191 | let green = CGFloat(g) / 255.0 192 | let blue = CGFloat(b) / 255.0 193 | let alpha = CGFloat(a) / 255.0 194 | 195 | self.init(red: red, green: green, blue: blue, alpha: alpha) 196 | 197 | } else { 198 | self.init(red: 1, green: 1, blue: 1, alpha: 1) 199 | } 200 | } 201 | } 202 | -------------------------------------------------------------------------------- /L-Swift/Extension/Views.swift: -------------------------------------------------------------------------------- 1 | 2 | import Foundation 3 | import SwiftUI 4 | 5 | 6 | // MARK: - Custom view extension for ui building 7 | extension View{ 8 | func closeKeyBoard(){ 9 | UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil) 10 | } 11 | 12 | func disableWithOpacity(_ condition: Bool) -> some View{ 13 | self 14 | .disabled(condition) 15 | .opacity(condition ? 0.6 : 1) 16 | } 17 | func hAlign(_ alignment: Alignment) -> some View{ 18 | self 19 | .frame(maxWidth: .infinity, alignment: alignment) 20 | } 21 | 22 | func vAlign(_ alignment: Alignment) -> some View{ 23 | self 24 | .frame(maxHeight: .infinity, alignment: alignment) 25 | } 26 | 27 | // Mark: custom border view with padding 28 | func border (_ width: CGFloat, _ color: Color) -> some View{ 29 | self 30 | .padding(.horizontal, 15) 31 | .padding(.vertical, 10) 32 | .background{ 33 | RoundedRectangle(cornerRadius: 5, style: .continuous) 34 | .stroke(color,lineWidth: width) 35 | } 36 | } 37 | 38 | // Mark: custom fill view with padding 39 | func fillView (_ color: Color) -> some View{ 40 | self 41 | .padding(.horizontal, 15) 42 | .padding(.vertical, 10) 43 | .background{ 44 | RoundedRectangle(cornerRadius: 5, style: .continuous) 45 | .fill(color) 46 | } 47 | } 48 | 49 | func linearGradient()->some View{ 50 | LinearGradient(gradient: Gradient(colors: [Color(hex: "2C2A4B"), Color(hex: "1E1E2F")]), startPoint: .top, endPoint: .bottom) 51 | .frame(height: 90) 52 | } 53 | 54 | func angularGradient()->some View{ 55 | AngularGradient(gradient: Gradient(colors: [.red, .purple, .blue, .green, .yellow, .red]), center: .center) 56 | } 57 | 58 | func styledText(text: String, foregroundColor: Color, font: Font) -> some View { 59 | Text(text) 60 | .foregroundColor(foregroundColor) 61 | .font(font) 62 | } 63 | 64 | func placeholder( 65 | when shouldShow: Bool, 66 | alignment: Alignment = .leading, 67 | @ViewBuilder placeholder: () -> Content) -> some View { 68 | 69 | ZStack(alignment: alignment) { 70 | placeholder().opacity(shouldShow ? 1 : 0) 71 | self 72 | } 73 | } 74 | } 75 | 76 | extension View { 77 | #if os(iOS) 78 | func onBackground(_ f: @escaping () -> Void) -> some View { 79 | self.onReceive( 80 | NotificationCenter.default.publisher(for: UIApplication.willResignActiveNotification), 81 | perform: { _ in f() } 82 | ) 83 | } 84 | 85 | func onForeground(_ f: @escaping () -> Void) -> some View { 86 | self.onReceive( 87 | NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification), 88 | perform: { _ in f() } 89 | ) 90 | } 91 | #else 92 | func onBackground(_ f: @escaping () -> Void) -> some View { 93 | self.onReceive( 94 | NotificationCenter.default.publisher(for: NSApplication.willResignActiveNotification), 95 | perform: { _ in f() } 96 | ) 97 | } 98 | 99 | func onForeground(_ f: @escaping () -> Void) -> some View { 100 | self.onReceive( 101 | NotificationCenter.default.publisher(for: NSApplication.didBecomeActiveNotification), 102 | perform: { _ in f() } 103 | ) 104 | } 105 | #endif 106 | } 107 | 108 | extension View { 109 | func popup(isPresented: Binding, @ViewBuilder content: @escaping () -> Content) -> some View { 110 | return ZStack { 111 | self 112 | 113 | if isPresented.wrappedValue { 114 | Color.black.opacity(0.4) 115 | .edgesIgnoringSafeArea(.all) 116 | .transition(.opacity) 117 | .onTapGesture { 118 | isPresented.wrappedValue = false 119 | } 120 | 121 | content() 122 | .transition(.scale) 123 | } 124 | } 125 | } 126 | } 127 | 128 | extension UINavigationController: UIGestureRecognizerDelegate { 129 | override open func viewDidLoad() { 130 | super.viewDidLoad() 131 | interactivePopGestureRecognizer?.delegate = self 132 | } 133 | 134 | public func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool { 135 | return viewControllers.count > 1 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /L-Swift/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | UIApplicationSceneManifest 6 | 7 | UIApplicationSupportsMultipleScenes 8 | 9 | UISceneConfigurations 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /L-Swift/L_SwiftApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // L_SwiftApp.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 02/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct L_SwiftApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /L-Swift/Models/ImageModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageModel.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 13/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct ImageModel: Identifiable, Codable, Hashable { 11 | var id: String 12 | var download_url: String 13 | 14 | enum CodingKeys: String, CodingKey{ 15 | case id 16 | case download_url 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /L-Swift/Models/PageIntro.swift: -------------------------------------------------------------------------------- 1 | // 2 | // PageIntro.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 11/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct PageIntro: Identifiable, Hashable { 11 | var id: UUID = .init() 12 | var introAssetImage: String 13 | var title: String 14 | var subTitle: String 15 | var displayAction: Bool = false 16 | } 17 | 18 | var pageIntros: [PageIntro] = [ 19 | .init(introAssetImage: "page 1", title: "Connect With\nCreators Easily", subTitle: "Thank you for choosing us, we can save your lovely time."), 20 | .init(introAssetImage: "page 2", title: "Get Inspiration\nFrom Creators", subTitle: "Find your favourite creator and get inspired by them."), 21 | .init(introAssetImage: "page 2", title: "Let's\nGet Started", subTitle: "To register for an account, kindly enter yourdetails.", displayAction: true), 22 | ] 23 | 24 | -------------------------------------------------------------------------------- /L-Swift/Models/Particle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Particle.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 12/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct Particale: Identifiable{ 11 | var id: UUID = .init() 12 | var randomX: CGFloat = 0 13 | var randomY: CGFloat = 0 14 | var scale: CGFloat = 1 15 | //optional 16 | var opacity: CGFloat = 1 17 | 18 | //reset all props 19 | mutating func reset(){ 20 | randomX = 0 21 | randomY = 0 22 | scale = 1 23 | opacity = 1 24 | } 25 | } 26 | 27 | -------------------------------------------------------------------------------- /L-Swift/Models/Tab.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Tab.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 12/10/2023. 6 | // 7 | 8 | import Foundation 9 | 10 | //app tabs 11 | 12 | enum Tab: String, CaseIterable{ 13 | case home = "Home" 14 | case services = "Service" 15 | case partners = "Partners" 16 | case activity = "Activity" 17 | 18 | var systemImage: String{ 19 | switch self{ 20 | case .home: 21 | return "house" 22 | case .services: 23 | return "envelope.open.badge.clock" 24 | case .partners: 25 | return "hand.raised" 26 | case .activity: 27 | return "bell" 28 | } 29 | } 30 | 31 | var index: Int{ 32 | return Tab.allCases.firstIndex(of: self) ?? 0 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /L-Swift/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /L-Swift/ViewModel/ImageFetcher.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ImageFetcher.swift 3 | // L-Swift 4 | // 5 | // Created by xqsadness on 13/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | class ImageFetcher: ObservableObject { 11 | @Published var fetchedImage: [ImageModel]? 12 | 13 | //MARK: Pagination Props 14 | @Published var currentPage: Int = 0 15 | @Published var startPagination: Bool = false 16 | @Published var endPagination: Bool = false 17 | 18 | init(){ 19 | updateImages() 20 | } 21 | 22 | func updateImages(){ 23 | currentPage += 1 24 | Task{ 25 | do { 26 | try await fetchImage() 27 | }catch{ 28 | //err 29 | } 30 | } 31 | } 32 | 33 | //MARK: Image JSON Fetching 34 | func fetchImage()async throws{ 35 | guard let url = URL(string: "https://picsum.photos/v2/list?page=\(currentPage)&limit=30") else{ 36 | return 37 | } 38 | 39 | let resonse = try await URLSession.shared.data(from: url) 40 | // MARK: reducing image size 41 | // API call supports image sizing 42 | let images = try JSONDecoder().decode([ImageModel].self, from: resonse.0).compactMap({ item -> ImageModel? in 43 | let imageID = item.id 44 | let sizeUrl = "https://picsum.photos/id/\(imageID)/500/500" 45 | return .init(id: imageID, download_url: sizeUrl) 46 | }) 47 | 48 | await MainActor.run(body: { 49 | if fetchedImage == nil {fetchedImage = []} 50 | fetchedImage?.append(contentsOf: images) 51 | //MARK: Limiting to 100 image 52 | endPagination = (fetchedImage?.count ?? 0) > 100 53 | startPagination = false 54 | }) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | https://github.com/xqsadness/SwiftUI-Animation/assets/81242756/c78c229f-5699-4bb7-9808-6f0e3dd2e3b9 3 | ### L-SwiftUI 4 | 5 | 6 | Onboarding 7 | 8 | https://github.com/xqsadness/L-SwiftUI/assets/81242756/84e4d562-41a8-4051-a4d7-1b8a3a1517cd 9 | 10 | Onboarding 2 11 | 12 | https://github.com/xqsadness/L-SwiftUI/assets/81242756/80116b13-561a-481a-9a9d-6802fdc0b1c5 13 | 14 | SideMenu 15 | 16 | https://github.com/xqsadness/L-SwiftUI/assets/81242756/2c48487d-a303-4a09-92d4-27fbed1100fa 17 | 18 | Tabbar 2 19 | 20 | https://github.com/xqsadness/L-SwiftUI/assets/81242756/77b71d05-b009-4a9a-9cb7-7f5537130b32 21 | 22 | ParticleEffects 23 | 24 | https://github.com/xqsadness/L-SwiftUI/assets/81242756/6e72b7af-2856-4065-9c67-588c6acaba0c 25 | 26 | ArcMenuButton 27 | 28 | https://github.com/xqsadness/L-SwiftUI/assets/81242756/9098bfe4-9639-45e6-87da-9a55be814f4d 29 | 30 | Compositional Layout 31 | 32 | https://github.com/xqsadness/L-SwiftUI/assets/81242756/c4bbd46a-8d9f-4c31-a41c-b66a866d2f27 33 | 34 | Strength Meter with Progress & Color Feedback 35 | 36 | https://github.com/xqsadness/L-SwiftUI/assets/81242756/3b92ff8b-96b7-48a0-baf4-f7672e83d39f 37 | 38 | Custom Search bar 39 | 40 | https://github.com/xqsadness/L-SwiftUI/assets/81242756/46b5b3dd-bfac-4c59-905d-1aeaf7db6842 41 | 42 | BubbleTransition 43 | 44 | https://github.com/xqsadness/L-SwiftUI/assets/81242756/997d79a5-951b-48b2-bc6f-7679f28688a9 45 | 46 | Custom Segment Animated 47 | 48 | https://github.com/xqsadness/SwiftUI-Animation/assets/81242756/d1656ac0-1c27-4d44-a07f-f85119ccba48 49 | 50 | Time Line Animation 51 | 52 | https://github.com/xqsadness/SwiftUI-Animation/assets/81242756/7769c8d0-c826-466d-b5a0-0825467c7bcf 53 | 54 | Tabbar light Animation 55 | 56 | https://github.com/xqsadness/SwiftUI-Animation/assets/81242756/32c2df30-a65b-4506-a986-c8713d10bbc2 57 | 58 | --------------------------------------------------------------------------------