yackle / CLImageEditor

MIT License
2.22k stars 574 forks source link

Navigation bar for tools overlaps with status bar #186

Closed javaboyjunior closed 5 years ago

javaboyjunior commented 7 years ago

Hi there

Trying to figure out why the buttons for editing tools appear overlapped with the status bar. The main CLImageViewController is fine - it's all the child windows. I can't see any different between my app and the demo although clearly there is something.

Ideas much appreciated.

Thanks

Mike

img_0716

yackle commented 7 years ago

Can I get a minimum sample project that can confirm this issue?

m4f1h4rd commented 6 years ago

I have the same issue. Can I hide the status bar?

simulator screen shot - iphone se - 2017-10-24 at 20 27 52

ghyzx commented 6 years ago

Sometimes it will appear this circumstance. The occurrence probability is very big when take photos from the camera.

m4f1h4rd commented 6 years ago

In my project I disabled the status bar. And it appear only in CLImageEditor Controller.

yackle commented 6 years ago

Please try 18c1efe and

[[CLImageEditorTheme theme] setStatusBarHidden:YES];
ghyzx commented 6 years ago

Thanks yackle, but the problem still exists. 123

yackle commented 6 years ago

@ghyzx Is that the problem is the status bar is displayed (or collapse of the layout)?

ghyzx commented 6 years ago

@yackle The status bar and navigation bar are overlap partly.

yackle commented 6 years ago

Does anyone know of a way to reproduce this issue?

ghyzx commented 6 years ago

my steps is as follows take photo from the camera on iPhone 7 with iOS 11.1

yackle commented 6 years ago

I couldn't reproduce this issue with my device. Can I get sample project that reproduce the issue?

jianyaoang commented 6 years ago

Not sure if my encounter is the same with everyone else. But I was facing the same issue and I solved it by showing the status bar.

Issue I faced:

  1. ViewController A has hidden status bar in viewDidAppear
  2. ViewController A presents CLImageEditor (theme is set to not hide status bar)
  3. ViewController A viewWillDisappear sets hidden status bar to false
  4. Overlapping issue as shown by screenshots above happened.

How I solved it: Before ViewController A is to present CLImageEditor, set hidden status bar to false. Call [self setNeedsStatusBarAppearanceUpdate];, and that shall call (BOOL)prefersStatusBarHidden

Clues that helped me solve this: Found this part of code in CLImageEditorViewController,

CGFloat dy = ([[[UIDevice currentDevice] systemVersion] floatValue]<7) ? 0 : MIN([UIApplication sharedApplication].statusBarFrame.size.height, [UIApplication sharedApplication].statusBarFrame.size.width);

When statusBar is hidden the [UIApplication sharedApplication].statusBarFrame.size.height will be zero, and then the setting of constraints to top will be zero as well.

Hope that helps!

shripadkulkarnid commented 6 years ago

How to solve this issue in swift

zhangao0086 commented 5 years ago

Not sure if my encounter is the same with everyone else. But I was facing the same issue and I solved it by showing the status bar.

Issue I faced:

  1. ViewController A has hidden status bar in viewDidAppear
  2. ViewController A presents CLImageEditor (theme is set to not hide status bar)
  3. ViewController A viewWillDisappear sets hidden status bar to false
  4. Overlapping issue as shown by screenshots above happened.

How I solved it: Before ViewController A is to present CLImageEditor, set hidden status bar to false. Call [self setNeedsStatusBarAppearanceUpdate];, and that shall call (BOOL)prefersStatusBarHidden

Clues that helped me solve this: Found this part of code in CLImageEditorViewController,

CGFloat dy = ([[[UIDevice currentDevice] systemVersion] floatValue]<7) ? 0 : MIN([UIApplication sharedApplication].statusBarFrame.size.height, [UIApplication sharedApplication].statusBarFrame.size.width);

When statusBar is hidden the [UIApplication sharedApplication].statusBarFrame.size.height will be zero, and then the setting of constraints to top will be zero as well.

Hope that helps!

Exact!

@yackle Here is a sample project: CLImageEditor-master.zip

Current Behavior

CLImageEditorTheme.theme.statusBarHidden = YES;

CLImageEditorTheme.theme.statusBarHidden = NO;

Steps to Reproduce:

  1. Open and run the project: Demo/CLImageEditorDemo/CLImageEditorDemo.xcodeproj
  2. Click the Edit button on the bottom bar
yackle commented 5 years ago

Thanks @all I think this issue is fixed by #218, please check it.

zhangao0086 commented 5 years ago

👍

Indolia commented 5 years ago

Hi Team, is any option to write text on image?