LeoNatan / LNPopupController

A framework for presenting view controllers as popups of other view controllers, much like the Apple Music and Podcasts apps.
MIT License
3.04k stars 342 forks source link

ContentView left inset of -8 #551

Closed WouterVermeijNPO closed 11 months ago

WouterVermeijNPO commented 11 months ago

Describe the Bug The _LNPopupBarContentView leading inset is suddenly inset out of view.

Our project was on version 2.15.4 and i updated to 2.15.24 and the issue arose. I pinpointed it in the 2.15.22 release where a left inset is set on the contentFrame of -8.

I think this is the line affecting us

https://github.com/LeoNatan/LNPopupController/compare/2.15.21...2.15.22#diff-4f6881108fb36c4b054ad3dba6575391825d8cf796acfb1b62e2482ab309364dR554

I updated to the latest version, 2.16.4, to check if it was fixed there, but it wasn't.

Expected Behavior I don't expect the view to change insets on an update 😛

Screenshots Screenshot 2023-11-24 at 16 01 03

Screenshot 2023-11-24 at 16 03 09

Additional Context I really wonder why you decided to add this inset. Next to that, what would a proper solution be for our project?

LeoNatan commented 11 months ago

Hello, Is this a custom popup bar? I'll try to fix the issue as soon as possible.

While this is a bug, the reason why this was needed is for other layouts, and I guess I didn't properly gate it to those situations.

WouterVermeijNPO commented 11 months ago

Hey, thanks for the quick reply!

We are indeed using a customBarViewController

LeoNatan commented 11 months ago

Just an aside, but any reason you are not using the standard prominent style? You should be able to achieve your current look. You can customize font, colors, etc.

WouterVermeijNPO commented 11 months ago

Not that i know of, i inherited the project unfortunately. But it might be worth looking into now that you mention it.

LeoNatan commented 11 months ago

Please try with the 2.16.5 release.

LeoNatan commented 11 months ago

I do suggest using the standard layout styles as much as possible.

https://github.com/LeoNatan/LNPopupController#bar-style

In addition to getting a lot of behavior "for free", they are also the most maintained, and are very customizable, so you can achieve a lot with them.

WouterVermeijNPO commented 11 months ago

Amazing man, thanks a lot for the quick response and fix!

LeoNatan commented 11 months ago

Cheers! Happy coding!