Hi, I'm trying to do basic app with fixed Navigation View on iPad. Doesn't work. What am I doing wrong?
import SwiftUI
struct CollectionView: View {
var body: some View {
if #available(iOS 15.0, *) {
NavigationView {
Text("Hello")
.navigationTitle("Hello")
}
.navigationViewStyle(.columns)
.padding()
} else {
// Fallback on earlier versions
}
}
}
struct CollectionView_Previews: PreviewProvider {
static var previews: some View {
CollectionView()
}
}