iOS 11中的导航标题视图问题 [英] Navigation Title View Issue in iOS 11
问题描述
我在iOS 11中遇到导航栏项目的问题,如下图所示,两个栏的按钮也没有执行任何按钮动作.
I am facing an issue on Navigation bar items in iOS 11 as below screen shot and the two bar button also not executing any button actions.
它在具有相同自动布局和大小的iOS 10.x.x及更低版本上完美运行. 以下屏幕截图显示了如何实现自定义导航栏IB. .
It is working perfectly on iOS 10.x.x and below with same auto layouts and size. Following screenshot is showing how custom Navigation bar IB implemented. .
我也尝试了以下代码.
if (@available(iOS 11.0, *)) {
[[self navigationController] navigationBar].prefersLargeTitles = NO;
[[self navigationController] navigationItem].largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
}
..但无济于事.请建议我这里的问题是什么以及如何解决(任何自动布局问题?).
..but not helping. Please suggests me what's the issue here and how to fix (any autolayout issues ?).
推荐答案
或者,您可以直接在右侧/标题栏"项中自定义,如以下Gif所示:
alternatively you can customize in Right/Title Bar Items directly as in the following Gifs:
1-
2-
这样,您可以连接按钮并正常接收操作.
This way you can connect the buttons and receive actions normally.
注意:先看gif,然后看2.
Note: see gif number 1 then number 2.
这篇关于iOS 11中的导航标题视图问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!