iPhone - 将视图控制器推到堆栈上隐藏导航栏中的栏按钮项目

发布于 2024-09-15 16:49:24 字数 90 浏览 3 评论 0原文

我有一个导航栏,标题的左侧和右侧都有栏按钮项目。当我将新的视图控制器推入堆栈时,左侧的栏按钮被“后退”按钮替换,右侧的栏按钮完全消失。如何覆盖此行为并防止栏按钮消失?

I have a nav bar with bar button items on the left and right of the title. When I push a new view controller onto the stack, the bar buttons on the left get replaced by a "back" button, and the bar buttons on the right disappear altogether. How can you override this behavior and keep the bar buttons from going away?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

弱骨蛰伏 2024-09-22 16:49:24

栏按钮连接到当前显示的视图控制器。因此,如果您希望在按下另一个视图控制器时显示这些按钮,那么您必须以与第一个视图控制器相同的方式设置它们。

The bar buttons are connected to the view controller that is currently shown. So if you want those buttons to appear when another view controller is pushed then you will have to set them up in the same manner as you did for the first one.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文