Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8619269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:18:04+00:00 2026-06-12T06:18:04+00:00

Am working for am message based iPhone app. In my application i have loaded

  • 0

Am working for am message based iPhone app. In my application i have loaded the message content in UITextView and added an UIImage on UITextView.

Now i want to select all UITextView content by holding UITextView and show the Copy option to the user. Currently when the user hold UITextView some of the content only selecting.

Any one please help me to do this? Thanks in advance.

EDIT:

In UITableView CellForRowAtIndexPath delegate

    customMessageTextView = [[MessageTextView alloc] initWithFrame:CGRectZero];
    customMessageTextView.tag = 100;
    UIFont *font = [UIFont fontWithName:@"Helvetica" size:15]; 
    customMessageTextView.font = font;
    customMessageTextView.scrollEnabled = NO;
    customMessageTextView.delegate = self;
    customMessageTextView.dataDetectorTypes = UIDataDetectorTypeLink;
    [cell.contentView addSubview:customMessageTextView];
    [customMessageTextView sizeToFit]; 

    for (UIGestureRecognizer *recognizer in customMessageTextView.gestureRecognizers) 
    {
        if ([recognizer isKindOfClass:[UILongPressGestureRecognizer class]])
        {
            recognizer.enabled = NO;
        }
    }


    UILongPressGestureRecognizer *myLongPressRecognizer = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(selectAllTextFromCustomMessageTextView)]; 
    [customMessageTextView addGestureRecognizer:myLongPressRecognizer];
    [myLongPressRecognizer release];

UILongPressGestureRecognizer action:

-(void) selectAllTextFromCustomMessageTextView
{
    NSLog(@"Select All Text Messages");
    customMessageTextView.selectedRange = NSMakeRange(0, customMessageTextView.text.length);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T06:18:05+00:00Added an answer on June 12, 2026 at 6:18 am

    If I understand you correctly you want to disable the standard behaviour when holding in a UITextView (i.e. the magnifying glass, etc.). Perhaps you have even disabled the editing option. If so you should just add an UILongPressGestureRecognizer to your UITextView. You might have to disable the UILongPressGestureRecognizer which is built into UITextView by default. You can find a way to do that here.

    Then in your UILongPressGestureRecognizer action method you simply select all the text in the view:

    [textView selectAll:self];
    

    Notice that this will bring up the Copy/Cut/Paste menu. However, if your text view does in fact have user editing disabled the menu will only contain Copy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Am working in message based iPhone app. I have added UITextView to show the
Am working on Message based iPhone app. I have to pass numbers to Webservice
Am working in Messaging based iPhone app. I have added Beep sound to receive
I am working on a message based iPhone app. I have a screen to
I am working in SMS message compose iPhone app. I want to design the
My iPhone app (based on the Single View Application of Xcode) has a UITextView
Hi I am working on a Vb.Net application . I have a compose message
I have been working on an iPhone app that has a feature of uploading
We are working on some Java EE based distributed application. It involves multiple message
I am working in UITabBarController based iPhone app. My app having 5 taps .

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.