title: Drawing custom View not working
body: <p>I want to draw a custom view, i am doing it like this :</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface CustomView : UIView
  
  /** The color used to fill the background view */
  @property (nonatomic, strong) UIColor *drawingColor;
  
  @end
  
  #import "TocCustomView.h"
  
  #import  "UIView+ChangeSize.h"
  
  
  @interface CustomView()
  @property (nonatomic, strong) UIBezierPath *bookmarkPath;
  @end
  
  static CGFloat const bookmarkWidth = 20.0;
  
  @implementation CustomView
  
  
  - (id)initWithFrame:(CGRect)frame
  {
      self = [super initWithFrame:frame];
      if (self) {
          // Initialization code
      }
      return self;
  }
  
  - (void)drawRect:(CGRect)rect{
  
      [[UIColor blueColor] setFill];
      [[self bookmarkPath] fill];
  }
  
  - (UIBezierPath *)bookmarkPath{
      if (_bookmarkPath) {
          return _bookmarkPath;
      }
      UIBezierPath *aPath = [UIBezierPath bezierPath];
      [aPath moveToPoint:CGPointMake(self.width, self.y)];
      [aPath moveToPoint:CGPointMake(self.width, self.height)];
      [aPath moveToPoint:CGPointMake(self.width/2, self.height-bookmarkWidth)];
      [aPath moveToPoint:CGPointMake(self.x, self.height)];
      [aPath closePath];
  
      return aPath;
  }
  @end
  </code></pre>
  
  <p>and i am using the view in a controller like this :</p>
  
  <pre><code>    CGRect frame = CGRectMake(984, 0, 40, 243);
      CustomView *view = [[CustomView alloc] initWithFrame:frame];
      view.drawingColor = [UIColor redColor];
      [self.view addSubview:view];
  </code></pre>
  
  <p>The problem that the draw rectangle is not working !! the result is a black rectangle. What i am doing wrong ?</p>