peyton/MOOMaskedIconView

Image property of MOOMaskedIconView

Closed this issue · 2 comments

I'm trying to set the image property of a UIButton...

For example what I'd like to do is:

MOOMaskedIconView *iconView = [MOOMaskedIconView iconWithResourceNamed:@"icon.png"];
 iconView.color = [UIColor greenColor];
 [self.view addSubview:iconView];

 UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
 [button setImage:iconView.image forState:UIControlStateNormal];

However there is no way to access the image property of the MOOMaskedIconView - is there anyway other way to accomplish this?

Hey, have you tried the -renderImage and -renderHighlightedImage methods of MOOMaskedIconView?

In hindsight, something like -snapshot would have made for a better name...

Closing as issue seems resolved. Feel free to reopen.