title: CALayer or UIView backgroundColor UIImage on iOS 4
body: <p>Good day all;</p>
  
  <p>I am not sure what has changed to prevent this from working. On iOS 3 SDK, the following code worked fine in a CATiledLayer class:</p>
  
  <pre><code>- (void)drawInContext:(CGContextRef)context {
      UIImage* image = [[ResourcesManager sharedResourcesManager] getUIImageFromArray:Image_Cell_Background Index:[mazeCell zone]];
      UIColor* color = [[UIColor alloc] initWithPatternImage:image];
  
      [self setBackgroundColor:[color CGColor]];
      [color release];    
  </code></pre>
  
  <p>However, compiling for iOS 4 and executing on simulator fails to render the image. I am baffled especially since images added as sublayers render just fine. Only the background doesn't render.</p>