问题描述
在 UITextview 中,当长按触摸时放大镜会出现.如何禁用它.
In UITextview when touch is pressed for the longer time magnifying glass shows up. How can i disable it.
推荐答案
最后这个问题也解决了
这是供任何人需要时参考的代码
Here is the code for reference in case anyone needs
在子类UITextview的m文件中添加代码
in the m file of subclassed UITextview added code
-(void)addGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer { //Prevent zooming but not panning if ([gestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) { gestureRecognizer.enabled = NO; } [super addGestureRecognizer:gestureRecognizer]; return; }
有效.