Lnpopupcontroller: Initial full-screen view slides behind status bar; interaction with view element "corrects" the view

Created on 26 Aug 2017  路  8Comments  路  Source: LeoNatan/LNPopupController

I have a weird problem that seems to exist no matter what sort of view I have wrapped in the LNPopupController.

When I initiate the popupbar, it displays properly and as expected. When I tap the bar, it slides up to fill the entire screen; again, as expected. BUT - it seems to slide up too far, behind the status bar. (See pre-tap image). You can see some text behind the Carrier and timestamp in the status bar. Now, when I select an element on the view itself (play/pause button, prev/next, or select another song in the tableview), the view "corrects" and shifts down to the proper alignment. The bottom view (player controls, title/artist) remains in the same coordinates, and everything else stays to the same scale. It just appears that the top area "corrects" and shifts down. I've attached (post-tap) to show the corrected positioning.

I can't for the life of me figure out 1. Why it's misaligning in the first place, and 2. How to reliably correct it. I have implemented a total hack which basically programmatically calls the play/pause button twice, to pause and then resume the audio when the view is expanded to the top. Sometimes this works and aligns the view, sometimes it doesn't. This inconsistency has caused me to reach out and create an issue on this Git site.

Thank you so much for any insight!

PRE: pre-tap

POST: post-tap

bug

All 8 comments

Hello,

This is a strange issue. How do you layout your presented view? Using auto layout?

Please create a demo project which reproduces this and attach here.

Ping.

Hi @LeoNatan,

I have encountered the same problem. This is very easy to reproduce - add a subview to a Popup content controller's view using auto layout with the top edge of the subview attached to the Top Layout Guide. However, it fixes itself after rotation.

screen shot 2017-09-08 at 10 01 46 am

Modified LNPopupController-2.3.2 sample

Thanks, this will help me debug it.

This is a tough cookie to crack on iOS 11 due to the internal changes of the system. Working on it.

Apologies for not responding on this sooner; shortly after posting the issue, my wife and I took a trip to iceland. We're still here, but greatly appreciate you looking into things! Thankful that another user has run into it as well ;)

I am closing this issue. This will be solved with #183.

Fixed. Please test 2.5.0 release and let me know.

Was this page helpful?
0 / 5 - 0 ratings