主要代码:
// 获取该视图层最下边的VC.
id object = [self nextResponder];
while (![object isKindOfClass:[UIViewController class]] &&
object != nil) {
object = [object nextResponder];
}
UIViewController *vc = (UIViewController*)object;
主要代码:
// 获取该视图层最下边的VC.
id object = [self nextResponder];
while (![object isKindOfClass:[UIViewController class]] &&
object != nil) {
object = [object nextResponder];
}
UIViewController *vc = (UIViewController*)object;
本文标题:通过响应链找VC对象.
本文链接:https://www.haomeiwen.com/subject/vmtflttx.html
网友评论