博客> UIView 中点击跳转页面
UIView 中点击跳转页面
2017-07-21 05:26 评论:0 阅读:230 wangwei1
ios UIView 中点击跳转页面

首先拿到view的当前控制器,若有(再拿到其导航栏控制器),即可

  • (UIViewController )viewController { for (UIView next = [self superview]; next; next = next.superview) { UIResponder nextResponder = [next nextResponder]; if ([nextResponder isKindOfClass:[UIViewController class]]) { return (UIViewController )nextResponder; } } return nil; }

然后 [[self viewController].navigationController popViewControllerAnimated:YES];

收藏
1
sina weixin mail 回到顶部