gpt4 book ai didi

iphone - 如何在 iPhone 应用程序中拥有 2 个 leftBarButtonItems,并让 1 个成为默认后退按钮?

转载 作者:行者123 更新时间:2023-12-03 18:41:15 26 4
gpt4 key购买 nike

我想要 2 个 leftBarButtonItems,但保留其中一项作为导航 Controller 的默认后退按钮。我已经设置:

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

其中 archives 是我创建的 UIBarButtonItem,但不知道数组中包含的默认后退按钮是什么。有什么建议吗?

最佳答案

确保将 leftItemsSupplementBackButton 设置为 YES。

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

关于iphone - 如何在 iPhone 应用程序中拥有 2 个 leftBarButtonItems,并让 1 个成为默认后退按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10180155/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com