Created
March 31, 2010 06:17
-
-
Save kamiyam/350001 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public override void TouchesBegan(NSSet touches, UIEvent evt) | |
{ | |
var touch = touches.AnyObject as UITouch; | |
Console.Out.WriteLine("TouchesBegan:" + touch.TapCount); | |
if (touch.TapCount == 2) | |
{ | |
Console.Out.WriteLine("TouchesBegan:SingleTap Cancel"); | |
//シングルタップ時の処理キャンセル | |
} | |
} | |
public override void TouchesMoved(NSSet touches, UIEvent evt) | |
{ | |
Console.Out.WriteLine("TouchesMoved"); | |
} | |
public override void TouchesEnded(NSSet touches, UIEvent evt) | |
{ | |
var touch = touches.AnyObject as UITouch; | |
Console.Out.WriteLine("TouchesEnded:" + touch.TapCount); | |
if (touch.TapCount == 1) | |
{ | |
Console.Out.WriteLine("TouchesEnded:SingleTap"); | |
this.PerformSelector(stAction, this, 5000); | |
} | |
else if ( touch.TapCount == 2 ) | |
{ | |
Console.Out.WriteLine("TouchesEnded:DoubleTap"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIViewControllerを継承したサブクラスでTouchイベントをOverRide |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment