Thursday, December 5, 2013

MKMapView incident response touchesbegan


I wrote a iphone program, to achieve click MKMapView pop another view, do not gesture recognition, how to capture MKMapView's touchesBegan events. I was on UIview added a MKMapView, run the program, click MKMapView time, touchesBegan not called ah, changed how to solve it
Reply:
 
/ / 1, add us to capture gestures in viewDidLoad in:

UITapGestureRecognizer * mTap = [[UITapGestureRecognizer alloc] initWithTarget: self action: @ selector (tapPress :)];
[_mapView AddGestureRecognizer: mTap];
[MTap release];
- (Void) tapPress: (UIGestureRecognizer *) gestureRecognizer {

/ / Use Zuosha own writing here
}


No comments:

Post a Comment