title: setNeedsDisplay for UIImage doesn't work
body: <p>I am trying to draw a line on an UIImage with the help of a dataBuffer when a button gets touched, but the drawRect: .. methode doesn´t get called. (so, the line i want to draw does't appear)</p>
  
  <p>I really don't know where the problem could be, so I posted quite a bit more code. Sorry about that.</p>
  
  <p>By the way, I am working on an viewbasedapplication.</p>
  
  <p>here is my code :</p>
  
  <pre><code>-(void) viewDidLoad{
    UIImage *image = [UIImage imageNamed:@"playView2.jpg"];
    [playView setImage:image];
    [image retain];
    offScreenBuffer = [self setupBuffer];
  }
  
  - (IBAction)buttonTouched:(id)sender {
    [self drawToBuffer];
    [playView setNeedsDisplay];    
  }
  
  - (void)drawRect:(CGRect)rect{
    CGImageRef cgImage = CGBitmapContextCreateImage(offScreenBuffer);
    UIImage *uiImage = [[UIImage alloc] initWithCGImage:cgImage];
    CGImageRelease(cgImage);
    [uiImage drawInRect: playView.bounds];
    [uiImage release];
  }
  
  
  
  -(void)drawToBuffer {
  
  //                  Red  Gr   Blu  Alpha
  CGFloat color[4] = {1.0, 1.0, 0.0, 1.0};
  
  CGContextSetRGBStrokeColor(offScreenBuffer, color[0], color[1], color[2], color[3]);
  
  CGContextBeginPath(offScreenBuffer);
  CGContextSetLineWidth(offScreenBuffer, 10.0);
  CGContextSetLineCap(offScreenBuffer, kCGLineCapRound);
  
  CGContextMoveToPoint(offScreenBuffer, 30,40);
  CGContextAddLineToPoint(offScreenBuffer, 150,150);
  
  CGContextDrawPath(offScreenBuffer, kCGPathStroke);
  }
  
  -(CGContextRef)setupBuffer{      
      CGSize size = playView.bounds.size;
  
      CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
  
      CGContextRef context = CGBitmapContextCreate(NULL, size.width, size.height, 8, size.width*4, colorSpace, kCGImageAlphaPremultipliedLast);
  
      CGColorSpaceRelease(colorSpace);
      return context;
  }
  </code></pre>