0
我想知道如何從UIAlertView開始一個新的ViewController。對我來說,你似乎無法用圖形方式連接viewControllers的方式,你可以用一個按鈕。從UIAlertView開始一個新的ViewController
我已在UIAlertView中成立了我的第一次的viewController像這樣:
UIAlertView *messageAlert = [[UIAlertView alloc]
initWithTitle:@"Start New View Controller?" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"Yes",nil];
然後我處理這樣的不同的按鈕點擊這樣:
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex: (NSInteger)buttonIndex{
if (buttonIndex == 0){
NSLog(@"Cancel");
}
if (buttonIndex == 1){
NSLog(@"Yes");
}
}
我將如何啓動第二的viewController(比方說viewContoller2)與這個alertbox?
請注意,自從4月1日以來,我一直保留「viewContoller2」及其顯而易見的錯字。 :) – Rikkles 2015-04-02 00:03:49
更像第一次世界無政府狀態! – 2015-04-02 00:24:23