2
在我viewDidLoad中我設置如何在加載新視圖時禁用UISwipeGestureRecognizer?
UISwipeGestureRecognizer *swipeRecognizerU = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeUpDetected:)]; swipeRecognizerU.direction = UISwipeGestureRecognizerDirectionUp; [self.view addGestureRecognizer:swipeRecognizerU];
,當我通過彈出加載一個新的觀點,我需要禁用手勢
// show popup view
-(IBAction)showPopup:(id)sender
{
MJDetailViewController *detailViewController = [[MJDetailViewController alloc] initWithNibName:@"MJDetailViewController" bundle:nil];
[self presentPopupViewController:detailViewController animationType:MJPopupViewAnimationSlideBottomBottom];
}
彈出視圖駁回後,我需要設置滑動手勢回來。
// hide popup view
-(IBAction)hidePopup:(id)sender
{
[self dismissPopupViewControllerWithanimationType:MJPopupViewAnimationSlideBottomBottom];
}
這可怎麼辦?