mirror of
https://github.com/Mueller-Patrick/DHBW-Service-App.git
synced 2024-11-01 00:43:58 +00:00
Added settings view for first opening
This commit is contained in:
parent
f47674cdbb
commit
cfa09ec7aa
|
@ -17,6 +17,7 @@
|
||||||
CD9FABA3258EC60600D6D0C5 /* DHBW_ServiceUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD9FABA2258EC60600D6D0C5 /* DHBW_ServiceUITests.swift */; };
|
CD9FABA3258EC60600D6D0C5 /* DHBW_ServiceUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD9FABA2258EC60600D6D0C5 /* DHBW_ServiceUITests.swift */; };
|
||||||
CDCD721A25912E1200FBF2F5 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDCD721925912E1200FBF2F5 /* HomeView.swift */; };
|
CDCD721A25912E1200FBF2F5 /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDCD721925912E1200FBF2F5 /* HomeView.swift */; };
|
||||||
CDCD72242591316500FBF2F5 /* LocalSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDCD72232591316500FBF2F5 /* LocalSettings.swift */; };
|
CDCD72242591316500FBF2F5 /* LocalSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDCD72232591316500FBF2F5 /* LocalSettings.swift */; };
|
||||||
|
CDCD7230259135C500FBF2F5 /* FirstOpeningSettings.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDCD722F259135C500FBF2F5 /* FirstOpeningSettings.swift */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
@ -53,6 +54,7 @@
|
||||||
CD9FABA4258EC60600D6D0C5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
CD9FABA4258EC60600D6D0C5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||||
CDCD721925912E1200FBF2F5 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
|
CDCD721925912E1200FBF2F5 /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
|
||||||
CDCD72232591316500FBF2F5 /* LocalSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalSettings.swift; sourceTree = "<group>"; };
|
CDCD72232591316500FBF2F5 /* LocalSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LocalSettings.swift; sourceTree = "<group>"; };
|
||||||
|
CDCD722F259135C500FBF2F5 /* FirstOpeningSettings.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstOpeningSettings.swift; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
@ -152,6 +154,7 @@
|
||||||
children = (
|
children = (
|
||||||
CD9FAB82258EC60200D6D0C5 /* ContentView.swift */,
|
CD9FAB82258EC60200D6D0C5 /* ContentView.swift */,
|
||||||
CDCD721E25912E1700FBF2F5 /* Tabs */,
|
CDCD721E25912E1700FBF2F5 /* Tabs */,
|
||||||
|
CDCD722E259135AD00FBF2F5 /* Other */,
|
||||||
);
|
);
|
||||||
path = Views;
|
path = Views;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
@ -190,6 +193,14 @@
|
||||||
path = Observables;
|
path = Observables;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
CDCD722E259135AD00FBF2F5 /* Other */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
CDCD722F259135C500FBF2F5 /* FirstOpeningSettings.swift */,
|
||||||
|
);
|
||||||
|
path = Other;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
/* End PBXGroup section */
|
/* End PBXGroup section */
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
/* Begin PBXNativeTarget section */
|
||||||
|
@ -319,6 +330,7 @@
|
||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
CDCD7230259135C500FBF2F5 /* FirstOpeningSettings.swift in Sources */,
|
||||||
CD9FAB8A258EC60600D6D0C5 /* Persistence.swift in Sources */,
|
CD9FAB8A258EC60600D6D0C5 /* Persistence.swift in Sources */,
|
||||||
CD9FAB83258EC60200D6D0C5 /* ContentView.swift in Sources */,
|
CD9FAB83258EC60200D6D0C5 /* ContentView.swift in Sources */,
|
||||||
CDCD72242591316500FBF2F5 /* LocalSettings.swift in Sources */,
|
CDCD72242591316500FBF2F5 /* LocalSettings.swift in Sources */,
|
||||||
|
|
|
@ -26,11 +26,7 @@ struct ContentView: View {
|
||||||
.tag(0)
|
.tag(0)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Button(action: {
|
FirstOpeningSettings()
|
||||||
self.settings.isFirstOpening = !self.settings.isFirstOpening
|
|
||||||
}){
|
|
||||||
Text("First opening toggle")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
26
DHBW-Service/Views/Other/FirstOpeningSettings.swift
Normal file
26
DHBW-Service/Views/Other/FirstOpeningSettings.swift
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
//
|
||||||
|
// FirstOpeningSettings.swift
|
||||||
|
// DHBW-Service
|
||||||
|
//
|
||||||
|
// Created by Patrick Müller on 21.12.20.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
|
struct FirstOpeningSettings: View {
|
||||||
|
@EnvironmentObject var settings: LocalSettings
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
Button(action: {
|
||||||
|
self.settings.isFirstOpening = !self.settings.isFirstOpening
|
||||||
|
}){
|
||||||
|
Text("First opening toggle")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct FirstOpeningSettings_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
FirstOpeningSettings()
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user