yackle / CLImageEditor

MIT License
2.22k stars 574 forks source link

Is there anyway to hide the default effects/editors? #164

Closed ihpalash closed 7 years ago

ihpalash commented 7 years ago

There are a lot of effects and editors in my app when I added the CLI. Is there anyway to hide some of the effetcts from the app UI??

yackle commented 7 years ago

See README.

ihpalash commented 7 years ago

Hello this is how I am showing all the effects:

+ (CGFloat)defaultDockedNumber
{
    // Image tools are sorted according to the dockedNumber in tool bar.
    // Override point for tool bar customization
    NSArray *tools = @[
                       @"CLFilterTool",
                       @"CLBrightnessTool",
                       @"CLSaturationTool",
                       @"CLContrastTool",
                       @"CLEffectTool",
                       @"CLBlurTool",
                       @"CLRotateTool",
                       @"CLClippingTool",
                       @"CLToneCurveTool",
                       @"CLSplashTool",
                       @"CLFramesTool",

                       ];

Problem is that when I comment out one of the code or delete one of the code. They dont disappear.

Can you please tell me what am I doing wrong?? I just want to hide couple of filters, effects.

yackle commented 7 years ago

Did you read README?

CLImageToolInfo *tool = [editor.toolInfo subToolInfoWithToolName:@"CLFilterTool" recursive:NO];
tool.available = NO;

tool = [editor.toolInfo subToolInfoWithToolName:@"CLEffectTool" recursive:NO];
tool.available = NO;
ihpalash commented 7 years ago

yes. But what does it mean?

yackle commented 7 years ago

Sorry, I'm not sure what do you want to do. What is the problem?

ihpalash commented 7 years ago

I just want to hide couple of the effects . for example I want to hide CLsplashtool and CLblurtool. Can I do that?

yackle commented 7 years ago

So did you try above code?