MainView.swift 774 B

1234567891011121314151617181920212223242526272829
  1. import Foundation
  2. import SwiftUI
  3. struct MainView: View {
  4. var body: some View {
  5. TabView {
  6. SubscriptionListView()
  7. .tabItem {
  8. Image(systemName: "message.fill")
  9. Text("Notifications")
  10. }
  11. SettingsView()
  12. .tabItem {
  13. Image(systemName: "gearshape.fill")
  14. Text("Settings")
  15. }
  16. }
  17. }
  18. }
  19. struct MainView_Previews: PreviewProvider {
  20. static var previews: some View {
  21. let store = Store.preview // Store.previewEmpty
  22. MainView()
  23. .environment(\.managedObjectContext, store.context)
  24. .environmentObject(store)
  25. .environmentObject(AppDelegate())
  26. }
  27. }