Post

Replies

Boosts

Views

Activity

Reply to How can I pass Content into a function that will return a swiftUI Container view?
Try to use AnyView() this way: struct ContentView: View {   var body: some View {     self.myStack(content: AnyView(Text("hello")))   }   func myStack(content: AnyView) -> some View {     ZStack{       if false {         HStack(alignment: .center, spacing: 0) {           content         }       } else {         VStack(alignment: .center, spacing: 0) {           content         }       }     }   } }
Jun ’20
Reply to Strange behavior of NavigationView() after rotate to landscape mode on iPhone 8
This forum does not accept my reply with a link to a screenshot. I see that the whole navigation view and inner Hello world text using half of a screen on landscape mode instead of the whole screen. But after next rotate the issue disappears and everything looks good as expected. Unfortunately I don't have a real device where I can reproduce that issue. Everything looks good on latest devices. Also this issue does not appear if you remove .navigationBarItems() from the code.
Jun ’20