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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:07:48+00:00 2026-05-26T18:07:48+00:00

I developed some application ’till now. Now I’m writing a new one and in

  • 0

I developed some application ’till now. Now I’m writing a new one and in this project I want to keep the code very clean, so it’s very easy to find the methods.
I want to start with the UIViewControllers whose view have a UITableView as subview. I wish to have a file with the name DetailViewController for all functions which belong directly to it. Another file with the name DetailViewController+Protocols should contain a category of the class above and all these delegate methods of UITableView.

Is it possible to do something like this? I want to keep my code clean and split it into multiple files.


EDIT

DetailViewController.h

@interface DetailViewController : UIViewController

... Some Properties

... Some Methods

@end

DetailViewController.m

#import "DetailViewController.h"

@implementation DetailViewController

... Some Synthesizes

... Some Methods

@end

DetailViewController+Protocols.h

@interface DetailViewController (Protocols) <UITableViewDelegate, UITableViewDataSource>

@end

DetailViewController+Protocols.m

@implementation DetailViewController (Protocols)

- (NSINteger)numberOfSections
{
    return ...;
}

- (NSInteger)numberOfRowsInSection:(NSInteger)section
{
    if (section == 0)
        return ...;

    return ...;
}

...

@end

But then Xcode shows a warning that some of the delegate methods are not implemented in DetailViewController. I also tried it with importing the DetailViewController+Protocols.h in the DetailViewController.h. No changing.
Then I tried it with ignoring the warnings and see: It worked! But why? Shouldn’t it work without these warnings?

  • 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-26T18:07:48+00:00Added an answer on May 26, 2026 at 6:07 pm

    Yes it is. The only thing to keep in mind with categories is that you cannot @synthesize properties in them. Adding ivars in categories is more difficult as well.

    See this for more info on that.

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

Sidebar

Related Questions

I have developed a Java application and now i want to give some simple
I've developed some web-based applications till now using PHP, Python and Java. But some
I have developed some android application like Phonegap. I want to make a jar
i want to establish communication in some different application. all application has been developed
In code I have developed some years ago I have been using this a
I am working on some 'call-control' application to be developed in wpf. I want
I have developed some matlab functions for voice authentication. And now I want to
I have developed application for drawing some shapes (lines mostly) , now i need
Actually i have developed one android application, but when performing some operations out of
I am writing a desktop application written in Swing developed using Java 1.5. 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.