-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When opening app in landscape, wrong number of columns displayed #18
Comments
Cannot reproduce. Are you able to provide more details? |
The problem can be reproduced as follows:
struct DataPoint: Identifiable{
var id = UUID()
var name:String
}
struct ContentView: View {
var data:Array<DataPoint> = [DataPoint(name: "A"), DataPoint(name: "B"), DataPoint(name: "C"), DataPoint(name: "D"), DataPoint(name: "E"), DataPoint(name: "F"), DataPoint(name: "G"), DataPoint(name: "H"), DataPoint(name: "J"), DataPoint(name: "K"), DataPoint(name: "L"), DataPoint(name: "M")]
var body: some View {
NavigationView{
NavigationLink(destination:
QGrid(data,
columns: 1,
columnsInLandscape: 4,
content: { data in
VStack{
Text(data.name)
}
})
){
Text("navigate to QGrid")
}
}
}
}
✔️ This shows the correct amount of columns. |
The wrong number of columns are displayed, when opening the app directly in landscape. The initial device orientation is not detected.
The text was updated successfully, but these errors were encountered: