現在我有四個UITableViewControllers
。如何讓UINavigationController在按下UIViewController時使用翻轉動畫
- 甲
- B1,B2
- Ç
我需要以下效果:
- 上形成選擇一個項目可以推到B1
- 輕按rightBarButtonItem在B1上可以水平翻轉到B2
- 輕按B2的rightBarButtonItem可以水平翻轉到B1
- 選擇上B1或B2中的項目可以推到C
- 可以彈出至A在B1或B2
所有視圖(A,B1,B2和C)應該有NavigationBar。現在
我之間A,B1,B2導航,C.我也可以用下面的代碼翻轉到B2:
//self is B1
- (IBAction)b2ButtonPressed
{
B2ViewController* B2 = [[B2ViewController alloc] init];
B2.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:B2 animated:YES];
}
但在B2的導航欄缺失。
我在我的iPod touch上有一個應用程序具有此功能。我怎樣才能做到這一點?
我需要B2上的後退按鈕,所以我可以回到A,我試過你的代碼,我只能得到NavigationBar上沒有任何按鈕 –
只有-pushViewController:UINavigationController可以爲你創建一個後退按鈕,如果你目前的模態視圖控制器,你需要自己設置按鈕。 – cxa
我試圖設置'self.navigationItem.backBarButtonItem',但它不顯示。然後我嘗試了'leftBarButtonItem',但是看起來我不能讓它看起來像一個後退按鈕,即在按鈕的左側有箭頭。任何其他想法? –