2021-11-03 18:21:22 +00:00
|
|
|
//
|
|
|
|
// ContentView.swift
|
|
|
|
// Toki Trainer
|
|
|
|
//
|
|
|
|
// Created by Avery Ada Pace on 11/2/21.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
import CoreData
|
|
|
|
|
2021-11-04 18:10:22 +00:00
|
|
|
extension String: Identifiable {
|
|
|
|
public var id: String { self }
|
|
|
|
}
|
|
|
|
|
2021-11-03 18:21:22 +00:00
|
|
|
struct ContentView: View {
|
2021-11-04 18:10:22 +00:00
|
|
|
@Environment(\.managedObjectContext) private var viewContext
|
2021-11-03 18:21:22 +00:00
|
|
|
|
2021-11-07 06:25:18 +00:00
|
|
|
var body: some View {
|
|
|
|
TabView {
|
2022-10-08 10:36:19 +00:00
|
|
|
DictionaryView()
|
|
|
|
.tabItem {
|
|
|
|
Image(systemName: "book")
|
|
|
|
Text("Dictionary")
|
|
|
|
}
|
2021-11-07 06:25:18 +00:00
|
|
|
TranslatorView()
|
2021-11-07 18:03:41 +00:00
|
|
|
.tabItem {
|
2021-11-11 15:04:48 +00:00
|
|
|
Image(systemName: "message")
|
2021-11-07 18:03:41 +00:00
|
|
|
Text("Phrase Lookup")
|
|
|
|
}
|
2021-11-08 17:24:46 +00:00
|
|
|
FlashCardLessonsView()
|
2021-11-07 06:25:18 +00:00
|
|
|
.tabItem {
|
|
|
|
Image(systemName: "character.textbox")
|
|
|
|
Text("Flash Cards")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func openPartsOfSpeechView() {
|
|
|
|
print("Button pressed.")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-03 18:21:22 +00:00
|
|
|
|
|
|
|
|
|
|
|
struct ContentView_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
2021-11-07 18:03:41 +00:00
|
|
|
ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext)
|
2021-11-03 18:21:22 +00:00
|
|
|
}
|
|
|
|
}
|