IOS: dessiner une image dans une vue

J'ai ce code pour la couleur de vue:

UITouch *touch = [touches anyObject];   
    CGPoint currentPoint = [touch locationInView:drawImage];

    UIGraphicsBeginImageContext(drawImage.frame.size);
    [drawImage.image drawInRect:CGRectMake(0, 0, drawImage.frame.size.width, drawImage.frame.size.height)];
    CGContextSetLineCap(UIGraphicsGetCurrentContext(), kCGLineCapRound);
    CGContextSetLineWidth(UIGraphicsGetCurrentContext(), size);

      CGContextSetRGBStrokeColor(UIGraphicsGetCurrentContext(), r, g, b, a);

    CGContextBeginPath(UIGraphicsGetCurrentContext());
    CGContextMoveToPoint(UIGraphicsGetCurrentContext(), lastPoint.x, lastPoint.y);
    CGContextAddLineToPoint(UIGraphicsGetCurrentContext(), currentPoint.x, currentPoint.y);
    CGContextStrokePath(UIGraphicsGetCurrentContext());
    drawImage.image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

mon problème est que je veux de la couleur non pas un point, mais je veux utiliser une image qui se répète (comme une image png)
Est-il possible?

auto.vue.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"de l'image.png"]];
pouvez-vous m'expliquer s'il vous plaît?

OriginalL'auteur CrazyDev | 2012-04-13