简体   繁体   English

iOS 11中的导航标题视图问题

[英]Navigation Title View Issue in 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 11中的导航栏项上遇到问题,如以下屏幕截图所示,两个栏按钮也未执行任何按钮动作。

It is working perfectly on iOS 10.xx and below with same auto layouts and size. 它在具有相同自动布局和大小的iOS 10.xx及更低版本上完美运行。 Following screenshot is showing how custom Navigation bar IB implemented. 以下屏幕截图显示了如何实现自定义导航栏IB。 .

I tried with following codes too.. 我也尝试了以下代码。

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 ?). 请建议我这里的问题是什么以及如何解决(任何自动布局问题?)。

alternatively you can customize in Right/Title Bar Items directly as in the following Gifs: 或者,您可以直接在“右/标题栏项目”中自定义,如以下Gif所示:

1- 1-

在此处输入图片说明

2- 2

在此处输入图片说明

This way you can connect the buttons and receive actions normally. 这样,您可以连接按钮并正常接收操作。

Note: see gif number 1 then number 2. 注意:请参阅gif数字1和数字2。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM