英文:
Button Shapes ON and SwiftUI TabView UI strange
问题
-
我在SwiftUI上制作了一个非常简单的
TabView
,并将Button Shapes
设置为ON
,看到了一个奇怪的UI。您可以在Navigation View
的顶部看到3个矩形。我不知道它是从哪里来的。 -
有人可以帮忙吗?
-
- 按钮形状为ON
-
- 奇怪的UI
-
这是示例代码
TabView {
ProfileView()
.tabItem {
Image(systemName: "account")
Text("Profile")
}
...
}
带有导航视图的代码
NavigationView {
VStack(spacing: 20) {
}
.padding(.horizontal)
.padding(.bottom, 30)
}
.navigationTitle("account".localized())
.navigationBarTitleDisplayMode(.inline)
.navigationBarBackButtonHidden(true)
}
.navigationViewStyle(.stack)
英文:
I made very simple TabView
on SwiftUI
and turn Button Shapes
to ON
and see a strange UI. You can see 3 rectangles at top of Navigation View
. I don't know where's it come from.
Anybody can help?
1. Button shapes ON
2. UI strange
This is a sample code
TabView {
ProfileView()
.tabItem {
Image(systemName: "account")
Text("Profile")
}
...
}
With Navigation View
NavigationView {
VStack(spacing: 20) {
}
.padding(.horizontal)
.padding(.bottom, 30)
}
.navigationTitle("account".localized())
.navigationBarTitleDisplayMode(.inline)
.navigationBarBackButtonHidden(true)
}
.navigationViewStyle(.stack)
答案1
得分: 1
如果在打开“按钮形状”时出现了矩形,那么那里必定有您不知道的按钮。
英文:
If the rectangles appeared when you toggled "Button Shapes" on, then there must be buttons there you didn't know about.
(I would have put this in a comment, but I don't have that privilege as of yet.)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论