簡體   English   中英

如何在iPhone應用程序中擁有2個leftBarButtonItems,並且1是默認的后退按鈕?

[英]How can I have 2 leftBarButtonItems in iPhone app, and 1 be the default back button?

我想要2個leftBarButtonItems,但保留其中一個項目作為導航控制器的默認后退按鈕。 我已經建立:

self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:archives, ???, nil];

其中archives是我創建的UIBarButtonItem,但不知道默認的后退按鈕要包含在數組中。 有什么建議么?

確保將leftItemsSupplementBackButton設置為YES。

self.navigationItem.leftItemsSupplementBackButton = YES;
self.navigationItem.leftBarButtonItems = [NSArray arrayWithObjects:archives, nil];

暫無
暫無

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

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