发布网友 发布时间:2022-04-27 04:54
共1个回答
热心网友 时间:2022-06-26 13:39
//获取view的controller - (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; } //点击提交按钮 -(void)buttonPress{ ElectronFrom *electronForm=[[ElectronFrom alloc]init]; [[self viewController].navigationController pushViewController:electronForm animated:YES]; [electronForm release]; }