- (UIViewController *)viewController {spa
for (UIView* next = [selfsuperview]; next; next = next.superview) {class
UIResponder *nextResponder = [next nextResponder];next
if ([nextResponder isKindOfClass:[UIViewControllerclass]])view
{vi
return (UIViewController *)nextResponder;return
}
}
returnnil;
}