通过响应链找VC对象.
2016-03-13 本文已影响12人
BiniOSdeveloper
主要代码:
// 获取该视图层最下边的VC.
id object = [self nextResponder];
while (![object isKindOfClass:[UIViewController class]] &&
object != nil) {
object = [object nextResponder];
}
UIViewController *vc = (UIViewController*)object;