- (UIViewController *)findViewController:(UIView *)sourceView { id target=sourceView; while (target) { target = ((UIResponder *)target).nextResponder; if ([target isKindOfClass:[UIViewController class]]) { break; } } return target; }
时间: 2024-10-05 08:53:08