I'm trying do draw a rounded rect filled with a pattern image (the pattern image should be repeated to fill the rect), is there a way to do that using UIBezierPath? Possibly I would like to add a shadow to the border of the rect. Thanks
Is there anything you tried already?
First thing that comes to mind would be:
UIImage *patternImg = [UIImage imageNamed:@"SomePattern.png"];
UIColor *fill = [UIColor colorWithPatternImage:patternImg];
[path fill];
Another option would be to draw a rectangle that fits your path, fill that using your pattern color, and clip that using your path.
have you tried [[UIColor colorWithPatternImage:YOUR_UI_IMAGE] setFill]
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With