title: UIview using pointInside method
body: <p>I am creating a UIview and applying a mask on it in this way:</p>
  
  <pre><code>baseView = [[ViewTutorialSubclass alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
  //self.view = baseView;
  [self.view addSubview:baseView];
  [baseView setBackgroundColor:[UIColor blackColor]];
  baseView.userInteractionEnabled = YES;
  baseView.alpha = 0.7;
  
  mask = [[CAShapeLayer alloc] init];
  mask.frame = baseView.layer.bounds;
  CGRect biggerRect = CGRectMake(mask.frame.origin.x, mask.frame.origin.y, mask.frame.size.width, mask.frame.size.height);
  CGRect smallerRect = CGRectMake(7.0f, 160.0f, 590.0f, 43.0f);
  
  UIBezierPath *maskPath = [UIBezierPath bezierPath];
  [maskPath moveToPoint:CGPointMake(CGRectGetMinX(biggerRect), CGRectGetMinY(biggerRect))];
  [maskPath addLineToPoint:CGPointMake(CGRectGetMinX(biggerRect), CGRectGetMaxY(biggerRect))];
  [maskPath addLineToPoint:CGPointMake(CGRectGetMaxX(biggerRect), CGRectGetMaxY(biggerRect))];
  [maskPath addLineToPoint:CGPointMake(CGRectGetMaxX(biggerRect), CGRectGetMinY(biggerRect))];
  [maskPath addLineToPoint:CGPointMake(CGRectGetMinX(biggerRect), CGRectGetMinY(biggerRect))];
  
  [maskPath moveToPoint:CGPointMake(CGRectGetMinX(smallerRect), CGRectGetMinY(smallerRect))];
  [maskPath addLineToPoint:CGPointMake(CGRectGetMinX(smallerRect), CGRectGetMaxY(smallerRect))];
  [maskPath addLineToPoint:CGPointMake(CGRectGetMaxX(smallerRect), CGRectGetMaxY(smallerRect))];
  [maskPath addLineToPoint:CGPointMake(CGRectGetMaxX(smallerRect), CGRectGetMinY(smallerRect))];
  [maskPath addLineToPoint:CGPointMake(CGRectGetMinX(smallerRect), CGRectGetMinY(smallerRect))];
  
  mask.path = maskPath.CGPath;
  [mask setFillRule:kCAFillRuleEvenOdd];
  mask.fillColor = [[UIColor blackColor] CGColor];
  baseView.layer.mask = mask;
  </code></pre>
  
  <p>In my ViewTutorialSubclass.m I have:</p>
  
  <pre><code>- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
  for (UIView *v in self.subviews) {
      CGPoint localPoint = [v convertPoint:point fromView:self];
      if (v.alpha &gt; 0.8 &amp;&amp; [v pointInside:localPoint withEvent:event])
          return YES;
  }
  return NO;
  }
  </code></pre>
  
  <p>The idea is that all user touches are passed to the UIview below this one if the user touches any part of the UIview with the mask (so transparent), while if the user touches anywhere else, the touches are applied to this current UIview. How can I don that? Is pointInside the best solution?</p>