长按事件响应

UILongPressGestureRecognizer *longPressGR =
        [[UILongPressGestureRecognizer alloc] initWithTarget:self
                                                      action:@selector(handleLongPress:)];
        longPressGR.minimumPressDuration = 0.2;
        [self addGestureRecognizer:longPressGR];
        [longPressGR release];


- (void)handleLongPress:(UIGestureRecognizer *)gestureRecognizer {
    NSLog(@"LONG PRESS");//放大缩小抖动
}

posted @ 2011-12-05 10:28  痴人指路  阅读(157)  评论(0编辑  收藏  举报