Using XCode 12 Beta, setting the background on the new SwiftUI TextEditor() view doesn't seem to be working. Is this by design?
TextEditor(text: $text)
.background(Color.red)
.foregroundColor(Color.black)
Post
Replies
Boosts
Views
Activity
Using XCode 12 Beta and iOS 14, I'm unable to hide the status bar when a NavigationView is nested inside a TabView. Consider:
TabView(selection: $selection) {
NavigationView {
ViewOne()
.navigationBarTitle("View One")
}
.tabItem {
Label("View One", systemImage: "doc.plaintext")
}
.tag(TabItem.viewOne)
.statusBar(hidden: true)
}
The above code only hides the status bar if you remove the parent TabView. I also tried to hide the status bar onAppear:
TabView(selection: $selection) {
NavigationView {
ViewOne()
.navigationBarTitle("View One")
.onAppear {
isStatusBarHidden = true
}
.onDisappear {
isStatusBarHidden = false
}
}
.tabItem {
Label("View One", systemImage: "doc.plaintext")
}
.tag(TabItem.viewOne)
.statusBar(hidden: isStatusBarHidden)
}
This also doesn't work. I've also tried hiding the status bar directly on the TabView. Any suggestions?