LocationBasedServices/mowesta/ios-app%2Fshow-search-details This commit looks good
# 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.
53 lines
1.5 KiB
Swift
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)
|
|
}
|
|
}
|