iPhone 手势识别
来源:互联网 发布:淘宝异地发货违规吗 编辑:程序博客网 时间:2024/05/22 21:37
- (void)viewDidLoad {
[super viewDidLoad];
UISwipeGestureRecognizer *recognizer = nil;
//
// 向右划动
//
recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom:)];
[recognizer setDirection:(UISwipeGestureRecognizerDirectionRight)];
[self.view addGestureRecognizer:recognizer];
[recognizer release];
//
// 向左划动 www.2cto.com
//
recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom:)];
[recognizer setDirection:(UISwipeGestureRecognizerDirectionLeft)];
[self.view addGestureRecognizer:recognizer];
[recognizer release];
}
- (void)handleSwipeFrom:(UISwipeGestureRecognizer *)recognizer {
if (recognizer.direction == UISwipeGestureRecognizerDirectionRight) {
// TODO:
}
else if (recognizer.direction == UISwipeGestureRecognizerDirectionLeft) {
// TODO:
}
}
- iPhone 手势识别
- iPhone 手势识别
- 关于Iphone的手势识别
- (10) iphone 开发 用户点击,触摸和手势识别 解析
- 【iPhone代码片段之四】手势识别器的用法
- iphone 开发 用户点击,触摸和手势识别 解析
- 手势识别
- 手势识别
- 手势识别
- 手势识别
- 手势识别
- 手势识别
- 手势识别
- 手势识别
- 手势识别
- 手势识别
- 手势识别
- 手势识别
- C# Tips: How to tell if system is little endian or big endian?
- Vector和ArrayList,LinkedList,Hashtable,HashMap的区别
- 使用 dom4j 解析 XML
- 改变键盘颜色
- 键盘大小改变的消息
- iPhone 手势识别
- Iphone代码片段导航
- ios 怎么判断当前的输入法
- Dom4j的使用(全而好的文章)
- win 的脚本运行时容易出错了。如下操作就行了。
- Git学习笔记2 给git命令起别名
- windows编程中的char, TCHAR, WCHAR, LPSTR, LPWSTR, LPCTSTR区别
- 微软企业库--Policy使用Login Handler
- 如何利用反射判断一个成员是否为某一类型