0
我似乎無法推動這個視圖控制器,我必須做一些錯誤的。代碼視圖控制器不會推
- (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];
}
我在做什麼錯?
你有一個navigationController?如果加上'的NSLog(@ 「%@」,self.navigationController);''在什麼pushToStart'你在控制檯中看到什麼? – deanWombourne 2012-08-13 19:00:10
'initWithNibName:束:' – Desdenova 2012-08-13 19:05:22
@deanWombourne(空)。我該如何設置一個? – 2012-08-13 19:06:52