Upvote:0

- (void)drawRect:(CGRect)rect
{
    CGRect aRectangle = CGRectMake(0.0f, 0.0f, 40.0f, 40.0f); //size of image frame
    UIBezierPath *path = [UIBezierPath bezierPathWithOvalInRect:aRectangle];
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextSaveGState(context);
    UIColor *imageColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"yourImage.png"]];
    [imageColor setFill];
    [path fill];
}

Credit Goes to: stackoverflow.com

Related question with same questions but different answers