Added navigation and tab views
This commit is contained in:
		| @@ -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 = "<group>"; }; | ||||
| 		6C8184FF2B88C9660033CF46 /* WordAXModelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WordAXModelView.swift; sourceTree = "<group>"; }; | ||||
| 		6C8185012B88C9FB0033CF46 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; }; | ||||
| 		6C8185032B88CA210033CF46 /* AnkiView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnkiView.swift; sourceTree = "<group>"; }; | ||||
| 		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 = "<group>"; }; | ||||
| 		6CF439532B83541D004C3543 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; }; | ||||
| 		6CF439532B83541D004C3543 /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = "<group>"; }; | ||||
| 		6CF439552B83541E004C3543 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | ||||
| 		6CF439582B83541E004C3543 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; }; | ||||
| /* 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; | ||||
| 		}; | ||||
|   | ||||
							
								
								
									
										18
									
								
								WordAX/AnkiView.swift
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								WordAX/AnkiView.swift
									
									
									
									
									
										Normal file
									
								
							| @@ -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() | ||||
| } | ||||
| @@ -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() | ||||
| } | ||||
							
								
								
									
										42
									
								
								WordAX/MainView.swift
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								WordAX/MainView.swift
									
									
									
									
									
										Normal file
									
								
							| @@ -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() | ||||
| } | ||||
							
								
								
									
										18
									
								
								WordAX/SettingsView.swift
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								WordAX/SettingsView.swift
									
									
									
									
									
										Normal file
									
								
							| @@ -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() | ||||
| } | ||||
							
								
								
									
										8
									
								
								WordAX/WordAX.swift
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								WordAX/WordAX.swift
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| // | ||||
| //  WordAX.swift | ||||
| //  WordAX | ||||
| // | ||||
| //  Created by Oliver Hnát on 23.02.2024. | ||||
| // | ||||
|  | ||||
| import Foundation | ||||
							
								
								
									
										8
									
								
								WordAX/WordAXModel.swift
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								WordAX/WordAXModel.swift
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| // | ||||
| //  WordAXModel.swift | ||||
| //  WordAX | ||||
| // | ||||
| //  Created by Oliver Hnát on 23.02.2024. | ||||
| // | ||||
|  | ||||
| import Foundation | ||||
							
								
								
									
										8
									
								
								WordAX/WordAXModelView.swift
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								WordAX/WordAXModelView.swift
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| // | ||||
| //  WordAXModelView.swift | ||||
| //  WordAX | ||||
| // | ||||
| //  Created by Oliver Hnát on 23.02.2024. | ||||
| // | ||||
|  | ||||
| import Foundation | ||||
		Reference in New Issue
	
	Block a user