Post

Replies

Boosts

Views

Activity

Reply to SwiftUI iOS 14 MapKit Annotation Tap Gesture (didSelect)
@OOPer thanks for responding. Unfortunately that also doesn't work. Map(         coordinateRegion: $viewMapModel.mapLocation,         interactionModes: .all,         showsUserLocation: true,         userTrackingMode: $userTrackingMode,         annotationItems: viewMapModel.annotations,         annotationContent: {           n in MapAnnotation(coordinate: n.location) {             Circle()             .fill(Color.green)             .frame(width: 44, height: 44)             .onTapGesture(count: 1, perform: {               print("IT WORKS")             })           }         }       ) Does not react to the tap. Also, can't attach a onTapGesture to the MapAnnotation [some view], compiler says no.
Sep ’20