是否可以在操作表的按钮内使用UILongPressGestureRecognizer?

如果触摸或长按,是否可以在操作表内做其他事情?

谢谢

最佳答案

是的你可以

UIActionSheet *action = [[UIActionSheet alloc]initWithTitle:@"title" delegate:(id)self cancelButtonTitle:@"ok" destructiveButtonTitle:@"option" otherButtonTitles:nil, nil];

    [action showInView:self.view];

    UILongPressGestureRecognizer *longtaped = [[UILongPressGestureRecognizer alloc]initWithTarget:self action:@selector(recog)];

    [action addGestureRecognizer:longtaped];

它会很好地工作
干杯

关于ios - 长按内部操作表选项,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/30436032/

10-12 14:40
查看更多