34 lines
768 B
Swift
34 lines
768 B
Swift
import SwiftUI
|
|
|
|
struct ContentView: View {
|
|
@State private var selection = 0
|
|
|
|
var body: some View {
|
|
TabView(selection: $selection){
|
|
AccountsTab()
|
|
.tabItem {
|
|
VStack {
|
|
Image("first")
|
|
Text("Accounts")
|
|
}
|
|
}
|
|
.tag(0)
|
|
Text("Second View")
|
|
.font(.title)
|
|
.tabItem {
|
|
VStack {
|
|
Image("second")
|
|
Text("Second")
|
|
}
|
|
}
|
|
.tag(1)
|
|
}
|
|
}
|
|
}
|
|
|
|
struct ContentView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
ContentView()
|
|
}
|
|
}
|