我有两个视图控制器:firstViewController和secondViewController。在firstViewController上我有一个按钮。当我触摸按钮时如何更改视图?
答案 0 :(得分:7)
- (IBAction)change {
secondViewController* viewController = [[secondViewController alloc] init];
[self.navigationController pushViewController:viewController animated:YES];
[viewController release];
}