是否可以在操作表的按钮内使用 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/