简体   繁体   中英

App with Large Titles jittering on scroll

I know this is very vague, as I don't know what has caused this bug and it has seemingly popped up at random.

The problem is, when large titles are on, and there is scrollable content in the view, when I scroll down the large title becomes small, not only do I not like this behaviour, it's very jarring.

Here's a gif of the problem: https://gyazo.com/8cadef763afeb535ca991c5ba8d7b249

As you can see as I scroll, the cell moves faster than I am scrolling.

I know it's hard to see where the large title begins, it begins where I go back and forth with my mouse horizontally

I have tried:

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

Has anyone encountered this bug? How did you fix it?

Thanks

Ok guys I solved it.

Firstly, yes, this is expected behaviour (unfortunately), however if you do not want it there is a solution.

The reason this happens if the only thing on the page is a scrollable view. Therefore to counteract this, you can use a button, or label, with no text (hence invisible).

If you use a hidden label or button or anything that cannot be scrolled on, the big nav bar will stay there.

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