- (UIViewController *)viewControllerSupportView:(UIView *)view {
for (UIView* next = [view superview]; next; next = next.superview) {
UIResponder *nextResponder = [next nextResponder];
if ([nextResponder isKindOfClass:[UIViewController class]]) {
return (UIViewController *)nextResponder;
}
}
return nil;
}
如何通过一个view找到viewcontroller
最新推荐文章于 2024-03-28 10:53:58 发布