У меня есть распознающий знак жесты, добавленный в mapView. Мой MapView имеет аннотации, и когда я нажимаю на аннотацию, вызывается только dismissCollectionView
. Метод DidSelectAnnotation не вызван. Как остановить вызов метода pushgesture (увольнение) при нажатии на аннотацию? Любая помощь будет оценена.DidSelect Аннотации, получаемые под названием
self.m_mapView = [[MKMapView alloc] init];
self.m_mapView.frame = CGRectMake(0, 0, 320, 568);
self.m_mapView.delegate = self;
// MapHeight = self.m_mapView.frameHeight;
m_locationManager = [[CLLocationManager alloc] init];
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
[m_locationManager requestWhenInUseAuthorization];
[m_locationManager requestAlwaysAuthorization];
}
self.m_mapView.mapType = MKMapTypeStandard;
[self.m_mapView setUserTrackingMode:MKUserTrackingModeFollow];
[self.m_bgImageView addSubview:self.m_mapView];
m_locationManager.desiredAccuracy = kCLLocationAccuracyBest;
m_locationManager.delegate = self;
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissCollectionView)];
tapGesture.numberOfTouchesRequired = 1;
tapGesture.cancelsTouchesInView = NO;
[self.m_mapView addGestureRecognizer:tapGesture];