如果我选择 tabViewStyle(PageTabViewStyle()) 可以隐藏显示的这些点
It is possible to hide this dots which is showing if I chose tabViewStyle(PageTabViewStyle())
如果我选择 tabViewStyle(PageTabViewStyle()),可以隐藏显示的这些点。
我没有找到任何结果所以我问你们。Its iPhone screen where you can see 7 dots
import SwiftUI
struct kafelki: View {
@State var Index = 0
var body: some View {
ZStack{
Color.red
VStack{
TabView(selection: $Index){
ForEach(0..<8){ index in
Rectangle()
.frame(width: 200, height: 200)
}
}
.animation(.easeInOut)
Button(action: {
if Index == 7 {
Index = 0
}
else{
Index = Index + 1
}
}, label: {
Text("Click")
.font(.title)
})
}
.tabViewStyle(PageTabViewStyle())
}
}
}
struct kafelki_Previews: PreviewProvider {
static var previews: some View {
kafelki()
}
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
如果我选择 tabViewStyle(PageTabViewStyle()),可以隐藏显示的这些点。 我没有找到任何结果所以我问你们。Its iPhone screen where you can see 7 dots
import SwiftUI
struct kafelki: View {
@State var Index = 0
var body: some View {
ZStack{
Color.red
VStack{
TabView(selection: $Index){
ForEach(0..<8){ index in
Rectangle()
.frame(width: 200, height: 200)
}
}
.animation(.easeInOut)
Button(action: {
if Index == 7 {
Index = 0
}
else{
Index = Index + 1
}
}, label: {
Text("Click")
.font(.title)
})
}
.tabViewStyle(PageTabViewStyle())
}
}
}
struct kafelki_Previews: PreviewProvider {
static var previews: some View {
kafelki()
}
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))