diff --git a/WordAX.xcodeproj/project.pbxproj b/WordAX.xcodeproj/project.pbxproj index e65cbac..cf6985b 100644 --- a/WordAX.xcodeproj/project.pbxproj +++ b/WordAX.xcodeproj/project.pbxproj @@ -7,16 +7,24 @@ objects = { /* Begin PBXBuildFile section */ + 6C8184FE2B88C9580033CF46 /* WordAX.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C8184FD2B88C9580033CF46 /* WordAX.swift */; }; + 6C8185002B88C9660033CF46 /* WordAXModelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C8184FF2B88C9660033CF46 /* WordAXModelView.swift */; }; + 6C8185022B88C9FB0033CF46 /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C8185012B88C9FB0033CF46 /* SettingsView.swift */; }; + 6C8185042B88CA210033CF46 /* AnkiView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C8185032B88CA210033CF46 /* AnkiView.swift */; }; 6CF439522B83541D004C3543 /* WordAXApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CF439512B83541D004C3543 /* WordAXApp.swift */; }; - 6CF439542B83541D004C3543 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CF439532B83541D004C3543 /* ContentView.swift */; }; + 6CF439542B83541D004C3543 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CF439532B83541D004C3543 /* MainView.swift */; }; 6CF439562B83541E004C3543 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6CF439552B83541E004C3543 /* Assets.xcassets */; }; 6CF439592B83541E004C3543 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6CF439582B83541E004C3543 /* Preview Assets.xcassets */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 6C8184FD2B88C9580033CF46 /* WordAX.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordAX.swift; sourceTree = ""; }; + 6C8184FF2B88C9660033CF46 /* WordAXModelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordAXModelView.swift; sourceTree = ""; }; + 6C8185012B88C9FB0033CF46 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = ""; }; + 6C8185032B88CA210033CF46 /* AnkiView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnkiView.swift; sourceTree = ""; }; 6CF4394E2B83541D004C3543 /* WordAX.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WordAX.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6CF439512B83541D004C3543 /* WordAXApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordAXApp.swift; sourceTree = ""; }; - 6CF439532B83541D004C3543 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 6CF439532B83541D004C3543 /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; 6CF439552B83541E004C3543 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 6CF439582B83541E004C3543 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -52,7 +60,11 @@ isa = PBXGroup; children = ( 6CF439512B83541D004C3543 /* WordAXApp.swift */, - 6CF439532B83541D004C3543 /* ContentView.swift */, + 6CF439532B83541D004C3543 /* MainView.swift */, + 6C8185012B88C9FB0033CF46 /* SettingsView.swift */, + 6C8185032B88CA210033CF46 /* AnkiView.swift */, + 6C8184FD2B88C9580033CF46 /* WordAX.swift */, + 6C8184FF2B88C9660033CF46 /* WordAXModelView.swift */, 6CF439552B83541E004C3543 /* Assets.xcassets */, 6CF439572B83541E004C3543 /* Preview Content */, ); @@ -137,8 +149,12 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 6CF439542B83541D004C3543 /* ContentView.swift in Sources */, + 6C8185022B88C9FB0033CF46 /* SettingsView.swift in Sources */, + 6CF439542B83541D004C3543 /* MainView.swift in Sources */, + 6C8185002B88C9660033CF46 /* WordAXModelView.swift in Sources */, + 6C8185042B88CA210033CF46 /* AnkiView.swift in Sources */, 6CF439522B83541D004C3543 /* WordAXApp.swift in Sources */, + 6C8184FE2B88C9580033CF46 /* WordAX.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/WordAX/AnkiView.swift b/WordAX/AnkiView.swift new file mode 100644 index 0000000..d784c6e --- /dev/null +++ b/WordAX/AnkiView.swift @@ -0,0 +1,18 @@ +// +// AnkiView.swift +// WordAX +// +// Created by Oliver Hnát on 23.02.2024. +// + +import SwiftUI + +struct AnkiView: View { + var body: some View { + Text("This is Anki View") + } +} + +#Preview { + AnkiView() +} diff --git a/WordAX/ContentView.swift b/WordAX/ContentView.swift deleted file mode 100644 index 75540a9..0000000 --- a/WordAX/ContentView.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// ContentView.swift -// WordAX -// -// Created by Oliver Hnát on 19.02.2024. -// - -import SwiftUI - -struct ContentView: View { - var body: some View { - VStack { - Image(systemName: "globe") - .imageScale(.large) - .foregroundStyle(.tint) - Text("Hello, world!") - } - .padding() - } -} - -#Preview { - ContentView() -} diff --git a/WordAX/MainView.swift b/WordAX/MainView.swift new file mode 100644 index 0000000..eae77ba --- /dev/null +++ b/WordAX/MainView.swift @@ -0,0 +1,42 @@ +// +// ContentView.swift +// WordAX +// +// Created by Oliver Hnát on 19.02.2024. +// + +import SwiftUI + +struct MainView: View { + @State var selectedTab = "Anki" + init() { + UITabBar.appearance().backgroundColor = UIColor.systemGray5 + } + var body: some View { + ZStack { + TabView(selection: $selectedTab) { + Group { + AnkiView() + .tag("Anki") + .tabItem { + Image(systemName: "star") + Text("Anki") + } + SettingsView() + .tag("Settings") + .tabItem { + Image(systemName: "gear") + Text("Settings") + } + } + .toolbar(.visible, for: .tabBar) + .toolbarBackground(Color.yellow, for: .tabBar) + } + } + + } +} + +#Preview { + MainView() +} diff --git a/WordAX/SettingsView.swift b/WordAX/SettingsView.swift new file mode 100644 index 0000000..1d26cd3 --- /dev/null +++ b/WordAX/SettingsView.swift @@ -0,0 +1,18 @@ +// +// SettingsView.swift +// WordAX +// +// Created by Oliver Hnát on 23.02.2024. +// + +import SwiftUI + +struct SettingsView: View { + var body: some View { + Text("This is settings") + } +} + +#Preview { + SettingsView() +} diff --git a/WordAX/WordAX.swift b/WordAX/WordAX.swift new file mode 100644 index 0000000..1637ea0 --- /dev/null +++ b/WordAX/WordAX.swift @@ -0,0 +1,8 @@ +// +// WordAX.swift +// WordAX +// +// Created by Oliver Hnát on 23.02.2024. +// + +import Foundation diff --git a/WordAX/WordAXModel.swift b/WordAX/WordAXModel.swift new file mode 100644 index 0000000..8a41561 --- /dev/null +++ b/WordAX/WordAXModel.swift @@ -0,0 +1,8 @@ +// +// WordAXModel.swift +// WordAX +// +// Created by Oliver Hnát on 23.02.2024. +// + +import Foundation diff --git a/WordAX/WordAXModelView.swift b/WordAX/WordAXModelView.swift new file mode 100644 index 0000000..972e181 --- /dev/null +++ b/WordAX/WordAXModelView.swift @@ -0,0 +1,8 @@ +// +// WordAXModelView.swift +// WordAX +// +// Created by Oliver Hnát on 23.02.2024. +// + +import Foundation