TokiTrainer/Toki Trainer/Views/ContentView.swift

50 lines
1.1 KiB
Swift

//
// 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 }
}
struct ContentView: View {
@Environment(\.managedObjectContext) private var viewContext
var body: some View {
TabView {
DictionaryView()
.tabItem {
Image(systemName: "book")
Text("Dictionary")
}
TranslatorView()
.tabItem {
Image(systemName: "message")
Text("Phrase Lookup")
}
FlashCardLessonsView()
.tabItem {
Image(systemName: "character.textbox")
Text("Flash Cards")
}
}
}
func openPartsOfSpeechView() {
print("Button pressed.")
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView().environment(\.managedObjectContext, PersistenceController.preview.container.viewContext)
}
}