andreamazz / AMScrollingNavbar

Scrollable UINavigationBar that follows the scrolling of a UIScrollView
MIT License
6.05k stars 634 forks source link

Weird behaviour after accessing bottomLayoutGuide with iOS14 #397

Closed closure11 closed 3 years ago

closure11 commented 3 years ago

@Describe the bug

Once I access ScrollingNavigationController's bottomLayoutGuide.length (even just print it), the awsome scrolling behaviour will be broken. I know bottomLayoutGuide was deprecated, but another library I used called this property.

To Reproduce Steps to reproduce the behavior:

  1. Clone the source code, open demo project.
  2. In any child view controller , call navigationController?.bottomLayoutGuide.length

Expected behavior Scrolling behaviour goes well as usual.

Screenshots Here are the reproduction codes

Sep-24-2020 15-01-09

andreamazz commented 3 years ago

Hey @wmadao11 yikes! UIKit is fighting back. I'm not sure how to fix this to be honest, probably one way would be to override bottomLayoutGuide in the controller, but it's not something that I'd put in the codebase for everyone. What's the other library?

closure11 commented 3 years ago

@andreamazz Thanks for your quick reply. Yes it seems not directly correspond as a bug on your end but a UIKit error. However, since I am actually an iOS beginner so I can't find out more info about this :(

What's the other library?

It's PanModal. As I said, if I changed to use safeAreaInsets.bottom, this fixed. So I committed a PR for them to fix my project temporarily.

andreamazz commented 3 years ago

Great 👍 Closing this for the time being, feel free to reopen if needed.