Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StatusBar appareance when moving to another UIViewController #109

Closed
RemiRodrigues opened this issue Sep 21, 2018 · 5 comments
Closed

StatusBar appareance when moving to another UIViewController #109

RemiRodrigues opened this issue Sep 21, 2018 · 5 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@RemiRodrigues
Copy link

RemiRodrigues commented Sep 21, 2018

Describe the bug
Hello, I have a problem with the statusBar appearance. Screenshots below describe the bug.

To Reproduce
Steps to reproduce the behavior:

  1. Display a UIViewController with a white background, and dark statusBar
  2. Display, as popover, a UIViewController with a black background, and a light statusBar
  3. Display a StatusBar's EntryView with an orange background
  4. Before the EntryView dismissed, close the popover, and return back to the white UIViewController
  5. When the statusBar disappear, the statusBar become "light" on the white UIViewController

Expected behavior
Keep statusBar appearence.

Screenshots
First UIViewController with white background :
img_1062

Second UIViewController with dark background :
img_1058

Display StatusBar's EntryView on dark UIViewController :
img_1059

Close dark UIViewController :
img_1060

When the StatusBar's EntryView is dismissed, the statusBar is light :
img_1061

Configuration :

  • Device: iPhone 6
  • iOS Version: 11.4
  • Xcode Version 9.4.1
  • Dependency Manager : CocoaPods
  • SwiftEntryKit Release : 0.6.0

Additional context
I can solve the bug removnig this method on EKRootViewController class :

override public func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        statusBar = previousStatusBar
}

But this seems really a bad idea...

Thanks for your help, this pod is really helpful 👍

@huri000
Copy link
Owner

huri000 commented Sep 21, 2018 via email

@huri000
Copy link
Owner

huri000 commented Sep 21, 2018

Thinking it through, the fix should specifically refer to a situation where the entry is displayed above the status bar. In that case - the status bar appearence should not be manipulated - since it’s already placed below the entry.

@huri000 huri000 self-assigned this Sep 29, 2018
@huri000 huri000 added bug Something isn't working enhancement New feature or request labels Sep 29, 2018
@huri000
Copy link
Owner

huri000 commented Sep 29, 2018

@RemiRodrigues - Intuitively, It feels like a bug. Yet, I couldn't help but think that a fix for it is an enhancement as well. I mean, to truly handle that kind of issue SwiftEntryKit should listen to the status bar updates, which as far as I know, is not fully possible. The other option is to add an additional status bar style which implied SwiftEntryKit that it should ignore the status bar entirely in some cases. That can be tricky when chaining multiple entries with different values of status bars.
But I guess it's O.K if you know what you're doing.
So... I've added that status in a bugfix branch. I'll keep you updated when it's merged.
Please, let me know your thoughts.

@RemiRodrigues
Copy link
Author

@huri000 thanks for your answer !

I think your second option, an additional status bar style, can be a light weight solution.

huri000 added a commit that referenced this issue Jan 9, 2019
🔨 Refactor rotation usage inside `PositionConstraints`.
@huri000
Copy link
Owner

huri000 commented Jan 10, 2019

Hi @RemiRodrigues! Apologies for the delay. A fix is available on 0.8.8. Please let me know if that works for you. 🎉
See the CHANGELOG for status bar info.

@huri000 huri000 closed this as completed Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants