Disabling Magnifying Glass in UITextView in an iPhone App

Disabling Magnifying Glass in UITextView in an iPhone App

By : alexdavid4
Date : November 21 2020, 07:01 PM
seems to work fine You have to create a subclass and override these two functions to disable select/select all/copy/ and magnifying
select/select all/copy/:
code :

Share : facebook icon twitter icon
I don't want that magnifying glass appears below UITextView

I don't want that magnifying glass appears below UITextView

By : Eugen
Date : March 29 2020, 07:55 AM
I hope this helps you . You need to subclass the UITextView and override canPreformAction like this :
code :
- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
    BOOL can = [super canPerformAction:action withSender:sender];

    if(action == @selector(paste:) || action == @selector(selectAll:) || action == @selector(select:))
        can = NO;

    return can;
Disable Magnifying Glass in UITextview

Disable Magnifying Glass in UITextview

By : mathswoman
Date : March 29 2020, 07:55 AM
With these it helps Finally this issue is also resolved
Here is the code for reference in case anyone needs
code :
-(void)addGestureRecognizer:(UIGestureRecognizer *)gestureRecognizer 
    //Prevent zooming but not panning
    if ([gestureRecognizer isKindOfClass:[UILongPressGestureRecognizer class]]) 
        gestureRecognizer.enabled = NO;
    [super addGestureRecognizer:gestureRecognizer];
how to know magnifying glass is dismissed in UITextView

how to know magnifying glass is dismissed in UITextView

By : prai
Date : March 29 2020, 07:55 AM
This might help you Thank you guys who helped me to analyze this problem, and finally I find the solution. My real problem is when I rotate my device, the selection is lost. During the rotation, I redraw the textView as well as reset its text. When we reset the text of UItextview, its property selectedRange will be reset too, that's why the selection is lost. Thank you jimpic and NobleK :)
UITextView with large font size and magnifying glass

UITextView with large font size and magnifying glass

By : Steveedgerton
Date : March 29 2020, 07:55 AM
may help you . Ok, managed to disable magnifying glass without removing the ability to move curser.
To do that, I removed the UILongPressGestureRecognizer to get rid of magnifying glass. Then used my UIPanGestureRecognizer to track the touch location of the user
code :
CGPoint currentPos = [panRecognizer locationInView:self];
UITextPosition *cursorPosition=[self closestPositionToPoint:CGPointMake(currentPos.x, currentPos.y)];
[self setSelectedTextRange:[self textRangeFromPosition:cursorPosition toPosition:cursorPosition]]; 
UITextView with magnifying-glass and no keyboard

UITextView with magnifying-glass and no keyboard

By : user3170834
Date : March 29 2020, 07:55 AM
I think the issue was by ths following , When using a UITextView one usually gets a keyboard to edit the contents; and by touching it one also gets a magnifying glass to help bring the cursor in the desired position. Is it possible to get the magnifying glass to position the cursor but at the same time eliminate the keyboard? , Sure it's possible. Try this
code :
textView.inputView = [UIView new]
Related Posts Related Posts :
  • iPhone: value of selectedIndex for tab should be consistent, but isn't
  • how to send MMS from the iphone by programming?
  • Is it a good idea to use ASIHTTPRequest library with three20?
  • Auto launch the video player in Android from the browser like an iPhone does
  • Subview Doesnt AutoSize When Added to Root View Controller
  • How to implement UITableView with multiple columns and sideways scrolling
  • How to run/port MongoDB on iPad?
  • How to insure MFMailComposeViewController doesnt send email when body is not empty?
  • How to add ANY language in app description on AppStore? Tremendous impact on downloads!
  • Play multiple audio files using AVAudioPlayer
  • Infinite loop when adding CATiledLayer to UIView
  • How can I detect if an iPhone OS device has a proximity sensor?
  • setNeedsDisplayInRect: paints a white rectangle only
  • iPhone in App purchase : Working but Not
  • How do I debug production push notifications using Xcode?
  • Possible to play a sound without stopping music?
  • XML Processing on iPhone: What is the best option?
  • iphone Json POST request to Django server creates QueryDict within QueryDict
  • How do I make a UIAlertView appear only once, at the first start-up of an iPhone app?
  • invoking iphone address book within another application?
  • Draw triangle iphone
  • Changing font size of tabbaritem
  • Dynamically add a new row as Add in UITableView in edit mode?
  • Play an audio file using RemoteIO and Audio Unit
  • Can I change the Bundle Identifier in my app after it's been approved?
  • MKMap Annotations when clicked show a View controller instead of Popup box
  • iPhone - possible to not show keyboard but still show the cursor in a UITextField?
  • Lazy load pages in UIScrollView
  • how to display CFStringType? Like kABHomeLabel
  • how can i load a display in tableview header section iphone?
  • iPhone native app + integrate payment / purchase to buy products
  • How can I do metering/average peak power level in OpenAL?
  • IPhone and Android website design
  • Xcode Project Code Changes Not Updating 100% After Save-Build-Run
  • NSString drawAtPoint Crash on the iPhone (NSString drawAtPoint)
  • Save UIwebview contents to photo gallery
  • Change width of UIImageView
  • iPhone: Group by month - Core Data
  • NSUndoManager grouping problem?
  • iPhone: Override UIButton buttonWithType to return subclass
  • Iphone sdk, Rounded UIImageView FRAME corners, not just masking it
  • iPad application crash in Apple review - cannot replicate in simulator, have crash log
  • Setting tick marks for UISlider
  • Can we add UILabel to splash screen in iphone?
  • iPad custom Keyboard GUI
  • striking through the text
  • Push Notification in Iphone application
  • How to turn off the bounce in UIWebView
  • Updated iphone application not live yet
  • Exposing python api over the network for an iphone application
  • Create a table of contents from a pdf file
  • Blurred PNGs on UIView, using Interface Builder
  • UIWebView NSURLRequestReloadIgnoringLocalCacheData doesn't actually ignore the cache
  • uitableview reloadData issue
  • UIView animation along a round path?
  • UITabBarController detect tab clicks
  • iPhone objective-c autoreleasing leaking
  • EXC_BAD_ACCESS with NSAutoReleasePool
  • How to write text on graph x and y-axis intervals points?
  • Mobile Application design: Menu Driven vs Tab Control
  • shadow
    Privacy Policy - Terms - Contact Us © 35dp-dentalpractice.co.uk