View中实现navigationController push

- (UIViewController *)viewController {

for (UIView* next = [self superview]; next; next = next.superview) {

UIResponder *nextResponder = [next nextResponder];

if ([nextResponder isKindOfClass:[UIViewController class]]) {

return (UIViewController *)nextResponder;

}

}

return nil;

}

[[self viewController].navigationController pushViewController:description animated:YES];

你可能感兴趣的:(View中实现navigationController push)