yackle / CLImageEditor

MIT License
2.21k stars 573 forks source link

iOS 7 issue #38

Closed kronik closed 10 years ago

kronik commented 10 years ago

Hi! I tried to use this editor in iOS 7 with only status bar hidden mode. And it looks like something is wrong in layout. So when main toolbar hides and effect's toolbar appears it appears a bit upper (64px) than in your demo app. Could you help me to fix this issue?

image 2 image

yackle commented 10 years ago

Hi. Thanks for reporting. I've never seen this issue.

What do you think is the difference between your code and demo app?

iMokhles commented 10 years ago

i think he put his navigation bar translucent = NO to tint it. and it move the layout little bit.

yackle commented 10 years ago

thanks. I'll check it.

kronik commented 10 years ago

I found a reason:

in the app delegate I set non-transparent navigation bar image:

CGRect rect = CGRectMake(0, 0, 1, 1);
// Create a 1 by 1 pixel context
UIGraphicsBeginImageContextWithOptions(rect.size, NO, 0);

[[UIColor blueColor] setFill];

UIRectFill(rect);   // Fill it with your color
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();

[[UINavigationBar appearance] setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];
iMokhles commented 10 years ago

looks like i had a reason :P

yackle commented 10 years ago

This issue has been fixed probably in develop branch. you can check with cocoapods:

pod 'CLImageEditor', :git => 'https://github.com/yackle/CLImageEditor', :branch => "develop"
SaadChaudhry commented 10 years ago

How to set background color,image to the editor. I mean white screen doesn't look nice in some cases. Or specifically in my case. :)

yackle commented 10 years ago

[[CLImageEditorTheme theme] setBackgroundColor:[UIColor blackColor]]; for example. see CLImageEditorDemo.

SaadChaudhry commented 10 years ago

thanks alot, sure I will