You need to set the layer’s -maskToBounds: property to YES to clip.
Thanks,
Jon
> On Feb 7, 2015, at 10:38 PM, Aaron Lewis wrote:
>
> Hi,
>
> I'm trying to create a circular button, with an rectangular image:
>
>self.button.layer.borderColor = [UIColor blackColor].CGColor;
>self.butt
Hi,
I'm trying to create a circular button, with an rectangular image:
self.button.layer.borderColor = [UIColor blackColor].CGColor;
self.button.layer.borderWidth = 5;
self.button.layer.cornerRadius = self.button.bounds.size.width / 2.0;
[self.button setBackgroundImage: [UIImage