简体   繁体   中英

Navigation bar issue in iOS11

I was working perfectly with navigation bars iOS 10 and below previously. But now when moving to the iOS 11, It's bit weird with the navigation bar. The entire navigation bar is going up with all the navigation items. Here I've attached a screenshot of the current behavior.

在此处输入图片说明

Is this relate to constraints? And I don't need to user large titles in my application. As I think this is a matter with large titles. I've added the following code, in order to disable the large titles.

if (@available(iOS 11.0, *)) {
    [[self navigationController] navigationBar].prefersLargeTitles = NO;
    [[self navigationController] navigationItem].largeTitleDisplayMode = UINavigationItemLargeTitleDisplayModeNever;
}

How may I fix this issue?

Check whether you have set custom frame on navigation bar. If you have, please remove them and check.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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