/**
* @author JackRen
*
* 创建一个视图控制器便于从view跳转到controller
*
* @return UIViewController
*/
-(UIViewController *)viewController {
for (UIView *next = [self superview]; next; next = next.superview) {
UIResponder *responder = [next nextResponder];
if ([responder isKindOfClass:[UIViewController class]]) {
return (UIViewController *)responder;
}
}
return nil;
}
View跳转到Controller先创建控制器
最新推荐文章于 2023-11-30 23:59:42 发布