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 8321421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:00:38+00:00 2026-06-08T23:00:38+00:00

I am working in the iPhone app using UITextView. I want to allow the

  • 0

I am working in the iPhone app using UITextView. I want to allow the user only can Copy the message and Paste the message. But i don’t want to show Select all, Select, Define and others. I am following this below code to control the options. But, all the options are showing in UITextView click.

- (BOOL)canPerformAction:(SEL)action withSender:(id)sender
{
    if (action == @selector(paste:))
    {
        return NO;
    }
    else if (action == @selector(copy:))
    {
        return NO;
    }

    return [super canPerformAction:action withSender:sender];
}

Can anyone please help me to do this. And also i don’t want to show |.Text.| while copying the message. Please help me to do this. Thanks in advance.

  • 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-08T23:00:40+00:00Added an answer on June 8, 2026 at 11:00 pm

    First of all if the code you have above isn’t working then you probably forgot to change the class of you UITextView to your custom class that implements the method above.

    Once you’ve done that what you’ve got should work and you should then return no for select all also

       if (action == @selector(selectAll:))
            {
                return NO;
            }
    

    also you may want to return no for cut: also assuming you don’t want the user to remove text from the textView.

    Also these don’t need to be if else statements as they don’t depend on each other

    They are actually called in this order

    cut:
    copy:
    select:
    selectAll:
    paste:
    delete:

    So remove functionality as appropriate.

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

Sidebar

Related Questions

Am working in an iPhone app using UITextView. I am trying to increase the
I am working an iPhone app which is using CLLocationManager. When a user goes
Im working on an iphone web app using JQTouch , im just wondering what
I am working on an iPhone mobile web app using jqtouch to make it
I am working in the iPhone messaging app. Am using coredata to store the
I'm working on an iphone app and want to have a page showing multiple
I'm working on an iPhone app that offers the user the opportunity to send
I'm working on an iPhone app using the 3.1.3 SDK, my app finds the
I am working on an iPhone app using a SQLite db. I have some
I am working on an iPhone Web App using HTML & CSS. I have

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.