title: UIGestureRecognizer in UIView Object
body: <p>I have created a <code>UIViewController</code>, which contains a <code>UIView</code> object.</p>
  
  <p>I want the <code>UIView</code> object response to a single tap by 1 finger, and also pinch by 2 fingers.</p>
  
  <p>I have clicked the <strong>"User Interaction Enabled"</strong> and the <strong>"Multiple touch"</strong> options in the xib.</p>
  
  <p>I create both <code>UITapGestureRecognizer</code>, and <code>UIPinchGestureRecognizer</code> inside the <code>UIView</code> function <strong>initWithFrame:</strong>, as it is the only entry point for the <code>UIView</code> object. But the object doesn't response to the <code>UIGestureRecognizer</code> objects. Why? Or, where is the best place to put the <code>UIGestureRecognizer</code> objects?</p>
  
  <pre><code>- (id)initWithFrame:(CGRect)frame
  {
      self = [super initWithFrame:frame];
      if (self) {
          // Initialization code
          // single tap
          UITapGestureRecognizer* singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)];
  
          singleTap.numberOfTapsRequired = 1;
          singleTap.numberOfTouchesRequired = 1;
          [self addGestureRecognizer: singleTap];
  
          // 2 fingers pinch
          UIPinchGestureRecognizer* doubleMove = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handleDoubleMove:)];
  
          [self addGestureRecognizer: doubleMove];
      }
      return self;
  }
  </code></pre>