title: Drawing paint brush using UIBezierPath is working with uiview but not working with uiimageview?
body: <p>i am making paint brush using UIBezierPath using following code.</p>
  
  <pre><code>.h File
  @interface MyLineDrawingView : UIView
  {
      UIBezierPath *myPath;
      UIColor *brushPattern;
  }
  
  @end
  
  .m File
  -(id)initWithFrame:(CGRect)frame
  {
      self = [super initWithFrame:frame];
      if (self) 
      {
          self.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"0010.png"]];
          myPath=[[UIBezierPath alloc]init];
          myPath.lineWidth=30;
          brushPattern=[UIColor redColor]; 
      }
      return self;
  }
  
  - (void)drawRect:(CGRect)rect
  {
      [brushPattern setStroke];
      [myPath strokeWithBlendMode:kCGBlendModeNormal alpha:1.0];
     // [myPath strokeWithBlendMode:kCGBlendModeSaturation alpha:1.0];
  
      // Drawing code
      //[myPath stroke];
  }
  
  #pragma mark - Touch Methods
  -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
  {   
      UITouch *mytouch=[[touches allObjects] objectAtIndex:0];
      [myPath moveToPoint:[mytouch locationInView:self]];   
  }
  
  -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
  {
      UITouch *mytouch=[[touches allObjects] objectAtIndex:0];
      [myPath addLineToPoint:[mytouch locationInView:self]];
      [self setNeedsDisplay];
  
  }
  </code></pre>
  
  <p>It is working well with <code>UIView</code>. As you can see in above custom class inherits from <code>UIVIew</code>. But when i am subclassing <code>UIImageView</code> instead of <code>UIView</code> I am not able to draw anything. Toches method are called but it draws nothing on the screen. Does anyone know what is wrong with this or how can i resolve this?</p>
  
  <p>The reason that i want to change it to <code>UIImageView</code> from <code>UIView</code> is I want to set the image and change the color. When I use <code>UIView</code> and use </p>
  
  <pre><code>self.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"0010.png"]];
  </code></pre>
  
  <p>the image does not fit to view. Only part of the whole image is visible. Even if i change the content mode to <code>UIViewContentModeScaleToFill</code> then also whole image is not visible.</p>