Files
mowesta/ios-app/app/MainTabView.swift
T
stottrop 443c5cbb15
LocationBasedServices/mowesta/ios-app%2Fshow-search-details This commit looks good
Merge remote-tracking branch 'remotes/origin/master' into ios-app/show-search-details
# Conflicts:
#	ios-app/app.xcodeproj/project.pbxproj
#	ios-app/app/AppDelegate.swift
#	ios-app/app/Data/User/UserData.swift
#	ios-app/app/Extensions/Coordinate+Extensions.swift
#	ios-app/app/Resources/Mowesta.xcdatamodeld/Mowesta.xcdatamodel/contents

Forgot that I was merging therefore:
added function to reset Application and logout user.
added alternative screen as tutorial when no favorites are shown.
added some translations.
2020-03-04 18:10:21 +01:00

53 lines
1.5 KiB
Swift

//
// ContentView.swift
// app
//
// Created by Marcus Handte on 06.11.19.
// Copyright © 2019 Marcus Handte. All rights reserved.
//
import SwiftUI
struct MainTabView: View {
@UIState private var selectedTab = 1
var body: some View {
TabView(selection: $selectedTab) {
WeatherStationsTab()
.tabItem {
Group {
Image(systemName: selectedTab == 0
? "cube.box.fill" : "cube.box")
Text("Stationen")
}.font(Font.system(size: 25))
}.tag(0)
FavoriteList()
.tabItem{
Group {
Image(systemName: selectedTab == 1
? "heart.fill" : "heart")
Text("Favorite_NavigationBarTitle")
}.font(Font.system(size: 25))
}.tag(1)
SearchTab()
.tabItem{
Group {
Image(systemName: "magnifyingglass")
Text("Search_NavigationBarTitle")
}.font(Font.system(size: 25))
}.tag(2)
}
.edgesIgnoringSafeArea(.top)
}
}
struct ContentView_Previews : PreviewProvider {
static var previews: some View {
MainTabView()
//.environmentObject(FavoriteLocations(locations: [locationEssen]))
.environmentObject(UserData.mockEmpty)
}
}