In UITextview
when touch is pressed for the longer time magnifying glass shows up. How can i disable it.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- Get the NSRange for the visible text after scroll
- how do you prevent page scroll in textarea on mobi
相关文章
- UITableView dragging distance with UIRefreshContro
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
Finally this issue is also resolved
Here is the code for reference in case anyone needs
in the m file of subclassed UITextview added code
It works.
@Irina's answer works partially (Try a tap followed by a long press and you will have a magnifying overlay) for iOS 9.x and crashes on iOS 10 with the following:
The following code works both for iOS 9.x and 10.x in every combination of tap and/or long gestures I could think of.
We need
UIScrollViewDelayedTouchesBeganGestureRecognizer
andUIScrollViewPanGestureRecognizer
in order to keep theUITextView
ability to scroll. Both classes are part of private API so use that at your own risk.Swift 4 version of @user1120133's answer:
This works for me