百度出来的,鄙视我吧
- (UIViewController *)findViewController:(UIView *)sourceView
{
id target=sourceView;
while(target) {
target= ((UIResponder *)target).nextResponder;
if([target isKindOfClass:[UIViewControllerclass]]) {
break;
}
}
return target;
}
百度出来的,鄙视我吧
- (UIViewController *)findViewController:(UIView *)sourceView
{
id target=sourceView;
while(target) {
target= ((UIResponder *)target).nextResponder;
if([target isKindOfClass:[UIViewControllerclass]]) {
break;
}
}
return target;
}