[英]Issue with NavigationBarTitle when scrolling List with TextFields inside of it
在嘗試創建可重現的示例時,我能夠解決自己的問題。
該錯誤是我將背景顏色應用於包含List
的父Group
的結果。 刪除背景顏色解決了我的問題!
struct ChecklistView: View {
var body: some View {
Group {
if empty {
EmptyView()
} else {
ListView()
}
}
.background(Color(.tertiarySystemBackground).edgesIgnoringSafeArea(.all)) // removing this line fixed my issue
.navigationBarTitle("My title")
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.