title: CAShapeLayer mask view
body: <p>I have one problem. I look for the answers on the net and I don't  understand  why is not working. I must do some stupid mistake which I can't figure it out.</p>
  
  <p>if I make : </p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      UIView * view = [[UIView alloc]initWithFrame:CGRectMake(10, 10, 300, 400)];
      view.backgroundColor = [UIColor blueColor];
      [self.view addSubview:view];
  
  }
  </code></pre>
  
  <p>it create blue view on the screen, but if I make</p>
  
  <pre><code>- (void)viewDidLoad
  {
      [super viewDidLoad];
  
      UIView * view = [[UIView alloc]initWithFrame:CGRectMake(10, 10, 300, 400)];
      view.backgroundColor = [UIColor blueColor];
      [self.view addSubview:view];
  
      CAShapeLayer * layer = [[CAShapeLayer alloc]init];
      layer.frame = CGRectMake(10, 10, 30, 30);
      layer.fillColor = [[UIColor blackColor] CGColor];
  
      view.layer.mask = layer;
  
  }
  </code></pre>
  
  <p>it don't show anything. </p>
  
  <p>If I understand correctly it should mask at (10,10,30,30)?</p>