ios 获取当前view的controller

 //获取viewcontroller

 - (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;

 }

ios 获取当前view的controller,布布扣,bubuko.com

ios 获取当前view的controller

上一篇:android-双击back退出应用


下一篇:Android 数据库升级解决方案