thiagoperes / IDMPhotoBrowser

Photo Browser / Viewer inspired by Facebook's and Tweetbot's with ARC support, swipe-to-dismiss, image progress and more
MIT License
2.71k stars 642 forks source link

为什么加长按手势actionSheet他会弹出来两次 #206

Open AlmostSir777 opened 8 years ago

AlmostSir777 commented 8 years ago

...

dssheng commented 8 years ago

@VaeXnn 一次开始,一次结束

-  (void)handleLongPress:(UILongPressGestureRecognizer*)sender {
    if (sender.state == UIGestureRecognizerStateEnded) {
        NSLog(@"UIGestureRecognizerStateEnded");
        //Do Whatever You want on End of Gesture
    }
    else if (sender.state == UIGestureRecognizerStateBegan){
        NSLog(@"UIGestureRecognizerStateBegan.");
        //Do Whatever You want on Began of Gesture
        if (!_endBrowering) {
            [self actionButtonPressed:nil];
        }
    }
}