title: Drawing UIBezierPath on code generated UIView
body: <p>I have a <code>UIView</code> added in code at run time.</p>
  
  <p>I want to draw a <code>UIBezierPath</code> in it, but does this means i have to override the <code>drawRect</code> for UIView?</p>
  
  <p>Or is there another way of drawing to it on the custom made <code>UIView</code>?</p>
  
  <p>Here is the code for generating the <code>UIView</code>:</p>
  
  <pre><code>UIView* shapeView = [[UIView alloc]initWithFrame:CGRectMake(xOrigin,yOrigin+(i*MENU_BLOCK_FRAME_HEIGHT), self.shapeScroll.frame.size.width, MENU_BLOCK_FRAME_HEIGHT)];
  shapeView.clipsToBounds = YES;
  </code></pre>
  
  <p>And here is the function to create and return a <code>UIBezierPath</code>:</p>
  
  <pre><code>- (UIBezierPath*)createPath
  {
      UIBezierPath* path = [[UIBezierPath alloc]init];
      [path moveToPoint:CGPointMake(100.0, 50.0)];
      [path addLineToPoint:CGPointMake(200.0,50.0)];
      [path addLineToPoint:CGPointMake(200.0, 200.0)];
      [path addLineToPoint:CGPointMake(100.0, 200.0)];
      [path closePath];
      return path;
  }
  </code></pre>