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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:35:35+00:00 2026-05-18T01:35:35+00:00

I created a subclass of UITextView and now I want to extend the default

  • 0

I created a subclass of UITextView and now I want to extend the default UIMenuController by adding some buttons. Performing the extension is no problem at all, I just need to add some UIMenuItem so the menuItems array of the shared instance of the UIMenuController.

My question is now: Where do I perform this manipulation? The MenuController is a singleton implementation, so every change I make will affect all the other views that support the menu. So where am I going to add the extra menu items and where do I later remove them again? I am searching for some kind of equivalent to the UIViewController’s viewWillAppear method.

Or am I worrying way too much and it is perfectly good practice to implement it in the view controller of the view containing my UITextView subclass?
However, this means that every view controller containing my class as subview would have to implement the same code. Is there a better way?

Edit: Another option is of course to keep the selectors for my class unique and have all other custom views return NO for the selector in -respondsToSelector:. This seems to be the best solution so far to me.

What is the best practice?

  • 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-05-18T01:35:36+00:00Added an answer on May 18, 2026 at 1:35 am

    It turns out that it works fine to add the items in the app delegate. You need to make sure of course, that other Views supporting the MenuController return NO for your particular selector in -respondsToSelector:.

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

Sidebar

Related Questions

I created a ComboBox subclass and added my functionality. Now I want to expose
I created an UIViewController subclass, and figured out that the default implementation of -loadView
I want to subclass UITextView, and send a new message to the delegate. So,
I came across a strange problem today. I created a subclass of UIView and
I've created a subclass of UIImage (UIImageExtra) as I want to include extra properties
I created a subclass of AFHTTPClient and am trying to send some JSON parameters
I created a subClass of UITextView with a searchBar, here is the code: #import
I've got a UITextView inside a UITableViewCell subclass. I have no problem getting the
I've created a subclass of Array and written some messages for it that have
I have created a subclass of a UITableViewCell that I am using with some

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.