yackle / CLImageEditor

MIT License
2.21k stars 574 forks source link

Changing CLImageEditorTheme properties don't affect style #219

Open ARGAMX opened 5 years ago

ARGAMX commented 5 years ago

Changing CLImageEditorTheme properties don't affect style

[CLImageEditorTheme theme].backgroundColor = [UIColor blackColor]; [CLImageEditorTheme theme].toolbarColor = [UIColor blackColor]; [CLImageEditorTheme theme].toolbarTextColor = [UIColor blackColor]; CLImageEditor *editor = [[CLImageEditor alloc] initWithImage:image]; editor.theme.backgroundColor = [UIColor blackColor]; editor.theme.toolbarColor = [UIColor blackColor]; editor.theme.toolbarTextColor = [UIColor blackColor]; editor.delegate = self;

[picker presentViewController:editor animated:YES completion:nil];

No success, still showing white Top Bar with 'Back' and 'OK' on any filter press.

brentkevern commented 5 years ago

I bumped into this too. CLImageEditor is not setting the navigation bar color. In the _CLImageEditorViewController.m file, there is a method named -(void)initNavigationBar. Find the line that reads _navigationBar = navigationBar; Immediately after that, I used the following code to set the nav bar color using the toolbarColor from the theme. Not perfect, but it worked.

_navigationBar.barTintColor = [CLImageEditorTheme theme].toolbarColor ;