Though application is universal but ipad screen is blank. I have added checked both iphone and ipad. When running app in iphone works fine, but in ipad is not showing anything.
struct UserListView: View {
var userName:String
@State var searchString:String = ""
var body: some View {
VStack {
SearchBar(text: $searchString)
.padding()
.frame(height:44)
.foregroundColor(Color.white)
.background(Color.gray)
List(userList) { user in
NavigationLink(destination:UserDetailView(userObj:user)) {
UserListRow(userObj: user)
}.navigationBarTitle("User Detail")
}
}
}
}
Along with the introduction of tables on iPad, SwiftUI now supports sections in tables on iPad and the Mac.
iPhone screen stuck black with a white Apple logo? If the iPhone screen goes black but shows a white Apple logo before returning to normal, this indicates the device is rebooting. If that happens out of the blue, it usually suggests the iPhone is crashing or an app is crashing which causes the device reboot.
Add this modifier to the NavigationView it should work:
NavigationView {
}.navigationViewStyle(StackNavigationViewStyle())
The screen is probably blank because nothing has been selected and there is nothing in the details view so you're seeing a blank details view. If you swipe in from the left side of the screen, the hidden master view will slide over and you can select an item to view the details in the main view.
I hope this is a SwiftUI bug (at at least a missing features) because I don't think anyone wants split views to work like this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With