iOS Remplir le fond Image d'un UIView


Exemple

Objectif c

 UIGraphicsBeginImageContext(self.view.frame.size);
 [[UIImage imageNamed:@"image.png"] drawInRect:self.view.bounds];
 UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
 UIGraphicsEndImageContext();     
 self.view.backgroundColor = [UIColor colorWithPatternImage:image];