2016-12-04 80 views
-1

雙導航欄圖像 雙導航欄目標C

好,我是從推觀點,即不支持SEGUE,編程使用的代碼:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil]; 
OtherUsersProfileViewController * vc=[storyboard instantiateViewControllerWithIdentifier:@"OtherUsersProfileViewController"]; 
vc.agent_ID = self.opponentID; 
vc.agent_Name = self.title; 
[self.navigationController pushViewController:vc animated:YES]; 

而且在OtherUsersProfile即時得到雙導航欄,它可能是什麼?

+0

你有沒有製作一個自定義的導航欄視圖是故事板? – Dalvik

+0

是的,我是...... –

+0

看到我的回答可能有幫助 – Dalvik

回答

1

Image您不需要在故事板中添加新導航。

你必須選擇實現這一目標:

第一種方法:使用默認導航欄

  1. 只是刪除默認後退按鈕並添加新的自定義導航按鈕。

    Hide Back Button

    Add Custom Image in Nav Bar

方式二:刪除默認的導航欄,並添加自定義導航欄通過故事板。

self.navigationController.navigationBar.hidden = YES; 
//And then your code will work fine.