簡體   English   中英

向導航欄添加后退按鈕不起作用

[英]Adding Back Button to Navigation Bar Doesn't Work

我已經在我的視圖控制器中添加了導航欄,並在“屬性”檢查器下的“后退按鈕”選項中添加了文本,但是在運行應用程序時卻沒有后退按鈕。

設置圖片: http : //imgur.com/QTN0sPt

故事板的圖片: http//imgur.com/n4pmgeb

我運行時的應用程序圖片: http : //imgur.com/fidq2dF

有什么建議么?

您的View Controller應該嵌入在導航Controller中。 通過這樣做,默認情況下在視圖控制器中添加了后退按鈕。

將您的controller嵌入UINavigationController ,然后執行操作Push or pop or etc

 Controller * objController = [[Controller alloc] initWithNibName:@“controllernib” bundle:nil];
UINavigationController * navController = [[UINavigationController alloc] initWithRootViewController: objController];

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM