我正在使用SF符号为图像轮播创建点。我希望这些点是小的和白色的/轮廓。到目前为止,我已经能够减少点之间的间距。现在,所有的修改器对符号的大小没有影响。
TabView {
ForEach(shop.photos?[..<3] ?? [], id:\.self) { url in
AsyncImage(
url: URL(string: url),
content: { image in
image.resizable()
.scaledToFill()
.frame(width: 250, height: 250, alignment: .center)
.clipped()
},
placeholder: {
ProgressView()
}
).tabItem {
Image(systemName: "circle") // Also tried with Label("", systemImage: "circle")
.renderingMode(.original) // None of these modifiers had any impact
.resizable(resizingMode: .stretch)
.aspectRatio(contentMode: .fit)
.frame(width: 1.0, height: 1.0)
.font(.system(size: 100))
}
}
}.onAppear() {
let appearance = UITabBarAppearance()
appearance.stackedItemPositioning = .centered
appearance.stackedItemWidth = 10
UITabBar.appearance().standardAppearance = appearance
}
1条答案
按热度按时间oalqel3c1#
您可以添加前景色以更改图标的颜色。