问题
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.
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.
.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 ?).
回答1:
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.
Note: see gif number 1 then number 2.
来源:https://stackoverflow.com/questions/46752416/navigation-title-view-issue-in-ios-11