首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

UITouch 抚摸事件处理(实例)

2012-08-13 
UITouch 触摸事件处理(实例)1. UITouch 的主要方法://手指离开画面(结束操作)时所触发的函式 -(void)touch

UITouch 触摸事件处理(实例)

1. UITouch 的主要方法:

UITouch 抚摸事件处理(实例)

//手指离开画面(结束操作)时所触发的函式 -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { //宣告一个UITouch的指标来存放事件触发时所撷取到的状态 UITouch *touch = [[event allTouches] anyObject]; //取得并输出连点资讯,tapCount可保留一定时间内的连点次数 tapCountLabel.text = [NSString stringWithFormat:@"%d", [touch tapCount]]; }
??

来源:http://furnacedigital.blogspot.com/2010/12/touch-panel.html

?

?

?

热点排行