yackle / CLImageEditor

MIT License
2.22k stars 574 forks source link

Setting custom icons is broken in 0.1.4 #107

Closed fraserscottmorrison closed 9 years ago

fraserscottmorrison commented 9 years ago

The following was working in 0.1.3 but broken in 0.1.4

CLImageToolInfo *tool = [editor.toolInfo subToolInfoWithToolName:@"CLToneCurveTool" recursive:NO];
tool.iconImagePath = @"test.png";

If I try to set a custom icon, then no icon is shown

fraserscottmorrison commented 9 years ago

Ok it seems like you've changed the initialisation of the icons from imageNamed to fastImageWithContentsOfFile and I just needed to use an absolute path.

Perhaps you should just update the readme so show how to set it now:

filterTool.iconImagePath = [[NSBundle mainBundle] pathForResource:@"icn_photo_filter" ofType:@"png"];
yackle commented 9 years ago

Updated. thx!

fraserscottmorrison commented 9 years ago

No prob. I submitted a little pull request too Fraser

On 8/06/2015, at 3:39 pm, Sho Yakushiji notifications@github.com wrote:

Updated. thx!

— Reply to this email directly or view it on GitHub https://github.com/yackle/CLImageEditor/issues/107#issuecomment-109852156.