मैंने अपने व्यू कंट्रोलर के viewDidLoad पर एक UITapGestureRecognizer स्थापित किया है लेकिन किसी भी तरह से यह एक टैप के लिए चयनकर्ता विधि को दो बार निकाल देता है।UIGestureRecognizer दो बार फायरिंग?
UITapGestureRecognizer *g = [[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(openInMapsApp:)] autorelease];
[self.mapView addGestureRecognizer:g];
मेरे विधि:
-(void)openInMapsApp:(UIGestureRecognizer*)g {
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@""
message:@"This will open this location in the Maps application. Continue?"
delegate:self
cancelButtonTitle:@"Cancel"
otherButtonTitles:@"OK",nil];
[alertView show];
[alertView release];
}
क्या यह संभव है कि यह केवल कुछ समय होगा? –