Post

Replies

Boosts

Views

Activity

Reply to ActionSheet & StackNavigationViewStyle constraint iPad bug
Thought this might be fixed by 14 but it's not, this is my source code: import SwiftUI struct ContentView: View {   var body: some View {     NavigationView {       VStack {         Text("Hello Things")           .navigationModifier()       }     }   } } struct ContentView_Previews: PreviewProvider {   static var previews: some View {     ContentView()   } } extension View {   func navigationModifier() -> some View {     self.modifier(NavigationViewModifier())   } } struct NavigationViewModifier: ViewModifier {   @State private var showingMenu: Bool = false       func body(content: Content) -> some View {     content       .navigationBarItems(trailing:                   Button(action: showMenu) {                     Text("Hello Menu")                   }                   .actionSheet(isPresented: $showingMenu, content: {                     ActionSheet(title: Text("Menu"), message: nil, buttons: [.default(Text("Click Me"), action: menuAction), .cancel()])                   })       )   }       func showMenu() {     self.showingMenu = true   }       func menuAction() {} } Once you open the left panel and click the navigation button the actionsheet shows up on the right of the view.
Sep ’20