推視圖控制器在我的窗口基本應用程序,我需要導航從我的appdelegate到editorview當我在我的tabbarcontroller的第二項點擊它會顯示帶有三個選項的actionsheet。無法從的appdelegate
actionsheet works fine,it will show an actionheet if you choose the second item from tabbar。
但我需要推到另一種觀點認爲,當我選擇我的動作片
的第一選擇,我宣佈我的actionsheet中的appdelegate。
我已經實現actionsheetdelegate
- (無效)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger的)buttonIndex
該方法trigerred並且它可以顯示如果我做nslog。但不能推到我想要的視圖 - 控制.. 這裏是我的代碼:
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (buttonIndex == 0)
{
DetailViewController *v2 = [[DetailViewController alloc] init];
NSLog(@"PUSH TRIGER");
[self.window.rootViewController.navigationController pushViewController:v2 animated:YES];
}
}
注:我已經嵌入我tabbarcontroller和導航控制器在我的故事板
但我已經嵌入了我的tabbarcontroller和導航在故事板,這就是爲什麼我沒有再次聲明我的tabbarcontroller – Zoro 2013-02-22 08:12:32
看到我的編輯故事板 – 2013-02-22 08:18:06
我認爲你是對的,也許我的故事板設計是錯誤的,我已經把segue標識符和視圖控制器標識符a nd它仍然沒有工作,你可以請檢查我的故事板,我想推到視圖控制器的紅色圓圈這裏的圖片:http://i46.tinypic.com/5jz704.png – Zoro 2013-02-22 10:23:27