Post

Replies

Boosts

Views

Activity

Reply to .presentationPlacement(.leading) does not work!
One more thing... Here's the example that gave me the issue extension View { @ViewBuilder func leadingPresentationIfAvailable() -> some View { if #available(iOS 27.0, *) { self.presentationPlacement(.leading) } else { self } } } import MapKit struct DriverTrackerView: View { @State private var isSheetPresented = true var body: some View { ZStack { Map() } .sheet(isPresented: $isSheetPresented) { VStack { EmptyView() .padding() } .presentationDetents([.fraction(0.1), .medium, .large]) .presentationDragIndicator(.visible) .presentationBackgroundInteraction(.enabled) .interactiveDismissDisabled() .presentationSizing(.fitted) .leadingPresentationIfAvailable() } } } #Preview { DriverTrackerView() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’26
Reply to .presentationPlacement(.leading) does not work!
One more thing... Here's the example that gave me the issue extension View { @ViewBuilder func leadingPresentationIfAvailable() -> some View { if #available(iOS 27.0, *) { self.presentationPlacement(.leading) } else { self } } } import MapKit struct DriverTrackerView: View { @State private var isSheetPresented = true var body: some View { ZStack { Map() } .sheet(isPresented: $isSheetPresented) { VStack { EmptyView() .padding() } .presentationDetents([.fraction(0.1), .medium, .large]) .presentationDragIndicator(.visible) .presentationBackgroundInteraction(.enabled) .interactiveDismissDisabled() .presentationSizing(.fitted) .leadingPresentationIfAvailable() } } } #Preview { DriverTrackerView() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’26