Reputation: 1954
I've got splite-view application and of course there is a popover controller in the vertical DetailView, how can I hide with double-tap? thanks
Upvotes: 0
Views: 462
Reputation: 3592
You have to add a doubleTap gesture recognizer and call dismissPopoverAnimated:
First declare a gesture recognizer and configure it to your view:
UITapGestureRecognizer * doubleTapGesture = [[UIGestureRecognizer alloc] initWithTarget:self action:@selector(doubleTapCallback:)];
doubleTapGesture.numberOfTapsRequired = 2;
[yourView addGestureRecognizer:doubleTapGesture];
[doubleTapGesture release];
Then implement the callback:
- (IBAction) doubleTapCallback: (UITapGestureRecognizer *) sender
{
[yourPopOverController dismissPopoverAnimated:YES]
}
Upvotes: 2