diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index 16d5452..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..14500e6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,120 @@ +# ---> Swift +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## User settings +xcuserdata/ + +## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) +*.xcscmblueprint +*.xccheckout + +## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) +build/ +DerivedData/ +*.moved-aside +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 + +## Obj-C/Swift specific +*.hmap + +## App packaging +*.ipa +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +# *.xcodeproj +# +# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata +# hence it is not needed unless you have added a package configuration file to your project +# .swiftpm + +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ +# +# Add this line if you want to avoid checking in source code from the Xcode workspace +# *.xcworkspace + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build/ + +# Accio dependency management +Dependencies/ +.accio/ + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. +# Instead, use fastlane to re-generate the screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output + +# Code Injection +# +# After new code Injection tools there's a generated folder /iOSInjectionProject +# https://github.com/johnno1962/injectionforxcode + +iOSInjectionProject/ + +# ---> macOS +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk \ No newline at end of file diff --git a/Sources/.DS_Store b/Sources/.DS_Store deleted file mode 100644 index 3b5df94..0000000 Binary files a/Sources/.DS_Store and /dev/null differ diff --git a/Sources/allin/allin.xcodeproj/project.pbxproj b/Sources/allin/allin.xcodeproj/project.pbxproj index 1b94e64..3441376 100644 --- a/Sources/allin/allin.xcodeproj/project.pbxproj +++ b/Sources/allin/allin.xcodeproj/project.pbxproj @@ -21,6 +21,7 @@ EC87FCD62ABBA24000363986 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCD52ABBA24000363986 /* Extensions.swift */; }; EC87FCD92ABBA60900363986 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCD82ABBA60900363986 /* Colors.swift */; }; EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */; }; + EC9A45B02ABDF4A800125D41 /* HomeScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC9A45AF2ABDF4A800125D41 /* HomeScreen.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -59,6 +60,7 @@ EC87FCD52ABBA24000363986 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = allin/Extensions/Extensions.swift; sourceTree = SOURCE_ROOT; }; EC87FCD82ABBA60900363986 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Colors.swift; path = allin/Ressources/Colors.swift; sourceTree = SOURCE_ROOT; }; EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TrendingBetCard.swift; path = allin/Views/TrendingBetCard.swift; sourceTree = SOURCE_ROOT; }; + EC9A45AF2ABDF4A800125D41 /* HomeScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = HomeScreen.swift; path = allin/Screens/HomeScreen.swift; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -121,6 +123,8 @@ D98C4D622AB9D017007A6B4D /* AllIn */ = { isa = PBXGroup; children = ( + EC9A45AE2ABDF47A00125D41 /* Screens */, + EC0EA7B02ABDACED006BA4A0 /* Info.plist */, EC0EA7AD2ABDAAAC006BA4A0 /* Fonts */, EC87FCD72ABBA5F200363986 /* Ressources */, ECF816C72ABB51E300DE30A4 /* Extensions */, @@ -174,6 +178,14 @@ path = Ressources; sourceTree = ""; }; + EC9A45AE2ABDF47A00125D41 /* Screens */ = { + isa = PBXGroup; + children = ( + EC9A45AF2ABDF4A800125D41 /* HomeScreen.swift */, + ); + path = Screens; + sourceTree = ""; + }; ECF816C72ABB51E300DE30A4 /* Extensions */ = { isa = PBXGroup; children = ( @@ -318,6 +330,7 @@ D98C4D662AB9D017007A6B4D /* ContentView.swift in Sources */, D92EC57C2ABADA2800CCD30E /* CoinCounterView.swift in Sources */, D98C4D8E2AB9D440007A6B4D /* TopBarView.swift in Sources */, + EC9A45B02ABDF4A800125D41 /* HomeScreen.swift in Sources */, EC46D7DF2ABCE0A20030AC04 /* ParameterMenuView.swift in Sources */, D98C4D642AB9D017007A6B4D /* AllInApp.swift in Sources */, EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */, diff --git a/Sources/allin/allin.xcodeproj/project.xcworkspace/xcuserdata/emkartal1.xcuserdatad/UserInterfaceState.xcuserstate b/Sources/allin/allin.xcodeproj/project.xcworkspace/xcuserdata/emkartal1.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index c739cde..0000000 Binary files a/Sources/allin/allin.xcodeproj/project.xcworkspace/xcuserdata/emkartal1.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Sources/allin/allin.xcodeproj/project.xcworkspace/xcuserdata/etudiant.xcuserdatad/UserInterfaceState.xcuserstate b/Sources/allin/allin.xcodeproj/project.xcworkspace/xcuserdata/etudiant.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 1faf1dc..0000000 Binary files a/Sources/allin/allin.xcodeproj/project.xcworkspace/xcuserdata/etudiant.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/Sources/allin/allin.xcodeproj/xcuserdata/emkartal1.xcuserdatad/xcschemes/xcschememanagement.plist b/Sources/allin/allin.xcodeproj/xcuserdata/emkartal1.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 6262e4b..0000000 --- a/Sources/allin/allin.xcodeproj/xcuserdata/emkartal1.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - AllIn.xcscheme_^#shared#^_ - - orderHint - 0 - - - - diff --git a/Sources/allin/allin.xcodeproj/xcuserdata/etudiant.xcuserdatad/xcschemes/xcschememanagement.plist b/Sources/allin/allin.xcodeproj/xcuserdata/etudiant.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 6262e4b..0000000 --- a/Sources/allin/allin.xcodeproj/xcuserdata/etudiant.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,14 +0,0 @@ - - - - - SchemeUserState - - AllIn.xcscheme_^#shared#^_ - - orderHint - 0 - - - - diff --git a/Sources/allin/allin/ContentView.swift b/Sources/allin/allin/ContentView.swift index f747be4..9068e8e 100644 --- a/Sources/allin/allin/ContentView.swift +++ b/Sources/allin/allin/ContentView.swift @@ -21,12 +21,22 @@ struct ContentView: View { } } } + let openDrag = DragGesture() + .onEnded { + if $0.translation.width > 100 { + withAnimation{ + self.showMenu = true + } + } + } GeometryReader { geometry in ZStack(alignment: .leading) { Home(showMenu: self.$showMenu) .frame(width: geometry.size.width, height: geometry.size.height) .offset(x: self.showMenu ? geometry.size.width/1.21:0) + .gesture(openDrag) + if self.showMenu { MenuView() .frame(width: geometry.size.width*0.83) @@ -42,22 +52,4 @@ struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } -} - -struct Home: View { - - @Binding var showMenu: Bool - - var body: some View { - VStack(alignment: .center, spacing: 0) { - TopBarView(showMenu: self.$showMenu) - ScrollView{ - TrendingBetCard().padding(.top,20) - } - - Spacer() - } - .edgesIgnoringSafeArea(.bottom) - } - -} +} \ No newline at end of file diff --git a/Sources/allin/allin/Info.plist b/Sources/allin/allin/Info.plist index ba7019d..5099837 100644 --- a/Sources/allin/allin/Info.plist +++ b/Sources/allin/allin/Info.plist @@ -1,12 +1,10 @@ - - + + UIAppFonts + + PlusJakartaSans.ttf + + diff --git a/Sources/allin/allin/Screens/HomeScreen.swift b/Sources/allin/allin/Screens/HomeScreen.swift new file mode 100644 index 0000000..19d7f75 --- /dev/null +++ b/Sources/allin/allin/Screens/HomeScreen.swift @@ -0,0 +1,26 @@ +// +// HomeScreen.swift +// AllIn +// +// Created by étudiant on 22/09/2023. +// + +import SwiftUI + +struct Home: View { + + @Binding var showMenu: Bool + + var body: some View { + VStack(alignment: .center, spacing: 0) { + TopBarView(showMenu: self.$showMenu) + ScrollView{ + TrendingBetCard() + } + + Spacer() + } + .edgesIgnoringSafeArea(.bottom) + } + +}