发布网友 发布时间:2022-04-24 18:03
共1个回答
热心网友 时间:2022-04-08 08:02
(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; }