├── .github └── ISSUE_TEMPLATE │ ├── bugs.md │ └── new-features.md ├── .gitignore ├── Escapades.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── swiftpm │ │ └── Package.resolved └── xcuserdata │ └── raphaelsalaja.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── Escapades ├── 0. Global Helpers │ └── Modifier+Extensions.swift ├── 1. Layered Stack │ ├── LayeredStackElement.swift │ ├── LayeredStackShowcase.swift │ └── Models │ │ └── Transactions.swift ├── 2. Banter Club │ └── BanterClub.swift ├── 3. Border Radius │ ├── BorderRadiusCalculator.swift │ ├── BorderRadiusCalculatorIllustration.swift │ └── BorderRadiusComponents.swift ├── 5. Link Preview │ ├── LinkPreview.swift │ └── LinkPreviewView.swift ├── Assets.xcassets │ ├── AccentColor.colorset │ │ └── Contents.json │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Chelsea Profile Picture.imageset │ │ ├── Chelsea Profile Picture.png │ │ └── Contents.json │ ├── Chelsea.imageset │ │ ├── Chelsea.png │ │ └── Contents.json │ ├── Contents.json │ ├── Everton.imageset │ │ ├── Contents.json │ │ └── Everton.png │ ├── Rick.imageset │ │ ├── Contents.json │ │ └── Rick.jpg │ └── Youtube.imageset │ │ ├── Contents.json │ │ └── Youtube.png ├── ContentView.swift ├── EscapadesApp.swift └── Preview Content │ └── Preview Assets.xcassets │ └── Contents.json ├── LICENSE ├── README.md └── Widgets ├── 1. Screenshots Stash └── SwiftUIView.swift ├── AppIntent.swift ├── Assets.xcassets ├── AccentColor.colorset │ └── Contents.json ├── AppIcon.appiconset │ └── Contents.json ├── Contents.json └── WidgetBackground.colorset │ └── Contents.json ├── Info.plist ├── WidgetsBundle.swift └── WidgetsLiveActivity.swift /.github/ISSUE_TEMPLATE/bugs.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bugs 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: rafunderscore 7 | 8 | --- 9 | 10 | ### Problem 11 | > Please provide a clear and concise description of what the bug is. 12 | 13 | ### To Reproduce 14 | > Outline the steps needed to reproduce the problem 15 | 16 | ### Expected Behaviour 17 | > Provide a clear and concise description of what you expected to happen. 18 | 19 | ### Screenshots 20 | > If applicable, add screenshots to help explain your problem. 21 | 22 | ### Additional context 23 | > Add any other context about the problem here. You can also add solutions to the problem if you have them. 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new-features.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New Features 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: rafunderscore 7 | 8 | --- 9 | 10 | ### Feature Description 11 | > A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## User settings 6 | xcuserdata/ 7 | 8 | ## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) 9 | *.xcscmblueprint 10 | *.xccheckout 11 | 12 | ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) 13 | build/ 14 | DerivedData/ 15 | *.moved-aside 16 | *.pbxuser 17 | !default.pbxuser 18 | *.mode1v3 19 | !default.mode1v3 20 | *.mode2v3 21 | !default.mode2v3 22 | *.perspectivev3 23 | !default.perspectivev3 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | 28 | ## App packaging 29 | *.ipa 30 | *.dSYM.zip 31 | *.dSYM 32 | 33 | ## Playgrounds 34 | timeline.xctimeline 35 | playground.xcworkspace 36 | 37 | # Swift Package Manager 38 | # 39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 40 | # Packages/ 41 | # Package.pins 42 | # Package.resolved 43 | # *.xcodeproj 44 | # 45 | # Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata 46 | # hence it is not needed unless you have added a package configuration file to your project 47 | # .swiftpm 48 | 49 | .build/ 50 | 51 | # CocoaPods 52 | # 53 | # We recommend against adding the Pods directory to your .gitignore. However 54 | # you should judge for yourself, the pros and cons are mentioned at: 55 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 56 | # 57 | # Pods/ 58 | # 59 | # Add this line if you want to avoid checking in source code from the Xcode workspace 60 | # *.xcworkspace 61 | 62 | # Carthage 63 | # 64 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 65 | # Carthage/Checkouts 66 | 67 | Carthage/Build/ 68 | 69 | # Accio dependency management 70 | Dependencies/ 71 | .accio/ 72 | 73 | # fastlane 74 | # 75 | # It is recommended to not store the screenshots in the git repo. 76 | # Instead, use fastlane to re-generate the screenshots whenever they are needed. 77 | # For more information about the recommended setup visit: 78 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 79 | 80 | fastlane/report.xml 81 | fastlane/Preview.html 82 | fastlane/screenshots/**/*.png 83 | fastlane/test_output 84 | 85 | # Code Injection 86 | # 87 | # After new code Injection tools there's a generated folder /iOSInjectionProject 88 | # https://github.com/johnno1962/injectionforxcode 89 | 90 | iOSInjectionProject/ 91 | -------------------------------------------------------------------------------- /Escapades.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 56; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 11360CCC2ACDA37400A15CF6 /* BanterClub.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11360CCB2ACDA37400A15CF6 /* BanterClub.swift */; }; 11 | 11370B192AD9D22700D6EADC /* LinkPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11370B182AD9D22700D6EADC /* LinkPreview.swift */; }; 12 | 11370B1D2ADAA32200D6EADC /* Popovers in Frameworks */ = {isa = PBXBuildFile; productRef = 11370B1C2ADAA32200D6EADC /* Popovers */; }; 13 | 11370B202ADAA5C800D6EADC /* SkeletonView in Frameworks */ = {isa = PBXBuildFile; productRef = 11370B1F2ADAA5C800D6EADC /* SkeletonView */; }; 14 | 11370B242ADAA95900D6EADC /* SwiftUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11370B222ADAA7A400D6EADC /* SwiftUIView.swift */; }; 15 | 11370B262ADACA7C00D6EADC /* LinkPreviewView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11370B252ADACA7C00D6EADC /* LinkPreviewView.swift */; }; 16 | 114DFAF12AD82877006A9081 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 114DFAF02AD82876006A9081 /* WidgetKit.framework */; }; 17 | 114DFAF32AD82877006A9081 /* SwiftUI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 114DFAF22AD82877006A9081 /* SwiftUI.framework */; }; 18 | 114DFAF62AD82877006A9081 /* WidgetsBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 114DFAF52AD82877006A9081 /* WidgetsBundle.swift */; }; 19 | 114DFAF82AD82877006A9081 /* WidgetsLiveActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 114DFAF72AD82877006A9081 /* WidgetsLiveActivity.swift */; }; 20 | 114DFAFC2AD82877006A9081 /* AppIntent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 114DFAFB2AD82877006A9081 /* AppIntent.swift */; }; 21 | 114DFAFE2AD82877006A9081 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 114DFAFD2AD82877006A9081 /* Assets.xcassets */; }; 22 | 114DFB022AD82877006A9081 /* WidgetsExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 114DFAEE2AD82876006A9081 /* WidgetsExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; 23 | 11A4F6672AD43C6F0080DFC1 /* BorderRadiusCalculator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11A4F6662AD43C6F0080DFC1 /* BorderRadiusCalculator.swift */; }; 24 | 11A4F6692AD5449E0080DFC1 /* BorderRadiusCalculatorIllustration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11A4F6682AD5449E0080DFC1 /* BorderRadiusCalculatorIllustration.swift */; }; 25 | 11A4F66B2AD544DF0080DFC1 /* BorderRadiusComponents.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11A4F66A2AD544DF0080DFC1 /* BorderRadiusComponents.swift */; }; 26 | 11B0BB652ACC089D004AE035 /* EscapadesApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B0BB642ACC089D004AE035 /* EscapadesApp.swift */; }; 27 | 11B0BB672ACC089D004AE035 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B0BB662ACC089D004AE035 /* ContentView.swift */; }; 28 | 11B0BB692ACC089E004AE035 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 11B0BB682ACC089E004AE035 /* Assets.xcassets */; }; 29 | 11B0BB6C2ACC089E004AE035 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 11B0BB6B2ACC089E004AE035 /* Preview Assets.xcassets */; }; 30 | 11B0BB742ACC14DB004AE035 /* LayeredStackElement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B0BB732ACC14DB004AE035 /* LayeredStackElement.swift */; }; 31 | 11B0BB772ACC1631004AE035 /* Modifier+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B0BB762ACC1631004AE035 /* Modifier+Extensions.swift */; }; 32 | 11B0BB792ACC1E96004AE035 /* LayeredStackShowcase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B0BB782ACC1E96004AE035 /* LayeredStackShowcase.swift */; }; 33 | 11B0BB7C2ACC3C4D004AE035 /* Transactions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11B0BB7B2ACC3C4D004AE035 /* Transactions.swift */; }; 34 | /* End PBXBuildFile section */ 35 | 36 | /* Begin PBXContainerItemProxy section */ 37 | 114DFB002AD82877006A9081 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 11B0BB592ACC089D004AE035 /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 114DFAED2AD82876006A9081; 42 | remoteInfo = WidgetsExtension; 43 | }; 44 | /* End PBXContainerItemProxy section */ 45 | 46 | /* Begin PBXCopyFilesBuildPhase section */ 47 | 114DFB032AD82877006A9081 /* Embed Foundation Extensions */ = { 48 | isa = PBXCopyFilesBuildPhase; 49 | buildActionMask = 2147483647; 50 | dstPath = ""; 51 | dstSubfolderSpec = 13; 52 | files = ( 53 | 114DFB022AD82877006A9081 /* WidgetsExtension.appex in Embed Foundation Extensions */, 54 | ); 55 | name = "Embed Foundation Extensions"; 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXCopyFilesBuildPhase section */ 59 | 60 | /* Begin PBXFileReference section */ 61 | 11360CCB2ACDA37400A15CF6 /* BanterClub.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BanterClub.swift; sourceTree = ""; }; 62 | 11370B182AD9D22700D6EADC /* LinkPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkPreview.swift; sourceTree = ""; }; 63 | 11370B222ADAA7A400D6EADC /* SwiftUIView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SwiftUIView.swift; sourceTree = ""; }; 64 | 11370B252ADACA7C00D6EADC /* LinkPreviewView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinkPreviewView.swift; sourceTree = ""; }; 65 | 114DFAEE2AD82876006A9081 /* WidgetsExtension.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = WidgetsExtension.appex; sourceTree = BUILT_PRODUCTS_DIR; }; 66 | 114DFAF02AD82876006A9081 /* WidgetKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WidgetKit.framework; path = System/Library/Frameworks/WidgetKit.framework; sourceTree = SDKROOT; }; 67 | 114DFAF22AD82877006A9081 /* SwiftUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SwiftUI.framework; path = System/Library/Frameworks/SwiftUI.framework; sourceTree = SDKROOT; }; 68 | 114DFAF52AD82877006A9081 /* WidgetsBundle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetsBundle.swift; sourceTree = ""; }; 69 | 114DFAF72AD82877006A9081 /* WidgetsLiveActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidgetsLiveActivity.swift; sourceTree = ""; }; 70 | 114DFAFB2AD82877006A9081 /* AppIntent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppIntent.swift; sourceTree = ""; }; 71 | 114DFAFD2AD82877006A9081 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 72 | 114DFAFF2AD82877006A9081 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 73 | 11A4F6662AD43C6F0080DFC1 /* BorderRadiusCalculator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BorderRadiusCalculator.swift; sourceTree = ""; }; 74 | 11A4F6682AD5449E0080DFC1 /* BorderRadiusCalculatorIllustration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BorderRadiusCalculatorIllustration.swift; sourceTree = ""; }; 75 | 11A4F66A2AD544DF0080DFC1 /* BorderRadiusComponents.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BorderRadiusComponents.swift; sourceTree = ""; }; 76 | 11B0BB612ACC089D004AE035 /* Escapades.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Escapades.app; sourceTree = BUILT_PRODUCTS_DIR; }; 77 | 11B0BB642ACC089D004AE035 /* EscapadesApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EscapadesApp.swift; sourceTree = ""; }; 78 | 11B0BB662ACC089D004AE035 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; 79 | 11B0BB682ACC089E004AE035 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 80 | 11B0BB6B2ACC089E004AE035 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; 81 | 11B0BB732ACC14DB004AE035 /* LayeredStackElement.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayeredStackElement.swift; sourceTree = ""; }; 82 | 11B0BB762ACC1631004AE035 /* Modifier+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Modifier+Extensions.swift"; sourceTree = ""; }; 83 | 11B0BB782ACC1E96004AE035 /* LayeredStackShowcase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LayeredStackShowcase.swift; sourceTree = ""; }; 84 | 11B0BB7B2ACC3C4D004AE035 /* Transactions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Transactions.swift; sourceTree = ""; }; 85 | /* End PBXFileReference section */ 86 | 87 | /* Begin PBXFrameworksBuildPhase section */ 88 | 114DFAEB2AD82876006A9081 /* Frameworks */ = { 89 | isa = PBXFrameworksBuildPhase; 90 | buildActionMask = 2147483647; 91 | files = ( 92 | 114DFAF32AD82877006A9081 /* SwiftUI.framework in Frameworks */, 93 | 114DFAF12AD82877006A9081 /* WidgetKit.framework in Frameworks */, 94 | ); 95 | runOnlyForDeploymentPostprocessing = 0; 96 | }; 97 | 11B0BB5E2ACC089D004AE035 /* Frameworks */ = { 98 | isa = PBXFrameworksBuildPhase; 99 | buildActionMask = 2147483647; 100 | files = ( 101 | 11370B202ADAA5C800D6EADC /* SkeletonView in Frameworks */, 102 | 11370B1D2ADAA32200D6EADC /* Popovers in Frameworks */, 103 | ); 104 | runOnlyForDeploymentPostprocessing = 0; 105 | }; 106 | /* End PBXFrameworksBuildPhase section */ 107 | 108 | /* Begin PBXGroup section */ 109 | 11370B152AD9D19F00D6EADC /* 5. Link Preview */ = { 110 | isa = PBXGroup; 111 | children = ( 112 | 11370B182AD9D22700D6EADC /* LinkPreview.swift */, 113 | 11370B252ADACA7C00D6EADC /* LinkPreviewView.swift */, 114 | ); 115 | path = "5. Link Preview"; 116 | sourceTree = ""; 117 | }; 118 | 11370B212ADAA79700D6EADC /* 1. Screenshots Stash */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 11370B222ADAA7A400D6EADC /* SwiftUIView.swift */, 122 | ); 123 | path = "1. Screenshots Stash"; 124 | sourceTree = ""; 125 | }; 126 | 114DFAEF2AD82876006A9081 /* Frameworks */ = { 127 | isa = PBXGroup; 128 | children = ( 129 | 114DFAF02AD82876006A9081 /* WidgetKit.framework */, 130 | 114DFAF22AD82877006A9081 /* SwiftUI.framework */, 131 | ); 132 | name = Frameworks; 133 | sourceTree = ""; 134 | }; 135 | 114DFAF42AD82877006A9081 /* Widgets */ = { 136 | isa = PBXGroup; 137 | children = ( 138 | 11370B212ADAA79700D6EADC /* 1. Screenshots Stash */, 139 | 114DFAF52AD82877006A9081 /* WidgetsBundle.swift */, 140 | 114DFAF72AD82877006A9081 /* WidgetsLiveActivity.swift */, 141 | 114DFAFB2AD82877006A9081 /* AppIntent.swift */, 142 | 114DFAFD2AD82877006A9081 /* Assets.xcassets */, 143 | 114DFAFF2AD82877006A9081 /* Info.plist */, 144 | ); 145 | path = Widgets; 146 | sourceTree = ""; 147 | }; 148 | 119CE6EC2ACD94DD00F01D67 /* 2. Banter Club */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 119CE6ED2ACD94FD00F01D67 /* Models */, 152 | 11360CCB2ACDA37400A15CF6 /* BanterClub.swift */, 153 | ); 154 | path = "2. Banter Club"; 155 | sourceTree = ""; 156 | }; 157 | 119CE6ED2ACD94FD00F01D67 /* Models */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | ); 161 | path = Models; 162 | sourceTree = ""; 163 | }; 164 | 11A4F6642AD3F5B20080DFC1 /* 4. Breach Protocol */ = { 165 | isa = PBXGroup; 166 | children = ( 167 | ); 168 | path = "4. Breach Protocol"; 169 | sourceTree = ""; 170 | }; 171 | 11A4F6652AD43C4C0080DFC1 /* 3. Border Radius */ = { 172 | isa = PBXGroup; 173 | children = ( 174 | 11A4F6662AD43C6F0080DFC1 /* BorderRadiusCalculator.swift */, 175 | 11A4F6682AD5449E0080DFC1 /* BorderRadiusCalculatorIllustration.swift */, 176 | 11A4F66A2AD544DF0080DFC1 /* BorderRadiusComponents.swift */, 177 | ); 178 | path = "3. Border Radius"; 179 | sourceTree = ""; 180 | }; 181 | 11B0BB582ACC089D004AE035 = { 182 | isa = PBXGroup; 183 | children = ( 184 | 11B0BB632ACC089D004AE035 /* Escapades */, 185 | 114DFAF42AD82877006A9081 /* Widgets */, 186 | 114DFAEF2AD82876006A9081 /* Frameworks */, 187 | 11B0BB622ACC089D004AE035 /* Products */, 188 | ); 189 | sourceTree = ""; 190 | }; 191 | 11B0BB622ACC089D004AE035 /* Products */ = { 192 | isa = PBXGroup; 193 | children = ( 194 | 11B0BB612ACC089D004AE035 /* Escapades.app */, 195 | 114DFAEE2AD82876006A9081 /* WidgetsExtension.appex */, 196 | ); 197 | name = Products; 198 | sourceTree = ""; 199 | }; 200 | 11B0BB632ACC089D004AE035 /* Escapades */ = { 201 | isa = PBXGroup; 202 | children = ( 203 | 11B0BB662ACC089D004AE035 /* ContentView.swift */, 204 | 11B0BB642ACC089D004AE035 /* EscapadesApp.swift */, 205 | 11B0BB682ACC089E004AE035 /* Assets.xcassets */, 206 | 11B0BB752ACC162C004AE035 /* 0. Global Helpers */, 207 | 11B0BB722ACC13EC004AE035 /* 1. Layered Stack */, 208 | 119CE6EC2ACD94DD00F01D67 /* 2. Banter Club */, 209 | 11A4F6652AD43C4C0080DFC1 /* 3. Border Radius */, 210 | 11A4F6642AD3F5B20080DFC1 /* 4. Breach Protocol */, 211 | 11370B152AD9D19F00D6EADC /* 5. Link Preview */, 212 | 11B0BB6A2ACC089E004AE035 /* Preview Content */, 213 | ); 214 | path = Escapades; 215 | sourceTree = ""; 216 | }; 217 | 11B0BB6A2ACC089E004AE035 /* Preview Content */ = { 218 | isa = PBXGroup; 219 | children = ( 220 | 11B0BB6B2ACC089E004AE035 /* Preview Assets.xcassets */, 221 | ); 222 | path = "Preview Content"; 223 | sourceTree = ""; 224 | }; 225 | 11B0BB722ACC13EC004AE035 /* 1. Layered Stack */ = { 226 | isa = PBXGroup; 227 | children = ( 228 | 11B0BB7A2ACC3B22004AE035 /* Models */, 229 | 11B0BB732ACC14DB004AE035 /* LayeredStackElement.swift */, 230 | 11B0BB782ACC1E96004AE035 /* LayeredStackShowcase.swift */, 231 | ); 232 | path = "1. Layered Stack"; 233 | sourceTree = ""; 234 | }; 235 | 11B0BB752ACC162C004AE035 /* 0. Global Helpers */ = { 236 | isa = PBXGroup; 237 | children = ( 238 | 11B0BB762ACC1631004AE035 /* Modifier+Extensions.swift */, 239 | ); 240 | path = "0. Global Helpers"; 241 | sourceTree = ""; 242 | }; 243 | 11B0BB7A2ACC3B22004AE035 /* Models */ = { 244 | isa = PBXGroup; 245 | children = ( 246 | 11B0BB7B2ACC3C4D004AE035 /* Transactions.swift */, 247 | ); 248 | path = Models; 249 | sourceTree = ""; 250 | }; 251 | /* End PBXGroup section */ 252 | 253 | /* Begin PBXNativeTarget section */ 254 | 114DFAED2AD82876006A9081 /* WidgetsExtension */ = { 255 | isa = PBXNativeTarget; 256 | buildConfigurationList = 114DFB062AD82877006A9081 /* Build configuration list for PBXNativeTarget "WidgetsExtension" */; 257 | buildPhases = ( 258 | 114DFAEA2AD82876006A9081 /* Sources */, 259 | 114DFAEB2AD82876006A9081 /* Frameworks */, 260 | 114DFAEC2AD82876006A9081 /* Resources */, 261 | ); 262 | buildRules = ( 263 | ); 264 | dependencies = ( 265 | ); 266 | name = WidgetsExtension; 267 | productName = WidgetsExtension; 268 | productReference = 114DFAEE2AD82876006A9081 /* WidgetsExtension.appex */; 269 | productType = "com.apple.product-type.app-extension"; 270 | }; 271 | 11B0BB602ACC089D004AE035 /* Escapades */ = { 272 | isa = PBXNativeTarget; 273 | buildConfigurationList = 11B0BB6F2ACC089E004AE035 /* Build configuration list for PBXNativeTarget "Escapades" */; 274 | buildPhases = ( 275 | 11B0BB5D2ACC089D004AE035 /* Sources */, 276 | 11B0BB5E2ACC089D004AE035 /* Frameworks */, 277 | 11B0BB5F2ACC089D004AE035 /* Resources */, 278 | 114DFB032AD82877006A9081 /* Embed Foundation Extensions */, 279 | ); 280 | buildRules = ( 281 | ); 282 | dependencies = ( 283 | 114DFB012AD82877006A9081 /* PBXTargetDependency */, 284 | ); 285 | name = Escapades; 286 | packageProductDependencies = ( 287 | 11370B1C2ADAA32200D6EADC /* Popovers */, 288 | 11370B1F2ADAA5C800D6EADC /* SkeletonView */, 289 | ); 290 | productName = Escapades; 291 | productReference = 11B0BB612ACC089D004AE035 /* Escapades.app */; 292 | productType = "com.apple.product-type.application"; 293 | }; 294 | /* End PBXNativeTarget section */ 295 | 296 | /* Begin PBXProject section */ 297 | 11B0BB592ACC089D004AE035 /* Project object */ = { 298 | isa = PBXProject; 299 | attributes = { 300 | BuildIndependentTargetsInParallel = 1; 301 | LastSwiftUpdateCheck = 1500; 302 | LastUpgradeCheck = 1500; 303 | TargetAttributes = { 304 | 114DFAED2AD82876006A9081 = { 305 | CreatedOnToolsVersion = 15.0; 306 | }; 307 | 11B0BB602ACC089D004AE035 = { 308 | CreatedOnToolsVersion = 15.0; 309 | }; 310 | }; 311 | }; 312 | buildConfigurationList = 11B0BB5C2ACC089D004AE035 /* Build configuration list for PBXProject "Escapades" */; 313 | compatibilityVersion = "Xcode 14.0"; 314 | developmentRegion = en; 315 | hasScannedForEncodings = 0; 316 | knownRegions = ( 317 | en, 318 | Base, 319 | ); 320 | mainGroup = 11B0BB582ACC089D004AE035; 321 | packageReferences = ( 322 | 11370B1B2ADAA32200D6EADC /* XCRemoteSwiftPackageReference "Popovers" */, 323 | 11370B1E2ADAA58700D6EADC /* XCRemoteSwiftPackageReference "SkeletonView" */, 324 | ); 325 | productRefGroup = 11B0BB622ACC089D004AE035 /* Products */; 326 | projectDirPath = ""; 327 | projectRoot = ""; 328 | targets = ( 329 | 11B0BB602ACC089D004AE035 /* Escapades */, 330 | 114DFAED2AD82876006A9081 /* WidgetsExtension */, 331 | ); 332 | }; 333 | /* End PBXProject section */ 334 | 335 | /* Begin PBXResourcesBuildPhase section */ 336 | 114DFAEC2AD82876006A9081 /* Resources */ = { 337 | isa = PBXResourcesBuildPhase; 338 | buildActionMask = 2147483647; 339 | files = ( 340 | 114DFAFE2AD82877006A9081 /* Assets.xcassets in Resources */, 341 | ); 342 | runOnlyForDeploymentPostprocessing = 0; 343 | }; 344 | 11B0BB5F2ACC089D004AE035 /* Resources */ = { 345 | isa = PBXResourcesBuildPhase; 346 | buildActionMask = 2147483647; 347 | files = ( 348 | 11B0BB6C2ACC089E004AE035 /* Preview Assets.xcassets in Resources */, 349 | 11B0BB692ACC089E004AE035 /* Assets.xcassets in Resources */, 350 | ); 351 | runOnlyForDeploymentPostprocessing = 0; 352 | }; 353 | /* End PBXResourcesBuildPhase section */ 354 | 355 | /* Begin PBXSourcesBuildPhase section */ 356 | 114DFAEA2AD82876006A9081 /* Sources */ = { 357 | isa = PBXSourcesBuildPhase; 358 | buildActionMask = 2147483647; 359 | files = ( 360 | 114DFAF82AD82877006A9081 /* WidgetsLiveActivity.swift in Sources */, 361 | 114DFAFC2AD82877006A9081 /* AppIntent.swift in Sources */, 362 | 11370B242ADAA95900D6EADC /* SwiftUIView.swift in Sources */, 363 | 114DFAF62AD82877006A9081 /* WidgetsBundle.swift in Sources */, 364 | ); 365 | runOnlyForDeploymentPostprocessing = 0; 366 | }; 367 | 11B0BB5D2ACC089D004AE035 /* Sources */ = { 368 | isa = PBXSourcesBuildPhase; 369 | buildActionMask = 2147483647; 370 | files = ( 371 | 11B0BB7C2ACC3C4D004AE035 /* Transactions.swift in Sources */, 372 | 11360CCC2ACDA37400A15CF6 /* BanterClub.swift in Sources */, 373 | 11B0BB792ACC1E96004AE035 /* LayeredStackShowcase.swift in Sources */, 374 | 11370B262ADACA7C00D6EADC /* LinkPreviewView.swift in Sources */, 375 | 11B0BB672ACC089D004AE035 /* ContentView.swift in Sources */, 376 | 11A4F66B2AD544DF0080DFC1 /* BorderRadiusComponents.swift in Sources */, 377 | 11B0BB652ACC089D004AE035 /* EscapadesApp.swift in Sources */, 378 | 11B0BB772ACC1631004AE035 /* Modifier+Extensions.swift in Sources */, 379 | 11370B192AD9D22700D6EADC /* LinkPreview.swift in Sources */, 380 | 11B0BB742ACC14DB004AE035 /* LayeredStackElement.swift in Sources */, 381 | 11A4F6672AD43C6F0080DFC1 /* BorderRadiusCalculator.swift in Sources */, 382 | 11A4F6692AD5449E0080DFC1 /* BorderRadiusCalculatorIllustration.swift in Sources */, 383 | ); 384 | runOnlyForDeploymentPostprocessing = 0; 385 | }; 386 | /* End PBXSourcesBuildPhase section */ 387 | 388 | /* Begin PBXTargetDependency section */ 389 | 114DFB012AD82877006A9081 /* PBXTargetDependency */ = { 390 | isa = PBXTargetDependency; 391 | target = 114DFAED2AD82876006A9081 /* WidgetsExtension */; 392 | targetProxy = 114DFB002AD82877006A9081 /* PBXContainerItemProxy */; 393 | }; 394 | /* End PBXTargetDependency section */ 395 | 396 | /* Begin XCBuildConfiguration section */ 397 | 114DFB042AD82877006A9081 /* Debug */ = { 398 | isa = XCBuildConfiguration; 399 | buildSettings = { 400 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 401 | ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; 402 | CODE_SIGN_STYLE = Automatic; 403 | CURRENT_PROJECT_VERSION = 1; 404 | DEVELOPMENT_TEAM = 7VFLYD5292; 405 | GENERATE_INFOPLIST_FILE = YES; 406 | INFOPLIST_FILE = Widgets/Info.plist; 407 | INFOPLIST_KEY_CFBundleDisplayName = Widgets; 408 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 409 | LD_RUNPATH_SEARCH_PATHS = ( 410 | "$(inherited)", 411 | "@executable_path/Frameworks", 412 | "@executable_path/../../Frameworks", 413 | ); 414 | MARKETING_VERSION = 1.0; 415 | PRODUCT_BUNDLE_IDENTIFIER = com.app.escapades.widgets; 416 | PRODUCT_NAME = "$(TARGET_NAME)"; 417 | SKIP_INSTALL = YES; 418 | SWIFT_EMIT_LOC_STRINGS = YES; 419 | SWIFT_VERSION = 5.0; 420 | TARGETED_DEVICE_FAMILY = "1,2"; 421 | }; 422 | name = Debug; 423 | }; 424 | 114DFB052AD82877006A9081 /* Release */ = { 425 | isa = XCBuildConfiguration; 426 | buildSettings = { 427 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 428 | ASSETCATALOG_COMPILER_WIDGET_BACKGROUND_COLOR_NAME = WidgetBackground; 429 | CODE_SIGN_STYLE = Automatic; 430 | CURRENT_PROJECT_VERSION = 1; 431 | DEVELOPMENT_TEAM = 7VFLYD5292; 432 | GENERATE_INFOPLIST_FILE = YES; 433 | INFOPLIST_FILE = Widgets/Info.plist; 434 | INFOPLIST_KEY_CFBundleDisplayName = Widgets; 435 | INFOPLIST_KEY_NSHumanReadableCopyright = ""; 436 | LD_RUNPATH_SEARCH_PATHS = ( 437 | "$(inherited)", 438 | "@executable_path/Frameworks", 439 | "@executable_path/../../Frameworks", 440 | ); 441 | MARKETING_VERSION = 1.0; 442 | PRODUCT_BUNDLE_IDENTIFIER = com.app.escapades.widgets; 443 | PRODUCT_NAME = "$(TARGET_NAME)"; 444 | SKIP_INSTALL = YES; 445 | SWIFT_EMIT_LOC_STRINGS = YES; 446 | SWIFT_VERSION = 5.0; 447 | TARGETED_DEVICE_FAMILY = "1,2"; 448 | }; 449 | name = Release; 450 | }; 451 | 11B0BB6D2ACC089E004AE035 /* Debug */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | ALWAYS_SEARCH_USER_PATHS = NO; 455 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 456 | CLANG_ANALYZER_NONNULL = YES; 457 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 458 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 459 | CLANG_ENABLE_MODULES = YES; 460 | CLANG_ENABLE_OBJC_ARC = YES; 461 | CLANG_ENABLE_OBJC_WEAK = YES; 462 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 463 | CLANG_WARN_BOOL_CONVERSION = YES; 464 | CLANG_WARN_COMMA = YES; 465 | CLANG_WARN_CONSTANT_CONVERSION = YES; 466 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 467 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 468 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 469 | CLANG_WARN_EMPTY_BODY = YES; 470 | CLANG_WARN_ENUM_CONVERSION = YES; 471 | CLANG_WARN_INFINITE_RECURSION = YES; 472 | CLANG_WARN_INT_CONVERSION = YES; 473 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 474 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 475 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 476 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 477 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 478 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 479 | CLANG_WARN_STRICT_PROTOTYPES = YES; 480 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 481 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 482 | CLANG_WARN_UNREACHABLE_CODE = YES; 483 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 484 | COPY_PHASE_STRIP = NO; 485 | DEBUG_INFORMATION_FORMAT = dwarf; 486 | ENABLE_STRICT_OBJC_MSGSEND = YES; 487 | ENABLE_TESTABILITY = YES; 488 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 489 | GCC_C_LANGUAGE_STANDARD = gnu17; 490 | GCC_DYNAMIC_NO_PIC = NO; 491 | GCC_NO_COMMON_BLOCKS = YES; 492 | GCC_OPTIMIZATION_LEVEL = 0; 493 | GCC_PREPROCESSOR_DEFINITIONS = ( 494 | "DEBUG=1", 495 | "$(inherited)", 496 | ); 497 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 498 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 499 | GCC_WARN_UNDECLARED_SELECTOR = YES; 500 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 501 | GCC_WARN_UNUSED_FUNCTION = YES; 502 | GCC_WARN_UNUSED_VARIABLE = YES; 503 | IPHONEOS_DEPLOYMENT_TARGET = 17.0; 504 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 505 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; 506 | MTL_FAST_MATH = YES; 507 | ONLY_ACTIVE_ARCH = YES; 508 | SDKROOT = iphoneos; 509 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG $(inherited)"; 510 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 511 | }; 512 | name = Debug; 513 | }; 514 | 11B0BB6E2ACC089E004AE035 /* Release */ = { 515 | isa = XCBuildConfiguration; 516 | buildSettings = { 517 | ALWAYS_SEARCH_USER_PATHS = NO; 518 | ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; 519 | CLANG_ANALYZER_NONNULL = YES; 520 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 521 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; 522 | CLANG_ENABLE_MODULES = YES; 523 | CLANG_ENABLE_OBJC_ARC = YES; 524 | CLANG_ENABLE_OBJC_WEAK = YES; 525 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 526 | CLANG_WARN_BOOL_CONVERSION = YES; 527 | CLANG_WARN_COMMA = YES; 528 | CLANG_WARN_CONSTANT_CONVERSION = YES; 529 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 530 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 531 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 532 | CLANG_WARN_EMPTY_BODY = YES; 533 | CLANG_WARN_ENUM_CONVERSION = YES; 534 | CLANG_WARN_INFINITE_RECURSION = YES; 535 | CLANG_WARN_INT_CONVERSION = YES; 536 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 537 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 538 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 539 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 540 | CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; 541 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 542 | CLANG_WARN_STRICT_PROTOTYPES = YES; 543 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 544 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; 545 | CLANG_WARN_UNREACHABLE_CODE = YES; 546 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 547 | COPY_PHASE_STRIP = NO; 548 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 549 | ENABLE_NS_ASSERTIONS = NO; 550 | ENABLE_STRICT_OBJC_MSGSEND = YES; 551 | ENABLE_USER_SCRIPT_SANDBOXING = YES; 552 | GCC_C_LANGUAGE_STANDARD = gnu17; 553 | GCC_NO_COMMON_BLOCKS = YES; 554 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 555 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 556 | GCC_WARN_UNDECLARED_SELECTOR = YES; 557 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 558 | GCC_WARN_UNUSED_FUNCTION = YES; 559 | GCC_WARN_UNUSED_VARIABLE = YES; 560 | IPHONEOS_DEPLOYMENT_TARGET = 17.0; 561 | LOCALIZATION_PREFERS_STRING_CATALOGS = YES; 562 | MTL_ENABLE_DEBUG_INFO = NO; 563 | MTL_FAST_MATH = YES; 564 | SDKROOT = iphoneos; 565 | SWIFT_COMPILATION_MODE = wholemodule; 566 | VALIDATE_PRODUCT = YES; 567 | }; 568 | name = Release; 569 | }; 570 | 11B0BB702ACC089E004AE035 /* Debug */ = { 571 | isa = XCBuildConfiguration; 572 | buildSettings = { 573 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 574 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 575 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 576 | CODE_SIGN_STYLE = Automatic; 577 | CURRENT_PROJECT_VERSION = 1; 578 | DEVELOPMENT_ASSET_PATHS = "\"Escapades/Preview Content\""; 579 | DEVELOPMENT_TEAM = 7VFLYD5292; 580 | ENABLE_PREVIEWS = YES; 581 | GENERATE_INFOPLIST_FILE = YES; 582 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 583 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 584 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 585 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 586 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 587 | LD_RUNPATH_SEARCH_PATHS = ( 588 | "$(inherited)", 589 | "@executable_path/Frameworks", 590 | ); 591 | MARKETING_VERSION = 1.0; 592 | PRODUCT_BUNDLE_IDENTIFIER = com.app.escapades; 593 | PRODUCT_NAME = "$(TARGET_NAME)"; 594 | SWIFT_EMIT_LOC_STRINGS = YES; 595 | SWIFT_VERSION = 5.0; 596 | TARGETED_DEVICE_FAMILY = "1,2"; 597 | }; 598 | name = Debug; 599 | }; 600 | 11B0BB712ACC089E004AE035 /* Release */ = { 601 | isa = XCBuildConfiguration; 602 | buildSettings = { 603 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 604 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 605 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; 606 | CODE_SIGN_STYLE = Automatic; 607 | CURRENT_PROJECT_VERSION = 1; 608 | DEVELOPMENT_ASSET_PATHS = "\"Escapades/Preview Content\""; 609 | DEVELOPMENT_TEAM = 7VFLYD5292; 610 | ENABLE_PREVIEWS = YES; 611 | GENERATE_INFOPLIST_FILE = YES; 612 | INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; 613 | INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; 614 | INFOPLIST_KEY_UILaunchScreen_Generation = YES; 615 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 616 | INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; 617 | LD_RUNPATH_SEARCH_PATHS = ( 618 | "$(inherited)", 619 | "@executable_path/Frameworks", 620 | ); 621 | MARKETING_VERSION = 1.0; 622 | PRODUCT_BUNDLE_IDENTIFIER = com.app.escapades; 623 | PRODUCT_NAME = "$(TARGET_NAME)"; 624 | SWIFT_EMIT_LOC_STRINGS = YES; 625 | SWIFT_VERSION = 5.0; 626 | TARGETED_DEVICE_FAMILY = "1,2"; 627 | }; 628 | name = Release; 629 | }; 630 | /* End XCBuildConfiguration section */ 631 | 632 | /* Begin XCConfigurationList section */ 633 | 114DFB062AD82877006A9081 /* Build configuration list for PBXNativeTarget "WidgetsExtension" */ = { 634 | isa = XCConfigurationList; 635 | buildConfigurations = ( 636 | 114DFB042AD82877006A9081 /* Debug */, 637 | 114DFB052AD82877006A9081 /* Release */, 638 | ); 639 | defaultConfigurationIsVisible = 0; 640 | defaultConfigurationName = Release; 641 | }; 642 | 11B0BB5C2ACC089D004AE035 /* Build configuration list for PBXProject "Escapades" */ = { 643 | isa = XCConfigurationList; 644 | buildConfigurations = ( 645 | 11B0BB6D2ACC089E004AE035 /* Debug */, 646 | 11B0BB6E2ACC089E004AE035 /* Release */, 647 | ); 648 | defaultConfigurationIsVisible = 0; 649 | defaultConfigurationName = Release; 650 | }; 651 | 11B0BB6F2ACC089E004AE035 /* Build configuration list for PBXNativeTarget "Escapades" */ = { 652 | isa = XCConfigurationList; 653 | buildConfigurations = ( 654 | 11B0BB702ACC089E004AE035 /* Debug */, 655 | 11B0BB712ACC089E004AE035 /* Release */, 656 | ); 657 | defaultConfigurationIsVisible = 0; 658 | defaultConfigurationName = Release; 659 | }; 660 | /* End XCConfigurationList section */ 661 | 662 | /* Begin XCRemoteSwiftPackageReference section */ 663 | 11370B1B2ADAA32200D6EADC /* XCRemoteSwiftPackageReference "Popovers" */ = { 664 | isa = XCRemoteSwiftPackageReference; 665 | repositoryURL = "https://github.com/aheze/Popovers"; 666 | requirement = { 667 | kind = upToNextMajorVersion; 668 | minimumVersion = 1.3.2; 669 | }; 670 | }; 671 | 11370B1E2ADAA58700D6EADC /* XCRemoteSwiftPackageReference "SkeletonView" */ = { 672 | isa = XCRemoteSwiftPackageReference; 673 | repositoryURL = "https://github.com/Juanpe/SkeletonView"; 674 | requirement = { 675 | kind = upToNextMajorVersion; 676 | minimumVersion = 1.30.4; 677 | }; 678 | }; 679 | /* End XCRemoteSwiftPackageReference section */ 680 | 681 | /* Begin XCSwiftPackageProductDependency section */ 682 | 11370B1C2ADAA32200D6EADC /* Popovers */ = { 683 | isa = XCSwiftPackageProductDependency; 684 | package = 11370B1B2ADAA32200D6EADC /* XCRemoteSwiftPackageReference "Popovers" */; 685 | productName = Popovers; 686 | }; 687 | 11370B1F2ADAA5C800D6EADC /* SkeletonView */ = { 688 | isa = XCSwiftPackageProductDependency; 689 | package = 11370B1E2ADAA58700D6EADC /* XCRemoteSwiftPackageReference "SkeletonView" */; 690 | productName = SkeletonView; 691 | }; 692 | /* End XCSwiftPackageProductDependency section */ 693 | }; 694 | rootObject = 11B0BB592ACC089D004AE035 /* Project object */; 695 | } 696 | -------------------------------------------------------------------------------- /Escapades.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Escapades.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Escapades.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved: -------------------------------------------------------------------------------- 1 | { 2 | "pins" : [ 3 | { 4 | "identity" : "popovers", 5 | "kind" : "remoteSourceControl", 6 | "location" : "https://github.com/aheze/Popovers", 7 | "state" : { 8 | "revision" : "de44c4dd7271ec6413fe350f7efadb14e5e18dce", 9 | "version" : "1.3.2" 10 | } 11 | }, 12 | { 13 | "identity" : "skeletonview", 14 | "kind" : "remoteSourceControl", 15 | "location" : "https://github.com/Juanpe/SkeletonView", 16 | "state" : { 17 | "revision" : "739a4f5d78731bebc48811c75fa9e1f4c4cef23e", 18 | "version" : "1.30.4" 19 | } 20 | } 21 | ], 22 | "version" : 2 23 | } 24 | -------------------------------------------------------------------------------- /Escapades.xcodeproj/xcuserdata/raphaelsalaja.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Escapades.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 0 11 | 12 | WidgetsExtension.xcscheme_^#shared#^_ 13 | 14 | orderHint 15 | 1 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /Escapades/0. Global Helpers/Modifier+Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUIView.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 03/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | // MARK: - Transition 11 | 12 | struct RoundedRectangleWithBorder: ViewModifier { 13 | var radius: CGFloat 14 | var borderLineWidth: CGFloat = 1 15 | var backgroundColor: Color = .clear 16 | var borderColor: Color = .gray 17 | var antialiased: Bool = true 18 | 19 | let namespace: Namespace.ID = Namespace().wrappedValue 20 | 21 | func body(content: Content) -> some View { 22 | content 23 | .background(self.backgroundColor) 24 | .cornerRadius(self.radius, antialiased: self.antialiased) 25 | .overlay( 26 | RoundedRectangle(cornerRadius: self.radius) 27 | .strokeBorder(self.borderColor, lineWidth: self.borderLineWidth, antialiased: self.antialiased) 28 | ) 29 | } 30 | } 31 | 32 | extension Date { 33 | static func randomBetween(start: String, end: String, format: String = "DD-MM-YYYY") -> String { 34 | let date1 = Date.parse(start, format: format) 35 | let date2 = Date.parse(end, format: format) 36 | return Date.randomBetween(start: date1, end: date2).dateString(format) 37 | } 38 | 39 | static func randomBetween(start: Date, end: Date) -> Date { 40 | let date1 = min(start, end) 41 | var date2 = max(start, end) 42 | 43 | if date1 == date2 { 44 | date2 = date1.addingTimeInterval(120) 45 | } 46 | 47 | let span = TimeInterval.random(in: date1.timeIntervalSinceNow ... date2.timeIntervalSinceNow) 48 | return Date(timeIntervalSinceNow: span) 49 | } 50 | 51 | func dateString(_ format: String = "DD-MM-YYYY") -> String { 52 | let dateFormatter = DateFormatter() 53 | dateFormatter.dateFormat = format 54 | return dateFormatter.string(from: self) 55 | } 56 | 57 | static func parse(_ string: String, format: String = "DD-MM-YYYY") -> Date { 58 | let dateFormatter = DateFormatter() 59 | dateFormatter.timeZone = NSTimeZone.default 60 | dateFormatter.dateFormat = format 61 | 62 | let date = dateFormatter.date(from: string)! 63 | return date 64 | } 65 | } 66 | 67 | extension View { 68 | func extendedBackground(radius: CGFloat, 69 | borderLineWidth: CGFloat = 1, 70 | backgroundColor: Color = .clear, 71 | borderColor: Color = .gray, 72 | antialiased: Bool = true) -> some View 73 | { 74 | modifier( 75 | RoundedRectangleWithBorder( 76 | radius: radius, 77 | borderLineWidth: borderLineWidth, 78 | backgroundColor: backgroundColor, 79 | borderColor: borderColor, 80 | antialiased: antialiased 81 | ) 82 | ) 83 | } 84 | 85 | /// Hide or show the view based on a boolean value. 86 | /// 87 | /// Example for visibility: 88 | /// 89 | /// Text("Label") 90 | /// .isHidden(true) 91 | /// 92 | /// Example for complete removal: 93 | /// 94 | /// Text("Label") 95 | /// .isHidden(true, remove: true) 96 | /// 97 | /// - Parameters: 98 | /// - hidden: Set to `false` to show the view. Set to `true` to hide the view. 99 | /// - remove: Boolean value indicating whether or not to remove the view. 100 | @ViewBuilder func isHidden(_ hidden: Bool, remove: Bool = false) -> some View { 101 | if hidden { 102 | if !remove { 103 | self.hidden() 104 | } 105 | } else { 106 | self 107 | } 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /Escapades/1. Layered Stack/LayeredStackElement.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LayeredStackElement.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 03/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct LayeredStackElement: View { 11 | @State var object: Transaction 12 | 13 | @Binding var show: Bool 14 | 15 | private let formatter: DateFormatter = { 16 | let formatter = DateFormatter() 17 | formatter.dateStyle = .medium 18 | return formatter 19 | }() 20 | 21 | func setColor(type: TransactionType) -> Color { 22 | switch type { 23 | case .Grocieries: 24 | return Color(.systemRed) 25 | case .Restaurants: 26 | return Color(.systemOrange) 27 | case .Entertainment: 28 | return Color(.systemYellow) 29 | case .Bills: 30 | return Color(.systemGreen) 31 | case .Travel: 32 | return Color(.systemTeal) 33 | case .Subscription: 34 | return Color(.systemBlue) 35 | case .Taxes: 36 | return Color(.systemIndigo) 37 | case .Salary: 38 | return Color(.systemPurple) 39 | case .Gifts: 40 | return Color(.systemPink) 41 | } 42 | } 43 | 44 | var body: some View { 45 | if show { 46 | HStack(spacing: 12) { 47 | Image(systemName: object.icon) 48 | .resizable() 49 | .scaledToFit() 50 | .frame(width: 48, height: 48) 51 | .font(.system(.subheadline, design: .rounded, weight: .bold)) 52 | .scaleEffect(0.5) 53 | .foregroundColor(.white) 54 | .background(setColor(type: object.type)) 55 | .clipShape(Circle()) 56 | 57 | VStack(alignment: .leading) { 58 | Text(object.name) 59 | .font(.system(.subheadline, design: .rounded, weight: .bold)) 60 | .foregroundColor(.primary) 61 | 62 | Text(object.type.rawValue) 63 | .font(.system(.subheadline, design: .rounded, weight: .medium)) 64 | .foregroundColor(Color(.secondaryLabel)) 65 | } 66 | 67 | Spacer() 68 | 69 | VStack(alignment: .trailing) { 70 | Text(NumberFormatter.localizedString( 71 | from: object.amount as NSNumber, 72 | number: .currency) 73 | ) 74 | .font(.system(.subheadline, design: .rounded, weight: .bold)) 75 | .foregroundColor(object.amount < 0 ? .red : .green) 76 | 77 | Text(formatter.string(from: object.date)) 78 | .font(.system(.subheadline, design: .rounded, weight: .medium)) 79 | .foregroundColor(Color(.secondaryLabel)) 80 | } 81 | } 82 | .padding(16) 83 | .extendedBackground(radius: 20, 84 | borderLineWidth: 1, 85 | backgroundColor: .white, 86 | borderColor: Color(.systemGray6)) 87 | .shadow(color: Color(.systemGray6), radius: 5, x: 0, y: 5) 88 | } 89 | } 90 | } 91 | 92 | #Preview { 93 | LayeredStackElement(object: SampleTransactions().data[0], show: .constant(true)) 94 | } 95 | -------------------------------------------------------------------------------- /Escapades/1. Layered Stack/LayeredStackShowcase.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LayeredStackShowcase.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 03/10/2023. 6 | // 7 | 8 | import Charts 9 | import SwiftUI 10 | 11 | struct LayeredStackShowcase: View { 12 | @Namespace private var namespace 13 | 14 | @State var collapsed: Bool = false 15 | @State var show: Bool = true 16 | @State var spacing: CGFloat 17 | @State var data: [Transaction] = SampleTransactions().data 18 | @State var pressed: Bool = false 19 | 20 | internal init( 21 | collapsed: Bool = false, 22 | spacing: CGFloat = 8 23 | ) { 24 | self.collapsed = collapsed 25 | self.spacing = spacing 26 | } 27 | 28 | func changeSpacing() { 29 | withAnimation(.bouncy) { 30 | self.spacing = self.spacing == 8 ? -64 : 8 31 | self.collapsed.toggle() 32 | } 33 | 34 | withAnimation(.bouncy) { 35 | self.show.toggle() 36 | } 37 | } 38 | 39 | func sortByDate(this: Transaction, that: Transaction) -> Bool { 40 | return this.date > that.date 41 | } 42 | 43 | var body: some View { 44 | ScrollView(showsIndicators: false) { 45 | VStack(spacing: 16) { 46 | VStack { 47 | HStack { 48 | Text("Wallet") 49 | .font(.system(.title3, design: .rounded, weight: .bold)) 50 | .foregroundColor(.primary) 51 | 52 | Spacer() 53 | 54 | Button(action: { changeSpacing() }) { 55 | HStack { 56 | Text("Settings") 57 | .font(.system(.subheadline, design: .rounded, weight: .medium)) 58 | .foregroundColor(Color(.secondaryLabel)) 59 | .transition(.opacity) 60 | .id(collapsed.description) 61 | } 62 | .padding(EdgeInsets(top: 8, leading: 12, bottom: 8, trailing: 12)) 63 | .extendedBackground(radius: 100, 64 | borderLineWidth: 1, 65 | backgroundColor: .white, 66 | borderColor: Color(.systemGray6)) 67 | } 68 | } 69 | 70 | RoundedRectangle(cornerRadius: 20) 71 | .fill(Color(.systemGray6)) 72 | .frame(width: .infinity, height: 300) 73 | } 74 | 75 | VStack { 76 | HStack { 77 | Text("Transactions") 78 | .font(.system(.title3, design: .rounded, weight: .bold)) 79 | .foregroundColor(.primary) 80 | 81 | Spacer() 82 | 83 | Button(action: { changeSpacing() }) { 84 | HStack { 85 | Text(collapsed ? "Expand" : "Collapse") 86 | .font(.system(.subheadline, design: .rounded, weight: .medium)) 87 | .foregroundColor(Color(.secondaryLabel)) 88 | .transition(.opacity) 89 | .id(collapsed.description) 90 | 91 | Image(systemName: "chevron.down") 92 | .font(.system(.subheadline, design: .rounded, weight: .medium)) 93 | .foregroundColor(Color(.secondaryLabel)) 94 | .rotationEffect(.degrees(collapsed ? -90 : 0)) 95 | } 96 | .padding(EdgeInsets(top: 8, leading: 12, bottom: 8, trailing: 12)) 97 | .extendedBackground(radius: 100, 98 | borderLineWidth: 1, 99 | backgroundColor: .white, 100 | borderColor: Color(.systemGray6)) 101 | } 102 | } 103 | 104 | VStack(spacing: spacing) { 105 | ForEach(Array(data.sorted(by: sortByDate).enumerated()), id: \.offset) { 106 | index, transaction in 107 | 108 | let scale = 1.0 - (0.05 * Double(index)) 109 | let opacity = 1.0 - (0.1 * Double(index)) 110 | let offset = index > 3 111 | 112 | if offset { 113 | LayeredStackElement(object: transaction, show: $show) 114 | .zIndex(Double(data.count - index)) 115 | .opacity(collapsed ? CGFloat(opacity) : 1.0) 116 | .scaleEffect(collapsed ? CGFloat(scale) : 1.0) 117 | .matchedGeometryEffect( 118 | id: "layered.stack.element.\(index)", 119 | in: namespace 120 | ) 121 | } 122 | else { 123 | LayeredStackElement(object: transaction, show: .constant(true)) 124 | .zIndex(Double(data.count - index)) 125 | .opacity(collapsed ? CGFloat(opacity) : 1.0) 126 | .scaleEffect(collapsed ? CGFloat(scale) : 1.0) 127 | .matchedGeometryEffect( 128 | id: "layered.stack.element.\(index)", 129 | in: namespace 130 | ) 131 | } 132 | } 133 | } 134 | .frame( 135 | minWidth: 0, 136 | maxWidth: .infinity, 137 | minHeight: 0, 138 | maxHeight: .infinity, 139 | alignment: .topLeading 140 | ) 141 | .matchedGeometryEffect( 142 | id: "layered.stack", 143 | in: namespace 144 | ) 145 | 146 | Spacer() 147 | } 148 | 149 | }.padding() 150 | 151 | }.background(.white.tertiary) 152 | } 153 | } 154 | 155 | #Preview { 156 | LayeredStackShowcase() 157 | } 158 | -------------------------------------------------------------------------------- /Escapades/1. Layered Stack/Models/Transactions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Transactions.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 03/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | enum TransactionType: String { 11 | case Grocieries 12 | case Restaurants 13 | case Entertainment 14 | case Bills 15 | case Travel 16 | case Subscription 17 | case Taxes 18 | case Salary 19 | case Gifts 20 | } 21 | 22 | struct Transaction: Identifiable { 23 | var id = UUID() 24 | var name: String 25 | var icon: String 26 | var amount: Double 27 | var date: Date 28 | var type: TransactionType 29 | 30 | internal init(id: UUID = UUID(), 31 | name: String, 32 | icon: String, 33 | amount: Double = Double.random(in: -100000 ... -1), 34 | date: Date = Date.randomBetween(start: Date.parse("01-01-2023"), end: Date.now), 35 | type: TransactionType) 36 | { 37 | self.id = id 38 | self.name = name 39 | self.icon = icon 40 | self.amount = amount 41 | self.date = date 42 | self.type = type 43 | } 44 | } 45 | 46 | struct SampleTransactions { 47 | var data: [Transaction] = [ 48 | // MARK: - Subscription 49 | 50 | Transaction(name: "Apple Music", icon: "applelogo", type: .Subscription), 51 | Transaction(name: "Spotify Premium", icon: "music.note", type: .Subscription), 52 | Transaction(name: "Netflix", icon: "tv.fill", type: .Subscription), 53 | Transaction(name: "Amazon Prime", icon: "tv.fill", type: .Subscription), 54 | Transaction(name: "Hulu", icon: "tv.fill", type: .Subscription), 55 | 56 | // MARK: - Groceries 57 | 58 | Transaction(name: "Walmart", icon: "bag.fill", type: .Grocieries), 59 | Transaction(name: "Whole Foods", icon: "bag.fill", type: .Grocieries), 60 | 61 | // MARK: - Restaurants 62 | 63 | Transaction(name: "McDonald's", icon: "takeoutbag.and.cup.and.straw.fill", type: .Restaurants), 64 | Transaction(name: "Pizza Hut", icon: "takeoutbag.and.cup.and.straw.fill", type: .Restaurants), 65 | 66 | // MARK: - Entertainment 67 | 68 | Transaction(name: "Movie Tickets", icon: "party.popper.fill", type: .Entertainment), 69 | Transaction(name: "Coachella", icon: "party.popper.fill", type: .Entertainment), 70 | 71 | // MARK: - Salary 72 | 73 | Transaction(name: "𝕏", icon: "banknote.fill", amount: 132434.00, date: Date(), type: .Salary), 74 | 75 | // MARK: - Gifts 76 | 77 | Transaction(name: "Birthday", icon: "gift.fill", amount: 12.00, type: .Gifts), 78 | Transaction(name: "Anniversary", icon: "gift.fill", amount: 100.00, type: .Gifts), 79 | ] 80 | } 81 | -------------------------------------------------------------------------------- /Escapades/2. Banter Club/BanterClub.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BanterClubHome.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 04/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | private enum BanterConstants { 11 | static let radius: CGFloat = 20 12 | } 13 | 14 | struct BanterClubTeam: Identifiable { 15 | var id = UUID() 16 | var name: String 17 | var logo: String 18 | var wins: Int 19 | var draws: Int 20 | var losses: Int 21 | } 22 | 23 | struct BanterClub: View { 24 | var body: some View { 25 | NavigationStack { 26 | ScrollView { 27 | BanterClubScoreboard() 28 | } 29 | .padding(EdgeInsets(top: 0, leading: 16, bottom: 0, trailing: 16)) 30 | .frame(maxWidth: .infinity) 31 | .listStyle(.plain) 32 | .navigationBarTitleDisplayMode(.inline) 33 | .toolbar { 34 | ToolbarItem(placement: .navigationBarLeading) { 35 | Button(action: {}) { 36 | Image(systemName: "magnifyingglass") 37 | .font(.system(.body, design: .rounded, weight: .bold)) 38 | .foregroundColor(Color(.tertiaryLabel)) 39 | } 40 | } 41 | ToolbarItem(placement: .principal) { 42 | HStack(alignment: .center, spacing: 4) { 43 | Text("🤣") 44 | .font(.system(.body, design: .rounded, weight: .bold)) 45 | .foregroundColor(Color(.label)) 46 | 47 | Text("Trending Banter") 48 | .font(.system(.body, design: .rounded, weight: .bold)) 49 | .foregroundColor(Color(.label)) 50 | } 51 | .padding(8) 52 | .overlay( 53 | RoundedRectangle(cornerRadius: 12) 54 | .strokeBorder(Color(.secondarySystemFill), 55 | style: StrokeStyle(lineWidth: 2)) 56 | ) 57 | } 58 | ToolbarItem(placement: .navigationBarTrailing) { 59 | Button(action: {}) { 60 | Image(systemName: "gearshape") 61 | .font(.system(.body, design: .rounded, weight: .bold)) 62 | .foregroundColor(Color(.tertiaryLabel)) 63 | } 64 | } 65 | } 66 | } 67 | } 68 | } 69 | 70 | #Preview() { BanterClub() } 71 | 72 | // MARK: - Scoreboard 73 | 74 | struct BanterClubScoreboard: View { 75 | var body: some View { 76 | VStack(alignment: .leading, spacing: 16) { 77 | BanterClubScoreboardThoughts() 78 | 79 | VStack(spacing: 24) { 80 | Text("English Premier League") 81 | .font(.system(.headline, design: .rounded, weight: .bold)) 82 | .foregroundColor(Color(.label)) 83 | 84 | HStack(spacing: 32) { 85 | BanterClubScoreboardTeam(image: .chelsea, name: "Chelsea", record: "2 - 1 - 12") 86 | 87 | BanterClubScoreboardHype() 88 | 89 | BanterClubScoreboardTeam(image: .everton, name: "Everton", record: "5 - 4 - 14") 90 | } 91 | } 92 | .padding(16) 93 | .frame(maxWidth: .infinity) 94 | .cornerRadius(BanterConstants.radius) 95 | .overlay( 96 | RoundedRectangle(cornerRadius: BanterConstants.radius) 97 | .strokeBorder(Color(.secondarySystemFill), 98 | style: StrokeStyle(lineWidth: 2)) 99 | ) 100 | 101 | HStack { 102 | BanterClubScoreboardReaction(emoji: "😭", amount: "92.3k") 103 | BanterClubScoreboardReaction(emoji: "😂", amount: "22.3k") 104 | BanterClubScoreboardReaction(emoji: "💀", amount: "4239") 105 | BanterClubScoreboardReaction(emoji: "💔", amount: "32") 106 | HStack(alignment: .top, spacing: 2) { 107 | Image(systemName: "plus") 108 | .font(.system(.footnote, design: .rounded, weight: .bold)) 109 | .foregroundColor(Color(.secondaryLabel)) 110 | } 111 | .padding(8) 112 | .cornerRadius(12, antialiased: true) 113 | .overlay( 114 | RoundedRectangle(cornerRadius: 12) 115 | .strokeBorder(Color(.secondarySystemFill), 116 | style: StrokeStyle(lineWidth: 2)) 117 | ) 118 | } 119 | } 120 | .padding(EdgeInsets(top: 16, leading: 0, bottom: 16, trailing: 0)) 121 | } 122 | } 123 | 124 | struct BanterClubScoreboardTeam: View { 125 | @State var image: ImageResource 126 | @State var name: String 127 | @State var record: String 128 | 129 | var body: some View { 130 | VStack(alignment: .center, spacing: 8) { 131 | Image(image) 132 | .resizable() 133 | .frame(width: 48, height: 48) 134 | .foregroundColor(Color(.quaternaryLabel)) 135 | 136 | Text(name) 137 | .font(.system(.headline, design: .rounded, weight: .bold)) 138 | .foregroundColor(Color(.label)) 139 | 140 | Text(record) 141 | .font(.system(.headline, design: .rounded, weight: .bold)) 142 | .foregroundColor(Color(.tertiaryLabel)) 143 | }.frame(maxWidth: .infinity) 144 | } 145 | } 146 | 147 | struct BanterClubScoreboardHype: View { 148 | var body: some View { 149 | VStack(alignment: .center, spacing: 8) { 150 | Text("2 - 9") 151 | .font(.system(.title, design: .rounded, weight: .bold)) 152 | .foregroundColor(Color(.label)) 153 | HStack(spacing: 4) { 154 | Image(systemName: "flame.fill") 155 | .font(.system(.footnote, design: .rounded, weight: .bold)) 156 | .foregroundStyle(.primary) 157 | 158 | Text("76:23") 159 | .font(.system(.footnote, design: .rounded, weight: .bold)) 160 | .foregroundStyle(.primary) 161 | } 162 | .padding(8) 163 | .background(.red.tertiary) 164 | .cornerRadius(12) 165 | .foregroundStyle(.red) 166 | } 167 | } 168 | } 169 | 170 | struct BanterClubScoreboardReaction: View { 171 | @State var emoji: String 172 | @State var amount: String 173 | 174 | var body: some View { 175 | HStack(alignment: .top, spacing: 2) { 176 | Text(emoji) 177 | .font(.system(.footnote, design: .rounded, weight: .bold)) 178 | .foregroundColor(Color(.label)) 179 | Text(amount) 180 | .font(.system(.footnote, design: .rounded, weight: .bold)) 181 | .foregroundColor(Color(.label)) 182 | } 183 | .padding(8) 184 | .cornerRadius(12, antialiased: true) 185 | .overlay( 186 | RoundedRectangle(cornerRadius: 12) 187 | .strokeBorder(Color(.secondarySystemFill), 188 | style: StrokeStyle(lineWidth: 2)) 189 | ) 190 | } 191 | } 192 | 193 | struct BanterClubScoreboardThoughts: View { 194 | var body: some View { 195 | VStack(alignment: .leading, spacing: 12) { 196 | HStack(alignment: .center, spacing: 8) { 197 | Image(.chelseaProfilePicture) 198 | .resizable() 199 | .scaledToFill() 200 | .frame(width: 32, height: 32) 201 | .clipShape(Circle()) 202 | 203 | HStack(alignment: .firstTextBaseline) { 204 | Text("@youngkippa") 205 | .font(.system(.body, design: .rounded, weight: .bold)) 206 | .foregroundColor(Color(.label)) 207 | } 208 | 209 | Spacer() 210 | 211 | HStack(alignment: .firstTextBaseline) { 212 | Text("3h") 213 | .font(.system(.body, design: .rounded, weight: .medium)) 214 | .foregroundColor(Color(.secondaryLabel)) 215 | } 216 | } 217 | Text("Why are people saying chelsea is going to lose to Everton? We are going to win this matchup with complete ease 💙💙 #CFC" 218 | ) 219 | .font(.system(.body, design: .rounded, weight: .regular)) 220 | .foregroundColor(Color(.label)) 221 | } 222 | .frame(maxWidth: .infinity) 223 | } 224 | } 225 | 226 | struct BanterClubScoreboardTime: View { 227 | var body: some View { 228 | VStack(alignment: .leading, spacing: 8) { 229 | VStack(alignment: .leading, spacing: 4) { 230 | HStack(alignment: .center) { 231 | Circle() 232 | .frame(width: 24, height: 24) 233 | .foregroundColor(Color(.quaternaryLabel)) 234 | 235 | HStack(alignment: .firstTextBaseline) { 236 | Text("@youngkippa") 237 | .font(.system(.body, design: .rounded, weight: .bold)) 238 | .foregroundColor(Color(.label)) 239 | } 240 | } 241 | } 242 | Text("Why are people saying chelsea is going to lose to Everton? We are going to win this matchup with complete ease 💙💙 #CFC" 243 | ) 244 | .font(.system(.body, design: .rounded, weight: .regular)) 245 | .foregroundColor(Color(.secondaryLabel)) 246 | } 247 | .frame(maxWidth: .infinity) 248 | } 249 | } 250 | -------------------------------------------------------------------------------- /Escapades/3. Border Radius/BorderRadiusCalculator.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppleMoreInformation.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 09/10/2023. 6 | // 7 | 8 | import Observation 9 | import SwiftUI 10 | 11 | struct BorderRadiusCalculator: View { 12 | @State var outer: Double = 64 13 | @State var inner: Double = 32 14 | @State var padding: Double = 24 15 | 16 | init(outer: Double = 64, 17 | inner: Double = 32, 18 | padding: Double = 24) 19 | { 20 | self.outer = outer 21 | self.inner = inner 22 | self.padding = padding 23 | } 24 | 25 | public func animations(state: String) { 26 | switch state { 27 | case "outer": 28 | withAnimation(.bouncy) { 29 | inner = outer - padding 30 | } 31 | case "inner": 32 | withAnimation(.bouncy) { 33 | outer = inner + padding 34 | } 35 | case "padding": 36 | withAnimation(.bouncy) { 37 | inner = outer - padding 38 | outer = inner + padding 39 | } 40 | default: 41 | break 42 | } 43 | } 44 | 45 | func calculate_offset(position: String) -> CGSize { 46 | switch position { 47 | case "outer": 48 | return CGSize( 49 | width: (-290 / 2) - (-outer / 3) - 32, 50 | height: (-290 / 2) - (-outer / 3) - 32 51 | ) 52 | case "inner": 53 | return CGSize( 54 | width: (-290 / 5) - (-inner / 3) - 32, 55 | height: (-290 / 5) - (-inner / 3) - 32 56 | ) 57 | default: 58 | return CGSize( 59 | width: 0, 60 | height: 0 61 | ) 62 | } 63 | } 64 | 65 | func randomize() { 66 | withAnimation(.bouncy) { 67 | outer = .random(in: 16...96) 68 | inner = .random(in: 32...64) 69 | padding = .random(in: 16...32) 70 | } 71 | } 72 | 73 | var body: some View { 74 | VStack(spacing: -32) { 75 | ZStack { 76 | BorderRadiusTextDebug(value: $outer, 77 | color: .green, 78 | offset: calculate_offset(position: "outer")) 79 | 80 | BorderRadiusTextDebug(value: $inner, 81 | color: .blue, 82 | offset: calculate_offset(position: "inner")) 83 | 84 | BorderRadiusTextDebug(value: $padding, 85 | color: .orange, 86 | offset: CGSize(width: 0, height: -145 + padding / 2), 87 | isPadding: true) 88 | 89 | BorderRadiusCalculatorIllustration(outer: $outer, 90 | inner: $inner, 91 | padding: $padding) 92 | } 93 | .onChange(of: outer, initial: true) { 94 | animations(state: "outer") 95 | } 96 | .onChange(of: inner, initial: true) { 97 | animations(state: "inner") 98 | } 99 | .onChange(of: padding, initial: true) { 100 | animations(state: "padding") 101 | } 102 | 103 | .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottom) 104 | .mask(LinearGradient( 105 | gradient: 106 | Gradient( 107 | stops: [.init(color: .clear, location: 0), 108 | .init(color: .clear, location: 0.40), 109 | .init(color: .black, location: 0.80)]), 110 | startPoint: .bottom, endPoint: .center 111 | )) 112 | 113 | VStack(spacing: 16) { 114 | VStack { 115 | Text("Outer Radius = Inner Radius + Padding") 116 | .font(.system(.body, design: .rounded, weight: .bold)) 117 | .foregroundColor(Color(.secondaryLabel)) 118 | .contentTransition(.interpolate) 119 | } 120 | .padding() 121 | .frame(maxWidth: .infinity) 122 | .background(Color(.secondarySystemFill)) 123 | .clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous)) 124 | 125 | HStack { 126 | BorderRadiusTextBadge(color: .green, text: "Outer") 127 | BorderRadiusTextField(value: $outer, color: .green, text: "Outer") 128 | Slider(value: $outer, in: 16...96, step: 1).accentColor(.green) 129 | } 130 | 131 | HStack { 132 | BorderRadiusTextBadge(color: .blue, text: "Inner") 133 | BorderRadiusTextField(value: $inner, color: .blue, text: "Inner") 134 | Slider(value: $inner, in: 32...64, step: 1).accentColor(.blue) 135 | } 136 | 137 | HStack { 138 | BorderRadiusTextBadge(color: .orange, text: "Padding") 139 | BorderRadiusTextField(value: $padding, color: .orange, text: "Padding") 140 | Slider(value: $padding, in: 16...32, step: 1).accentColor(.orange) 141 | } 142 | 143 | Button(action: randomize) { 144 | VStack { 145 | Text("Randomize") 146 | .font(.system(.body, design: .rounded, weight: .bold)) 147 | .foregroundColor(Color(.secondaryLabel)) 148 | .contentTransition(.interpolate) 149 | } 150 | .padding() 151 | .frame(maxWidth: .infinity) 152 | .background(Color(.secondarySystemFill)) 153 | .clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous)) 154 | } 155 | } 156 | .padding(24) 157 | .frame(maxHeight: nil, alignment: .top) 158 | .background { 159 | UnevenRoundedRectangle(cornerRadii: .init(topLeading: 24, topTrailing: 24)) 160 | .fill(Color(.secondarySystemBackground)) 161 | .ignoresSafeArea(.all, edges: .bottom) 162 | } 163 | } 164 | .navigationTitle("Border Radius Calculator") 165 | .navigationBarTitleDisplayMode(.inline) 166 | } 167 | } 168 | 169 | #Preview { 170 | BorderRadiusCalculator() 171 | } 172 | -------------------------------------------------------------------------------- /Escapades/3. Border Radius/BorderRadiusCalculatorIllustration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BorderRadiusCalculatorIllustration.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 10/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct BorderRadiusCalculatorIllustration: View { 11 | @Binding var outer: Double 12 | @Binding var inner: Double 13 | @Binding var padding: Double 14 | 15 | let gradient_outer = LinearGradient( 16 | gradient: Gradient( 17 | stops: [.init(color: .clear, location: 0.8), 18 | .init(color: .green, location: 1.0)] 19 | ), 20 | startPoint: .bottomLeading, 21 | endPoint: .topTrailing 22 | ) 23 | 24 | let gradient_inner = LinearGradient( 25 | gradient: Gradient( 26 | stops: [.init(color: .clear, location: 0.8), 27 | .init(color: .blue, location: 1.0)] 28 | ), 29 | startPoint: .bottomLeading, 30 | endPoint: .topTrailing 31 | ) 32 | 33 | var body: some View { 34 | VStack(spacing: 16) { 35 | VStack {} 36 | .frame(maxWidth: .infinity, maxHeight: .infinity) 37 | .foregroundStyle(.green) 38 | .background { 39 | RoundedRectangle( 40 | cornerRadius: inner 41 | ) 42 | .stroke(Color(.systemFill), lineWidth: 4) 43 | 44 | RoundedRectangle( 45 | cornerRadius: inner 46 | ) 47 | .stroke(gradient_inner, lineWidth: 4) 48 | .rotationEffect(Angle(degrees: 270)) 49 | } 50 | } 51 | .padding(padding) 52 | .frame(width: 290, height: 290) 53 | .foregroundStyle(.green) 54 | .background { 55 | RoundedRectangle( 56 | cornerRadius: outer 57 | ) 58 | .stroke(Color(.systemFill), lineWidth: 4) 59 | 60 | RoundedRectangle( 61 | cornerRadius: outer 62 | ) 63 | 64 | .stroke(gradient_outer, lineWidth: 4) 65 | .rotationEffect(Angle(degrees: 270)) 66 | } 67 | } 68 | } 69 | 70 | #Preview { 71 | BorderRadiusCalculatorIllustration(outer: .constant(64), 72 | inner: .constant(32), 73 | padding: .constant(24)) 74 | } 75 | -------------------------------------------------------------------------------- /Escapades/3. Border Radius/BorderRadiusComponents.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BorderRadius+Modifiers.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 10/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | struct BorderRadiusTextDebug: View { 11 | @Binding var value: Double 12 | 13 | var color: Color 14 | var offset: CGSize 15 | var isPadding: Bool = false 16 | 17 | var body: some View { 18 | if isPadding { 19 | Rectangle() 20 | .fill(color.quaternary) 21 | .frame(width: 32, height: value, alignment: .bottom) 22 | .overlay( 23 | Text("\(value, specifier: "%.0f")") 24 | .font(.system(.caption, design: .rounded, weight: .bold)) 25 | .foregroundColor(color) 26 | .contentTransition(.interpolate) 27 | ) 28 | .offset(offset) 29 | .zIndex(2) 30 | } 31 | else { 32 | Circle() 33 | .fill(color.quaternary) 34 | .frame(width: 32, height: 32) 35 | .overlay( 36 | Text("\(value, specifier: "%.0f")") 37 | .font(.system(.caption, design: .rounded, weight: .bold)) 38 | .foregroundColor(color) 39 | .contentTransition(.interpolate) 40 | ) 41 | .offset(offset) 42 | .zIndex(2) 43 | } 44 | } 45 | } 46 | 47 | struct BorderRadiusTextBadge: View { 48 | var color: Color 49 | var text: String 50 | 51 | init(color: Color, text: String) { 52 | self.color = color 53 | self.text = text 54 | } 55 | 56 | var body: some View { 57 | VStack { 58 | Text(text) 59 | .font(.system(.body, design: .rounded, weight: .bold)) 60 | .foregroundStyle(.primary) 61 | } 62 | .frame(maxWidth: .infinity) 63 | .padding(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16)) 64 | .background(color.quaternary) 65 | .foregroundStyle(color) 66 | .clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous)) 67 | } 68 | } 69 | 70 | struct BorderRadiusTextField: View { 71 | @Binding var value: Double 72 | var color: Color 73 | var text: String 74 | 75 | var body: some View { 76 | TextField(text, value: $value, formatter: NumberFormatter()) 77 | .font(.system(.body, design: .rounded, weight: .bold)) 78 | .multilineTextAlignment(.center) 79 | .padding(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16)) 80 | .frame(maxWidth: .infinity) 81 | .background(color.quaternary) 82 | .foregroundStyle(color) 83 | .clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous)) 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Escapades/5. Link Preview/LinkPreview.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BookmarkHome.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 13/10/2023. 6 | // 7 | 8 | import LinkPresentation 9 | import Popovers 10 | import SkeletonView 11 | import SwiftUI 12 | 13 | struct LinkPeering: View { 14 | @GestureState var press = false 15 | @State var show = false 16 | 17 | var body: some View { 18 | VStack { 19 | Text("[Mysterious Link](https://www.youtube.com/watch?v=dQw4w9WgXcQ)") 20 | .font(.system(.body, design: .rounded, weight: .medium)) 21 | .accentColor(.secondary) 22 | .scaleEffect(press ? 0.75 : 1) 23 | .animation( 24 | .interactiveSpring(response: 0.4, dampingFraction: 0.6), 25 | value: press 26 | ) 27 | .gesture( 28 | LongPressGesture(minimumDuration: 0.45) 29 | .updating($press) { currentState, gestureState, _ in 30 | gestureState = currentState 31 | } 32 | .onEnded { _ in 33 | show.toggle() 34 | } 35 | ) 36 | .popover(present: $show, 37 | attributes: { 38 | $0.sourceFrameInset.top = -16 39 | $0.position = .absolute( 40 | originAnchor: .top, 41 | popoverAnchor: .bottom 42 | ) 43 | $0.presentation.animation = .bouncy(duration: 0.25) 44 | $0.presentation.transition = .scale(scale: 0.5) 45 | }) { 46 | LinkPreviewView().scaleEffect(0.9) 47 | } 48 | } 49 | .padding(20) 50 | } 51 | } 52 | 53 | #Preview { 54 | LinkPeering() 55 | } 56 | -------------------------------------------------------------------------------- /Escapades/5. Link Preview/LinkPreviewView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LinkPreviewView.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 14/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | struct LinkPreviewView: View { 10 | enum version { 11 | case simple 12 | case expanded 13 | } 14 | 15 | @State var current: version = .simple 16 | @State var text = "Expand" 17 | 18 | @Namespace var animation 19 | 20 | func expand() { 21 | withAnimation(.snappy) { 22 | switch current { 23 | case .simple: 24 | text = "Expand" 25 | current = .expanded 26 | 27 | case .expanded: 28 | text = "Close" 29 | current = .simple 30 | } 31 | 32 | switch current { 33 | case .simple: 34 | text = "Expand" 35 | case .expanded: 36 | text = "Collapse" 37 | } 38 | } 39 | } 40 | 41 | var body: some View { 42 | VStack(spacing: 16) { 43 | if current == .expanded { 44 | Image(.rick) 45 | .resizable() 46 | .scaledToFit() 47 | .frame(maxWidth: .infinity) 48 | .clipped() 49 | .clipShape(RoundedRectangle(cornerRadius: 10)) 50 | .transition( 51 | .asymmetric( 52 | insertion: .opacity.animation(.snappy.delay(0.3)), 53 | removal: .opacity.animation(.snappy.delay(0.2)) 54 | ) 55 | ) 56 | } 57 | 58 | VStack(spacing: 8) { 59 | if current == .expanded { 60 | LinkPreviewDetail( 61 | icon: "textformat", 62 | detail: "Rick Astley - Never Gonna Give You Up" 63 | ) 64 | .transition( 65 | .asymmetric( 66 | insertion: .opacity.animation(.snappy.delay(0.2)), 67 | removal: .opacity 68 | ) 69 | ) 70 | 71 | LinkPreviewDetail( 72 | icon: "link", 73 | detail: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" 74 | ) 75 | .transition( 76 | .asymmetric( 77 | insertion: .opacity.animation(.snappy.delay(0.25)), 78 | removal: .opacity 79 | ) 80 | ) 81 | 82 | LinkPreviewDetail( 83 | icon: "calendar", 84 | detail: "25 Oct 2009" 85 | ) 86 | .transition( 87 | .asymmetric( 88 | insertion: .opacity.animation(.snappy.delay(0.3)), 89 | removal: .opacity 90 | ) 91 | ) 92 | 93 | LinkPreviewDetail( 94 | icon: "chart.line.uptrend.xyaxis", 95 | detail: "1,458,380,013 views" 96 | ) 97 | .transition( 98 | .asymmetric( 99 | insertion: .opacity.animation(.snappy.delay(0.35)), 100 | removal: .opacity 101 | ) 102 | ) 103 | } 104 | else { 105 | LinkPreviewDetail( 106 | icon: "textformat", 107 | detail: "Rick Astley - Never Gonna Give You Up" 108 | ) 109 | 110 | LinkPreviewDetail( 111 | icon: "link", 112 | detail: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" 113 | ) 114 | } 115 | } 116 | 117 | HStack { 118 | LinkPreviewButton(text: .constant("Open"), color: .indigo) 119 | 120 | Spacer() 121 | 122 | LinkPreviewButton(text: .constant("Share"), color: .mint) 123 | 124 | Spacer() 125 | 126 | LinkPreviewButton(text: $text, color: .brown, action: expand) 127 | } 128 | } 129 | .padding(10) 130 | .frame(maxWidth: 325, alignment: .bottom) 131 | .background { 132 | RoundedRectangle(cornerRadius: 16) 133 | .fill(.white) 134 | .shadow(radius: 2, x: 0, y: 1) 135 | } 136 | } 137 | } 138 | 139 | struct LinkPreviewView_2: View { 140 | var body: some View { 141 | ZStack { 142 | VStack(spacing: -24) { 143 | Image(.rick) 144 | .resizable() 145 | .scaledToFit() 146 | .frame(maxWidth: .infinity) 147 | .clipped() 148 | .clipShape(RoundedRectangle(cornerRadius: 10)) 149 | .shadow(radius: 2, x: 0, y: 1) 150 | 151 | VStack { 152 | VStack(spacing: 8) { 153 | LinkPreviewDetail( 154 | icon: "textformat", 155 | detail: "Rick Astley - Never Gonna Give You Up" 156 | ) 157 | 158 | LinkPreviewDetail( 159 | icon: "link", 160 | detail: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" 161 | ) 162 | } 163 | 164 | HStack { 165 | LinkPreviewButton(text: .constant("Open"), color: .indigo) 166 | 167 | Spacer() 168 | 169 | LinkPreviewButton(text: .constant("Share"), color: .mint) 170 | } 171 | } 172 | .padding(10) 173 | .frame(maxWidth: 250) 174 | .background { 175 | RoundedRectangle(cornerRadius: 16) 176 | .fill(.white) 177 | .shadow(radius: 2, x: 0, y: 1) 178 | } 179 | .zIndex(1) 180 | } 181 | } 182 | .padding(10) 183 | .frame(maxWidth: 325) 184 | } 185 | } 186 | 187 | struct LinkPreviewView_3: View { 188 | var body: some View { 189 | VStack(alignment: .leading, spacing: 16) { 190 | Image(.rick) 191 | .resizable() 192 | .scaledToFit() 193 | .frame(maxWidth: .infinity) 194 | .clipped() 195 | .clipShape(RoundedRectangle(cornerRadius: 10)) 196 | 197 | VStack(spacing: 8) { 198 | LinkPreviewDetail( 199 | icon: "textformat", 200 | detail: "Rick Astley - Never Gonna Give You Up" 201 | ) 202 | 203 | LinkPreviewDetail( 204 | icon: "link", 205 | detail: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" 206 | ) 207 | 208 | LinkPreviewDetail( 209 | icon: "calendar", 210 | detail: "25 Oct 2009" 211 | ) 212 | 213 | LinkPreviewDetail( 214 | icon: "chart.line.uptrend.xyaxis", 215 | detail: "1,458,380,013 views" 216 | ) 217 | } 218 | 219 | HStack { 220 | LinkPreviewButton(text: .constant("Open"), color: .indigo) 221 | 222 | Spacer() 223 | 224 | LinkPreviewButton(text: .constant("Share"), color: .mint) 225 | } 226 | } 227 | .padding(10) 228 | .frame(maxWidth: 300) 229 | .background { 230 | RoundedRectangle(cornerRadius: 16) 231 | .fill(.white) 232 | .shadow(radius: 2, x: 0, y: 1) 233 | } 234 | } 235 | } 236 | 237 | #Preview { 238 | VStack { 239 | LinkPreviewView() 240 | } 241 | } 242 | 243 | #Preview { 244 | VStack { 245 | LinkPreviewView_2() 246 | LinkPreviewView_3() 247 | } 248 | } 249 | 250 | struct LinkPreviewDetail: View { 251 | @State var icon: String = "textformat" 252 | @State var detail: String = "Rick Astley - Never Gonna Give You Up" 253 | 254 | var body: some View { 255 | HStack(alignment: .center) { 256 | Image(systemName: icon) 257 | .font(.system(.footnote, design: .rounded, weight: .bold)) 258 | .foregroundStyle(.tertiary) 259 | .frame(width: 24) 260 | .frame(height: 16) 261 | 262 | Text(detail) 263 | .font(.system(.footnote, design: .rounded, weight: .bold)) 264 | .foregroundStyle(.secondary) 265 | .frame(maxWidth: .infinity, alignment: .leading) 266 | .truncationMode(.tail) 267 | .lineLimit(1) 268 | } 269 | .frame(maxWidth: .infinity) 270 | } 271 | } 272 | 273 | struct LinkPreviewButton: View { 274 | @Binding var text: String 275 | @State var color: Color = .blue 276 | @State var action: () -> Void = {} 277 | 278 | var body: some View { 279 | Button(action: action) { 280 | VStack { 281 | Text(text) 282 | .font(.system(.footnote, design: .rounded, weight: .bold)) 283 | .foregroundStyle(.primary) 284 | .contentTransition(.identity) 285 | } 286 | .padding(EdgeInsets(top: 8, leading: 12, bottom: 8, trailing: 12)) 287 | .frame(maxWidth: .infinity) 288 | .background(color.quaternary) 289 | .foregroundStyle(color) 290 | .clipShape(RoundedRectangle(cornerRadius: 8, style: .continuous)) 291 | } 292 | } 293 | } 294 | -------------------------------------------------------------------------------- /Escapades/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 | -------------------------------------------------------------------------------- /Escapades/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 | -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Chelsea Profile Picture.imageset/Chelsea Profile Picture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphaelsalaja/Escapades/6ef1d82f6262c8715e93ec4d81b5a9d45b4e4eac/Escapades/Assets.xcassets/Chelsea Profile Picture.imageset/Chelsea Profile Picture.png -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Chelsea Profile Picture.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Chelsea Profile Picture.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 | -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Chelsea.imageset/Chelsea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphaelsalaja/Escapades/6ef1d82f6262c8715e93ec4d81b5a9d45b4e4eac/Escapades/Assets.xcassets/Chelsea.imageset/Chelsea.png -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Chelsea.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Chelsea.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 | -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Everton.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Everton.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 | -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Everton.imageset/Everton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphaelsalaja/Escapades/6ef1d82f6262c8715e93ec4d81b5a9d45b4e4eac/Escapades/Assets.xcassets/Everton.imageset/Everton.png -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Rick.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Rick.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 | -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Rick.imageset/Rick.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphaelsalaja/Escapades/6ef1d82f6262c8715e93ec4d81b5a9d45b4e4eac/Escapades/Assets.xcassets/Rick.imageset/Rick.jpg -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Youtube.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "filename" : "Youtube.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 | -------------------------------------------------------------------------------- /Escapades/Assets.xcassets/Youtube.imageset/Youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphaelsalaja/Escapades/6ef1d82f6262c8715e93ec4d81b5a9d45b4e4eac/Escapades/Assets.xcassets/Youtube.imageset/Youtube.png -------------------------------------------------------------------------------- /Escapades/ContentView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ContentView.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 03/10/2023. 6 | // 7 | 8 | import Observation 9 | import SwiftUI 10 | 11 | @Observable 12 | class Escapade: Identifiable { 13 | var name: String 14 | var view: AnyView 15 | 16 | init(name: String, view: AnyView) { 17 | self.name = name 18 | self.view = view 19 | } 20 | } 21 | 22 | struct ContentView: View { 23 | var escapades: [Escapade] = [ 24 | Escapade(name: "Layered Stack", view: AnyView(LayeredStackShowcase())), 25 | Escapade(name: "Banter Club", view: AnyView(BanterClub())), 26 | Escapade(name: "Border Radius Calculator", view: AnyView(BorderRadiusCalculator())), 27 | Escapade(name: "Link Preview", view: AnyView(LinkPeering())) 28 | ] 29 | 30 | var body: some View { 31 | NavigationStack { 32 | List { 33 | ForEach(escapades) { escapade in 34 | NavigationLink(destination: escapade.view) { 35 | VStack(alignment: .leading) { 36 | Text(escapade.name) 37 | .font(.headline) 38 | } 39 | } 40 | } 41 | } 42 | .navigationTitle("Escapades") 43 | } 44 | } 45 | } 46 | 47 | #Preview { 48 | ContentView() 49 | } 50 | -------------------------------------------------------------------------------- /Escapades/EscapadesApp.swift: -------------------------------------------------------------------------------- 1 | // 2 | // EscapadesApp.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 03/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | 10 | @main 11 | struct EscapadesApp: App { 12 | var body: some Scene { 13 | WindowGroup { 14 | ContentView() 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /Escapades/Preview Content/Preview Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Raphael Salaja 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 | 4 | 5 | Twitter: @raphaelsalaja 6 | 7 |

8 | 9 | ## Escapades 10 | 11 | A collection of some of my SwiftUI expreiments. 12 | 13 | ## Contributing 14 | 15 | We welcome and encourage contributions to this project. If you have bug fixes or new features in mind, please create a new issue to discuss them. If you're interested in contributing code, fork the repository and submit a pull request. Make sure to document your changes and thoroughly test the project before submitting a pull request. Maintain consistency with the project's code style. 16 | 17 | ## Disclaimer 18 | 19 | This project is open source under the MIT license, granting you full access to the source code for modifications to suit your needs. Please note that this project is in beta, so there may be bugs or areas for improvement. If you discover any issues or have suggestions, please report them by creating a new issue. 20 | -------------------------------------------------------------------------------- /Widgets/1. Screenshots Stash/SwiftUIView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // SwiftUIView.swift 3 | // Escapades 4 | // 5 | // Created by Raphael Salaja on 14/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | import WidgetKit 10 | 11 | private struct Provider: TimelineProvider { 12 | func placeholder(in context: Context) -> SimpleEntry { 13 | SimpleEntry(date: Date()) 14 | } 15 | 16 | func getSnapshot(in context: Context, completion: @escaping (SimpleEntry) -> Void) { 17 | let entry = SimpleEntry(date: Date()) 18 | completion(entry) 19 | } 20 | 21 | func getTimeline(in context: Context, completion: @escaping (Timeline) -> Void) { 22 | let midnight = Calendar.current.startOfDay(for: Date()) 23 | let nextMidnight = Calendar.current.date(byAdding: .day, value: 1, to: midnight)! 24 | let entries = [SimpleEntry(date: midnight)] 25 | let timeline = Timeline(entries: entries, policy: .after(nextMidnight)) 26 | completion(timeline) 27 | } 28 | } 29 | 30 | private struct SimpleEntry: TimelineEntry { 31 | let date: Date 32 | } 33 | 34 | private struct EnvironmentWidgetEntryView: View { 35 | var entry: Provider.Entry 36 | 37 | @Environment(\.colorScheme) var colorScheme 38 | @Environment(\.widgetFamily) var widgetFamily 39 | 40 | var body: some View { 41 | RoundedRectangle(cornerRadius: 10) 42 | .containerBackground(.gray.quinary, for: .widget) 43 | } 44 | 45 | private var backgroundColor: Color { 46 | colorScheme == .dark ? .red : .orange 47 | } 48 | } 49 | 50 | struct EnvironmentWidget: Widget { 51 | private let kind: String = "screenshots" 52 | 53 | var body: some WidgetConfiguration { 54 | StaticConfiguration(kind: "screenshots", provider: Provider()) { entry in 55 | EnvironmentWidgetEntryView(entry: entry) 56 | } 57 | .configurationDisplayName("Environment Widget") 58 | .description("A demo showcasing how to adjust a Widget View depending on Environment variables.") 59 | } 60 | } 61 | 62 | #Preview(as: .systemLarge) { 63 | EnvironmentWidget() 64 | } timeline: { 65 | SimpleEntry(date: .now) 66 | } 67 | -------------------------------------------------------------------------------- /Widgets/AppIntent.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppIntent.swift 3 | // Widgets 4 | // 5 | // Created by Raphael Salaja on 12/10/2023. 6 | // 7 | 8 | import WidgetKit 9 | import AppIntents 10 | 11 | struct ConfigurationAppIntent: WidgetConfigurationIntent { 12 | static var title: LocalizedStringResource = "Configuration" 13 | static var description = IntentDescription("This is an example widget.") 14 | 15 | // An example configurable parameter. 16 | @Parameter(title: "Favorite Emoji", default: "😃") 17 | var favoriteEmoji: String 18 | } 19 | -------------------------------------------------------------------------------- /Widgets/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 | -------------------------------------------------------------------------------- /Widgets/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 | -------------------------------------------------------------------------------- /Widgets/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "author" : "xcode", 4 | "version" : 1 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /Widgets/Assets.xcassets/WidgetBackground.colorset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "colors" : [ 3 | { 4 | "idiom" : "universal" 5 | } 6 | ], 7 | "info" : { 8 | "author" : "xcode", 9 | "version" : 1 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Widgets/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSExtension 6 | 7 | NSExtensionPointIdentifier 8 | com.apple.widgetkit-extension 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /Widgets/WidgetsBundle.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WidgetsBundle.swift 3 | // Widgets 4 | // 5 | // Created by Raphael Salaja on 12/10/2023. 6 | // 7 | 8 | import SwiftUI 9 | import WidgetKit 10 | 11 | @main 12 | struct WidgetsBundle: WidgetBundle { 13 | var body: some Widget { 14 | WidgetsLiveActivity() 15 | } 16 | } 17 | 18 | 19 | -------------------------------------------------------------------------------- /Widgets/WidgetsLiveActivity.swift: -------------------------------------------------------------------------------- 1 | // 2 | // WidgetsLiveActivity.swift 3 | // Widgets 4 | // 5 | // Created by Raphael Salaja on 12/10/2023. 6 | // 7 | 8 | import ActivityKit 9 | import WidgetKit 10 | import SwiftUI 11 | 12 | struct WidgetsAttributes: ActivityAttributes { 13 | public struct ContentState: Codable, Hashable { 14 | // Dynamic stateful properties about your activity go here! 15 | var emoji: String 16 | } 17 | 18 | // Fixed non-changing properties about your activity go here! 19 | var name: String 20 | } 21 | 22 | struct WidgetsLiveActivity: Widget { 23 | var body: some WidgetConfiguration { 24 | ActivityConfiguration(for: WidgetsAttributes.self) { context in 25 | // Lock screen/banner UI goes here 26 | VStack { 27 | Text("Hello \(context.state.emoji)") 28 | } 29 | .activityBackgroundTint(Color.cyan) 30 | .activitySystemActionForegroundColor(Color.black) 31 | 32 | } dynamicIsland: { context in 33 | DynamicIsland { 34 | // Expanded UI goes here. Compose the expanded UI through 35 | // various regions, like leading/trailing/center/bottom 36 | DynamicIslandExpandedRegion(.leading) { 37 | Text("Leading") 38 | } 39 | DynamicIslandExpandedRegion(.trailing) { 40 | Text("Trailing") 41 | } 42 | DynamicIslandExpandedRegion(.bottom) { 43 | Text("Bottom \(context.state.emoji)") 44 | // more content 45 | } 46 | } compactLeading: { 47 | Text("L") 48 | } compactTrailing: { 49 | Text("T \(context.state.emoji)") 50 | } minimal: { 51 | Text(context.state.emoji) 52 | } 53 | .widgetURL(URL(string: "http://www.apple.com")) 54 | .keylineTint(Color.red) 55 | } 56 | } 57 | } 58 | 59 | extension WidgetsAttributes { 60 | fileprivate static var preview: WidgetsAttributes { 61 | WidgetsAttributes(name: "World") 62 | } 63 | } 64 | 65 | extension WidgetsAttributes.ContentState { 66 | fileprivate static var smiley: WidgetsAttributes.ContentState { 67 | WidgetsAttributes.ContentState(emoji: "😀") 68 | } 69 | 70 | fileprivate static var starEyes: WidgetsAttributes.ContentState { 71 | WidgetsAttributes.ContentState(emoji: "🤩") 72 | } 73 | } 74 | 75 | #Preview("Notification", as: .content, using: WidgetsAttributes.preview) { 76 | WidgetsLiveActivity() 77 | } contentStates: { 78 | WidgetsAttributes.ContentState.smiley 79 | WidgetsAttributes.ContentState.starEyes 80 | } 81 | --------------------------------------------------------------------------------