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

Status Bar handling #186

Closed
wbsgxc opened this issue Dec 21, 2017 · 7 comments
Closed

Status Bar handling #186

wbsgxc opened this issue Dec 21, 2017 · 7 comments
Assignees

Comments

@wbsgxc
Copy link

wbsgxc commented Dec 21, 2017

Hi

Thanks for the great image cropper, it is very easy to integrate, decent looking and good performance. So... thanks and well done :)

I wanna raise a minor issue regarding how the current RSKImageCropperViewController is handling the status bar.

I do see that we are manually set status bar hidden at the "viewWillAppear" stage and I also see the controller assign back the status bar hidden value back inside "viewWillDisappear". In case of an application delegates the status bar's appearance property in each view controller, e.g. a video app or a game fixed up vertical settings page with status bar with landscape full-screen mode without status bar, this will cause trouble for the whole app.

Best regards
Xiaochen

@ruslanskorb
Copy link
Owner

Hi @wbsgxc,

Thanks for reporting the issue.

Could you, please, describe in more detail the problem that arises, or provide a video / screenshot with this problem?

@wbsgxc
Copy link
Author

wbsgxc commented Dec 21, 2017 via email

@ruslanskorb
Copy link
Owner

Hey @wbsgxc,

RSKImageCropViewController overrides prefersStatusBarHidden property. So, this shouldn't be a problem.

If you don't want to hide the status bar I can suggest you to create a subclass of RSKImageCropViewController and override prefersStatusBarHidden property to return NO.

@ruslanskorb
Copy link
Owner

@wbsgxc I will close the issue for now. Feel free to reopen it if you have any other suggestions regarding status bar handling.

@rmusetti81
Copy link

Sorry but create a subclass and override prefersStatusBarHidden not work.
Help please!!

@rpendleton
Copy link

rpendleton commented Mar 18, 2018

Overriding prefersStatusBarHidden didn't work for me either since the viewWillAppear is hiding the status bar directly with UIApplication.

Since I need to show the status bar on iPad (since the VC will be in a popover), but not on iPhone, I just ended up updating viewWillAppear to respect the return value of prefersStatusBarHidden. I haven't tested it too extensively, but it works fine for my needs:

rpendleton@ac52953

@wbsgxc
Copy link
Author

wbsgxc commented Mar 18, 2018

@rpendleton please refer my comment above.

  1. Remove the prefersStatusBarHidden from UIApplication level
  2. Propagate the property overridden down from parent towards the frontmost view controller
    Like what I try to spot, this should be fixed at the framework level.

@ruslanskorb ruslanskorb reopened this Mar 18, 2018
ruslanskorb added a commit that referenced this issue Mar 25, 2018
…we are using `prefersStatusBarHidden` instead of `setStatusBarHidden:` to manage the visibility of the status bar.

#186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants