iOS如何确定屏幕是否已被点击
我正在使用iOS 5.x SDK,我想确定屏幕是否被点击 就目前而言,仅仅建立一个NSLog是可以的,但我不知道从哪里开始,一般来说,例如 然后您可以使用如下方法:iOS如何确定屏幕是否已被点击,ios,cocoa-touch,ios5,touch,uigesturerecognizer,Ios,Cocoa Touch,Ios5,Touch,Uigesturerecognizer,我正在使用iOS 5.x SDK,我想确定屏幕是否被点击 就目前而言,仅仅建立一个NSLog是可以的,但我不知道从哪里开始,一般来说,例如 然后您可以使用如下方法: - (void)tapOnView:(UITapGestureRecognizer *)sender { CGPoint location = [sender locationInView:self.view]; NSLog(@"Tap at %1.0f, %1.0f", location.x, location.y
- (void)tapOnView:(UITapGestureRecognizer *)sender
{
CGPoint location = [sender locationInView:self.view];
NSLog(@"Tap at %1.0f, %1.0f", location.x, location.y);
}
一般来说,例如
然后您可以使用如下方法:
- (void)tapOnView:(UITapGestureRecognizer *)sender
{
CGPoint location = [sender locationInView:self.view];
NSLog(@"Tap at %1.0f, %1.0f", location.x, location.y);
}
您可能希望从实现
触摸开始:withEvent:
,触摸移动:withEvent:
,触摸结束:withEvent:
,触摸取消:withEvent:
您可以在此处阅读更多信息:您可能希望从实现
触摸开始:withEvent:
,触摸移动:withEvent:
,触摸结束:withEvent:
,触摸取消:withEvent:
您可以在此处阅读更多信息: