J'ai mis en place un UITapGestureRecognizer sur viewDidLoad de mon contrôleur de vue, mais de toute façon il déclenche la méthode de sélection deux fois pour un seul clic.UIGestureRecognizer tirant deux fois?
UITapGestureRecognizer *g = [[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(openInMapsApp:)] autorelease];
[self.mapView addGestureRecognizer:g];
Ma méthode:
-(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];
}
Est-il possible que cela se produise seulement un jour? –