简体   繁体   中英

largeTitleDisplayMode doesn't work properly?

I added the UINavigationBar with a large title in it. After that, I added a UITableView to this UIViewController . I gave the large title content mode to .always . But when I scroll the UITableView it hides and showed in the top of the UINavigationBar`

navigationController?.navigationBar.prefersLargeTitles = true
self.navigationItem.largeTitleDisplayMode = .always

If you want to keep your large title while scrolling your UITableView , then add a UIView on top of your UITableView , like:

在此处输入图片说明

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