2012-05-13 37 views

回答

0

只需添加觀察員:

[button addTarget:self action:@selector(click:) forControlEvents:UIControlEventTouchUpInside]; 

然後顯然實現:

-(void)click:(id)sender{ 
[self presentModalViewController:[[UIViewController alloc] init] animated:YES]; 

}

+0

謝謝 - 哪個視圖控制器這是不是現在呢? – stewart715

+0

它將呈現作爲presentModalViewController參數的視圖控制器。我爲這個例子寫了[[UIViewController alloc] init]。 – andershqst

+0

你做到了嗎? – andershqst