The small white dots are not displaying at the bottom of the paging view I've built using TabView and WatchKit for watchOS 9.0. These dots are normally used to indicate which tab view that the user is currently seeing so the user knows to swipe left or right to view a screen to the left or right of the current screen.
Also, unexpectedly the first state of the tab view (controls
) displays rather than the second state (metrics
) that was explicitly declared as the default state.
import SwiftUI
import WatchKit
struct SessionPagingView: View {
@State private var selection: Tab = .metrics
enum Tab {
case controls, metrics, nowPlaying
}
var body: some View {
TabView(selection: $selection) {
ControlsView().tag(Tab.controls)
MetricsView().tag(Tab.controls)
NowPlayingView().tag(Tab.nowPlaying
}
}
}