Merge with Menu Branch

pull/3/head
Emre KARTAL 2 years ago
commit f89e5f645f

BIN
.DS_Store vendored

Binary file not shown.

120
.gitignore vendored

@ -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

BIN
Sources/.DS_Store vendored

Binary file not shown.

@ -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 = "<group>";
};
EC9A45AE2ABDF47A00125D41 /* Screens */ = {
isa = PBXGroup;
children = (
EC9A45AF2ABDF4A800125D41 /* HomeScreen.swift */,
);
path = Screens;
sourceTree = "<group>";
};
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 */,

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>AllIn.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

@ -1,14 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>AllIn.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

@ -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)
}
}
}

@ -1,12 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Info.plist
allin
Created by étudiant on 22/09/2023.
Copyright (c) 2023 ___ORGANIZATIONNAME___. All rights reserved.
-->
<plist version="1.0">
<dict/>
<dict>
<key>UIAppFonts</key>
<array>
<string>PlusJakartaSans.ttf</string>
</array>
</dict>
</plist>

@ -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)
}
}
Loading…
Cancel
Save