You would use a TabView {...}
to accomplish this. Effectively you instantiate your views inside of the TabView
then add an item modifier to each view.
var body: some View {
TabView {
Text("A")
.tabItem { Text("A") }
Text("B")
.tabItem { Text("B") }
Text("C")
.tabItem { Text("C") }
}
}
What this code does: https://i.stack.imgur.com/CKBHm.gif
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.