0
我在我的收藏視圖中使用UILongPressGestureRecognizer,我希望長按手勢識別器只有在滿足某些條件時才應起作用。當滿足某些條件時檢測LongPress
NSString *check;
if([check isEqualToString:@"Enabled"]
{
//long press should be detected. or following method should be called
}
-(void)handleLongPressGesture:(UILongPressGestureRecognizer *)gestureRecognizer
{
}
'shouldRecognizeSimultaneouslyWithGestureRecognizer'不能被用於此目的。 gestureRecognizerShouldBegin是正確的。 –