diff options
Diffstat (limited to 'Juick/Views/ContentView.swift')
-rw-r--r-- | Juick/Views/ContentView.swift | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Juick/Views/ContentView.swift b/Juick/Views/ContentView.swift new file mode 100644 index 0000000..9a9f45b --- /dev/null +++ b/Juick/Views/ContentView.swift @@ -0,0 +1,47 @@ +// +// 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() + } +} |