如何更改 TabView 点指示器位置 SwiftUI

时间:2021-02-28 18:18:30

标签: swift swiftui

我想改变 TabView 点指示器的位置有没有办法做到这一点? .

   TabView {
            
            ForEach(data.options ?? [],id:\.id) { item in
                
                NavigationLink(destination: ViewParser.create(item: item,index: item.typeArry ?? [])) {
                    
                    AnimatedImage(url: URL(string : item.image ?? ""))
                        .resizable()
                        .frame(width:CGFloat(getWidth(column: data.column ?? 1)))
                        .cornerRadius(6)
                }
                
                
            }.frame(width:UIScreen.main.bounds.width,height:CGFloat(getHeight(ratio: data.ratio ?? 1, column: data.column ?? 1)))
            
            
        }.tabViewStyle(PageTabViewStyle(indexDisplayMode: .automatic))

enter image description here

0 个答案:

没有答案