Post

Replies

Boosts

Views

Activity

Comment on SwiftUI MapKit Map - Selecting Points of Interest
I was finally able to get it to work in the following case: @State private var selectedItem: MKMapItem? @State private var selected: Feature? Map(position: $position, selection: $selectedFeature) { } .mapFeatureSelectionDisabled { _ in false } .mapFeatureSelectionContent { item in Marker(item.title ?? "", coordinate: item.coordinate) } I had previously passed selectedItem to the selection parameter. Is it possible to allow selection of MKMapItems and MapFeatures?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Nov ’24
Comment on Question about .presentationDetents and interactiveDismissDisabled modifiers
The .presentationBackgroundInteraction modifier does provide the functionality I was looking for, although unlike the documentation example. .presentationDetents([.height(120), .medium, .large]) .presentationBackgroundInteraction(.enabled(upThrough: .height(120))) I found this worked for my scenario: presentationBackgroundInteraction(.enabled) Thanks for following up!
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24