// // ContentView.swift // tst // // Created by Vitaly Takmazov on 10.12.2019. // Copyright © 2019 com.juick. All rights reserved. // import SwiftUI import Combine struct ContentView: View { @State var selectedView = 0 var body: some View { NavigationView { TabView(selection: $selectedView) { FeedView(url: "https://api.juick.com/messages?popular=1", type: .messages) .tabItem { Image("ei-clock") Text("Today") }.tag(0) FeedView(url: "https://api.juick.com/messages/discussions", type: .messages) .tabItem { Image("ei-bell") Text("Discussions") }.tag(1) FeedView(url: "https://api.juick.com/messages", type: .messages) .tabItem { Image("ei-envelope") Text("Chats") }.tag(2) FeedView(url: "https://api.juick.com/messages", type: .messages) .tabItem { Image("ei-search") Text("Discover") }.tag(3) } .navigationBarTitle("Juick", displayMode: .inline) } } } struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } }