Integrating UIPinchGestureRecognizer

Hi all,

I would like my OF iPhone app to recognize pinch gestures; my understanding is that I could attach a UIPinchGestureRecognizer to the testApp view. I tried adding a UIPinchGestureRecognizer* field to the testApp class named pinchGestureRecognizer, and adding this in the testApp::setup():

  
this->pinchGestureRecognizer = [[[UIPinchGestureRecognizer alloc]   
initWithTarget:ofxiPhoneGetUIWindow()   
action:@selector(pinchGesture:)]   
autorelease];  
  

Then I would query this->pinchGestureRecognizer->state during update. Obviously, my current approach doesn’t work- what should I do if I wanted to make it work properly? I’m guessing I would also need to implement -(void)pinchGesture- how would I go about that? Just the usual objective C way?

Thanks!