UINavigationContoller interactivePopGestureRecognizer inactive when navigation bar is hidden

后端 未结 5 681
长发绾君心
长发绾君心 2021-02-01 07:04

I have a view controller which is nested within a UINavigationController.

I have implemented the iOS 7 interactivePopGestureRecognizer to enable the user to

5条回答
  •  再見小時候
    2021-02-01 07:27

    This doesn't seem to work for me. I followed Keithl's blog post. Neither did that work.

    I ultimately settled with UISwipeGestureRecognizer. It seems to do what it says.

    UISwipeGestureRecognizer *gestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(backButtonPressed:)];
    [gestureRecognizer setDirection:(UISwipeGestureRecognizerDirectionRight)];
    [self.navigationController.view addGestureRecognizer:gestureRecognizer];
    

提交回复
热议问题