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

  • Home
  • SEARCH
  • 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 8086167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:21:59+00:00 2026-06-05T18:21:59+00:00

My view controller is getting a little large for me. I’m implementing five delegate

  • 0

My view controller is getting a little large for me. I’m implementing five delegate protocols and was about to add a sixth.

ABCViewController : UITableViewController<NSFetchedResultsControllerDelegate,
                                          UITableViewDelegate,
                                          UITableViewDataSource,
                                          UIAlertViewDelegate,
                                          CLLocationManagerDelegate>

One controller to implement them all seems ridiculous, but they aren’t being used anywhere else. Should these be in their own classes or in the view controller?

  • 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-05T18:22:01+00:00Added an answer on June 5, 2026 at 6:22 pm

    You could add categories to ABCViewController, like this:

    1. Move any declarations in ABCViewController.m into a private category in ABCViewController.h

    // in ABCViewController.h
    @interface ABCViewController : UIViewController <delegates>
    // anything that's in the _public_ interface of this class.
    @end
    
    @interface ABCViewController ()
    // anything that's _private_ to this class.  Anything you had defined in the .m previously
    @end
    

    2. ABCViewController.m should include that .h.

    3. Then in ABCViewController+SomeDelegate.h and .m

    // in ABCViewController+SomeDelegate.h
    @interface ABCViewController (SomeDelegateMethods)
    
    @end
    
    // in ABCViewController+SomeDelegate.m
    #import "ABCViewController+SomeDelegate.h"
    #import "ABCViewController.h"  // here's how will get access to the private implementation, like the _fetchedResultsController
    
    @implementation ABCViewController (SomeDelegateMethods)
    
    // yada yada
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a little question about getting access to a method in another controller,
I'm getting a white screen after presenting a modal view controller. This is how
I am getting leaks in Master view controller of iPhone. When I call this
having issues getting a value from a NSString in my view controller to my
I've got a little problemo. In my CodeIgniter Controller I'm loading the same view
Preamble: The view controller's view I'm talking about is used in a UISplitViewController as
I'm having a problem with my navigation controller. If I add a view controller
I'm getting a little confused about when I should use a NIB file and
I'm trying to dismiss a modal view controller and am getting the following error:
I keep getting the following error: Storyboard (<UIStoryboard: 0x7ebdd20>) doesn't contain a view controller

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.