在 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;
}
有效.
这篇关于在 UITextview 中禁用放大镜的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!