calimarkus / JDStatusBarNotification

Highly customizable & feature rich notifications. Interactive dismiss. Custom Views. SwiftUI. Tap-to-hold. Progress. Written in Swift, compatible for ObjC!
http://calimarkus.github.io/JDStatusBarNotification/documentation/jdstatusbarnotification
MIT License
4.22k stars 562 forks source link

Fix for issue for iPhone in landscape with automatically hidden status bar #51

Closed eboehnisch closed 9 years ago

eboehnisch commented 9 years ago

When a JDStatusBarNotification is attempted to show on an iPhone in landscape orientation and with iOS 8 and later, the system has hidden the status bar automatically. This fix makes the status notification appear also in this case.

calimarkus commented 9 years ago

Hmm I added this originally to fix a bug on iOS8: https://github.com/jaydee3/JDStatusBarNotification/commit/6152b19a33d7cf1293cbb773383f0f77d49300bb

I guess that would be re introduced here.. not sure what it was though. Probably that it made the statusbar appear, when it wasn't visible.. what is unexpected behavior, no?? I think you should manually show it in the calling code, before using this?

eboehnisch commented 9 years ago

Yes, your fix prevents the status bar from appearing when it's already hidden. But it also means that if one tries to show a notification in landscape mode (with status bar hidden on iOS 8 and later), it will not show when the user rotates to portrait because it's not being initialized.

hons82 commented 9 years ago

I guess something like this should be the solution

eboehnisch commented 9 years ago

Does this fix also the issue, that the notification doesn't appear in landscape when rotating back to portrait?

calimarkus commented 9 years ago

bahavior should stay consistent.