TokiTrainer/Toki Trainer/Views/ContentView.swift

50 lines
1.1 KiB
Swift
Raw Normal View History

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
extension String: Identifiable {
public var id: String { self }
}
2021-11-03 18:21:22 +00:00
struct ContentView: View {
@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 {
DictionaryView()
.tabItem {
Image(systemName: "book")
Text("Dictionary")
}
2021-11-07 06:25:18 +00:00
TranslatorView()
.tabItem {
Image(systemName: "message")
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 {
ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext)
2021-11-03 18:21:22 +00:00
}
}