我有一个UIVIView, 在我使用 UILONPressGressGressRecognize 然后使用 UIPanGestureRecognize 之前, 我在哪里使用 UIPanGestureRecognize 。 对于 UIPGestureRecognize 我得到关于 UILongPressGressDretureRecognize的压力的信息, 但我的应用程序不使用布林, 即使我强制使用, 这总是假的 。 我该怎么做?
-(IBAction)longGesture:(UILongPressGestureRecognizer *)gestureRecognizer{
if(fromRiga ==0){
if ([gestureRecognizer state]==UIGestureRecognizerStateBegan){
self.inLongPress = YES;
self.view.backgroundColor =[UIColor darkGrayColor];
gestureRecognizer.allowableMovement=200;
}else if([gestureRecognizer state]==UIGestureRecognizerStateEnded){
self.inLongPress = NO;
}
}
- (IBAction)panGesture:(UIPanGestureRecognizer *)gestureRecognizer
{
NSLog(@"inLongPress is %@", self.inLongPress ? @"YES": @"NO");
}
提前感谢