所有我首先顯示此圖片,以便我可以參考它。彈出並在標籤欄應用程序中推送視圖
基本上我想實現的是,你可以看到第一個已經選擇了選項卡,並正在顯示視圖。我有一個按鈕,其上有一個「 - , - 」,我想要做的是點擊該按鈕時,它從該選項卡彈出視圖,並推送另一個視圖。我能夠通過這樣來改變視圖:
FourthViewController *home = [[FourthViewController alloc] initWithNibName:@"FourthView" bundle:nil];
[self presentModalViewController:home animated:YES];
[home release];
但我失去的標籤向下探底:<如下面的例子將顯示:
我不知道哪方向頭,但我已經試過這和它的失敗:
UINavigationController *navController = self.navigationController;
// retain ourselves so that the controller will still exist once it's popped off
[[self retain] autorelease];
// Pop this controller and replace with another
[navController popViewControllerAnimated:NO];
[navController pushViewController:home animated:NO];
我也試過這樣:
FourthViewController *home = [[FourthViewController alloc] initWithNibName:@"FourthView" bundle:nil];
[self.navigationController pushViewController:home animated: YES];
[home release];
有人可以幫我嗎?
有沒有關於這個的任何教程?或者你能給我提供什麼? –
也許這個類似的例子將幫助http://stackoverflow.com/questions/5117721/multiple-view-states-in-interface-builder – meggar
沒有真正幫助很多。我遇到同樣的問題 –