论坛首页 移动开发技术论坛

手势识别

浏览 3739 次
锁定老帖子 主题:手势识别
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
作者 正文
   发表时间:2011-09-01  
iOS
注册:
    UISwipeGestureRecognizer *recognizer;  
    recognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwipeFrom:)];  
    [recognizer setDirection:(UISwipeGestureRecognizerDirectionRight)];  
    [[self view] addGestureRecognizer:recognizer];  
    [recognizer release];


处理:
- (void)handleSwipeFrom:(UISwipeGestureRecognizer *)recognizer{  
    if (recognizer.direction==UISwipeGestureRecognizerDirectionLeft) {  
        NSLog(@"left");
    }
}


移出:
    for (UISwipeGestureRecognizer *recognizer in [[self view] gestureRecognizers]) {
        [[self view] removeGestureRecognizer:recognizer];
    }
   发表时间:2012-07-06  
什么个情况??
0 请登录后投票
   发表时间:2012-08-07  
这是什么呢,注册参数都没有拿到,只不过写了个注册流程,然后销毁,数据保存到哪都没有写
0 请登录后投票
   发表时间:2012-08-07  
什么情况?????????
0 请登录后投票
论坛首页 移动开发技术版

跳转论坛:
Global site tag (gtag.js) - Google Analytics