我似乎无法推动这个视图控制器,我一定做错了什么。代码
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
button = [UIButton buttonWithType:UIButtonTypeCustom];
[button addTarget:self action:@selector(pushToStart) forControlEvents:UIControlEventTouchUpInside];
}
- (void)pushToStart
{
ViewController *view = [[ViewController alloc]init];
[[self navigationController] pushViewController:view animated:YES];
}
我究竟做错了什么?