我注意到在我的应用程序中 .edgesIgnoringSafeArea 在 iOS 13.3 和 iOS 13.4 中呈现不同的视图。
在我的 ContentView 中,我应用了 .edgesIgnoringSafeArea(.top) 的修饰符。这在 13.4 之前的所有 iOS 13 版本中都能正确显示。现在在 13.4 的 GM 中,视图的顶部和底部被切断了。
这是我的内容视图
struct ContentView: View {
@EnvironmentObject var session: SessionStore
func getUser() {
session.listen()
}
var body: some View {
Group {
ZStack {
TabView {
ExploreView().tabItem {
Image(systemName: "house.fill")
Text("Explore")
}.tag(1)
FestivalsView().tabItem {
Image(systemName: "globe")
Text("Festivals")
}.tag(2)
ProfileView().tabItem {
Image(systemName: "person.crop.circle.fill")
Text("Profile")
}.tag(3)
}
.accentColor(Color("wdwPurple"))
.edgesIgnoringSafeArea(.top)
}
}.onAppear(perform: getUser)
}
}
Run Code Online (Sandbox Code Playgroud)
这是它的显示方式:
有任何想法吗?
| 归档时间: |
|
| 查看次数: |
821 次 |
| 最近记录: |