I am working on adding text on image. I found that CLImageEditor tool is very good. but i only want to use add text tool with my own theme. so can i use that tool in my app. or any other tool that i can use in my app.
Using only one tool from CLImageEditor
2.3k Views Asked by Iqbal Khan At
4
There are 4 best solutions below
0

No, you cant directly open a submenu. May be raise an issue to them at https://github.com/yackle/CLImageEditor/issues
If you want to show only few options or you want to customize item location you can do this way:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
CLImageEditor *editor = [[CLImageEditor alloc] initWithImage:image];
editor.delegate = self;
CLImageToolInfo *tool1 = [editor.toolInfo subToolInfoWithToolName:@"CLAdjustmentTool" recursive:NO];
CLImageToolInfo *tool2 = [editor.toolInfo subToolInfoWithToolName:@"CLBlurTool" recursive:NO];
CLImageToolInfo *tool3 = [editor.toolInfo subToolInfoWithToolName:@"CLRotateTool" recursive:NO];
CLImageToolInfo *tool4 = [editor.toolInfo subToolInfoWithToolName:@"CLToneCurveTool" recursive:NO];
tool1.available = NO;
tool2.available = NO;
tool3.available = NO;
tool4.available = NO;
[picker pushViewController:editor animated:YES];
}
1

You could do this for every tool.
CLImageToolInfo *tool = [editor.toolInfo subToolInfoWithToolName:@"CLToneCurveTool" recursive:NO];
tool.available = NO; // if available is set to NO, it is removed from the menu view.
0

You can not open submenu directly.
I created a remover function for removing the subtools. Swift 4.2
private func removeTools(tools: [String]) {
tools.forEach {
guard let imageEditor = self.imageEditor else { return }
let tool = imageEditor.toolInfo.subToolInfo(withToolName: $0, recursive: false)
tool?.available = false
}
}
You can call like this;
removeTools(tools: ["CLFilterTool", "CLEffectTool"])
This is possible by tweeking the existing code as below: