1
- (UIViewController *)viewController
{
//獲取當前view的superView對應(yīng)的控制器
UIResponder *next = [self nextResponder];
do {
if ([next isKindOfClass:[UIViewController class]]) {
return (UIViewController *)next;
}
next = [next nextResponder];
} while (next != nil);
return nil;
}
界面跳轉(zhuǎn)
[[self viewController].navigationController pushViewController:vc animated:YES];
[(UINavigationController *)[self getCurrentVC] pushViewController:vc animated:YES];//強轉(zhuǎn)阅虫,把當前控制器對象強轉(zhuǎn)成導航欄對象