How to detect iphone flick event with unity 3d?

Hi my friend,

I’m a new comer to u3d iphone. I have a question: How to detect the flick event on iphone by using u3d. I searched Google. The only result I get is to write objective c code to detect “flick event”. The sample code is http://discussions.apple.com/message.jspa?messageID=7862186. But how to detect the flick event by using u3d? Any one have u3d sample code? Thank you very much.

Something like this should do the trick:

function Update () {
   for (var i = 0; i < iPhoneInput.touchCount; i++) {
      var touch = iPhoneInput.GetTouch(i);
      if (touch.phase == iPhoneTouchPhase.Moved) {
         if (touch.deltaPosition.y > 50) {
            //Do Something with upward flick
         }
      }
   }		   	

}