1
HI我開發在導航欄在頂部使用此代碼隱藏的應用程序:UINavigation後退按鈕
- (void) viewWillAppear:(BOOL)animated
{
[self.navigationController setNavigationBarHidden:YES animated:animated];
[super viewWillAppear:animated];
}
這意味着,一旦此頁面上有沒有後退按鈕按回去,這意味着我必須創建一個IBAction,使視圖變回前一個視圖。
我試圖創建IBAction爲我用,以進入下一個頁面像這樣的:
-(IBAction)switchToGettingHere:(id)sender
{
if(self.gettingHereViewController == nil)
{
GettingHereViewController *gettingHere = [[GettingHereViewController alloc]
initWithNibName:@"GettingHereView" bundle:[NSBundle mainBundle]];
self.gettingHereViewController = gettingHere;
[gettingHere release];
}
[self.navigationController pushViewController:self.gettingHereViewController animated:YES];
}
,但沒有奏效。任何想法如何使一個按鈕執行相同的標準後退按鈕?
超級作品很棒... – 2010-07-30 00:27:19
matthew:請標記這個答案通過複選框 – iwasrobbed 2010-07-30 00:28:58