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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:10:10+00:00 2026-05-14T06:10:10+00:00

I have common functionality that I need to access from all screens of my

  • 0

I have common functionality that I need to access from all screens of my app: a right bar button item and associated action.

So as not to repeat the code I would like to set this up in a custom UIViewController and have all my view controllers inherit from it.

- (void)viewDidLoad {
    UIBarButtonItem *rightBarButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemPlay target:self action:@selector(lightsCamera)];
    self.navigationItem.rightBarButtonItem = rightBarButton;
}

- (void)lightsCamera {
    …
}

However, I have a number of UITableViewControllers however and I would like to know if it is possible for them to inherit the functionality too?

  • 1 1 Answer
  • 1 View
  • 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-14T06:10:11+00:00Added an answer on May 14, 2026 at 6:10 am

    It’s fairly trivial to recreate you own UITableViewController from your custom UIViewController subclass.

    The controller must have a UITableView property, which is also set to its view property, set the proper resizing masks, set yourself as the table’s delegate and datasource, and remember to flash the scrollbar indicators in -viewDidAppear: and you’ve more or less got it.

    More here.

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

Sidebar

Related Questions

i have several controllers which will all be using common functionality. So i have
We have a common functionality we need to share among several applications. We already
I have several solutions, each containing multiple projects, that all need to reference a
In my app I have common methods and attributes that I would like available
I have a common comms library that i have written to communicate with our
I have a common problem that I never know how to solve with CSS:
I have a Wicket AuthenticatedWebApplication which has several pages and features that need to
I have a common problem in my application where I extract functionality into classes
I have a heirarchy of classes that get initialized from a database. I am
I have two Java class hierarchies that share a common ancestor and implement a

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.