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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:55:19+00:00 2026-05-16T02:55:19+00:00

I have the following category: @interface UIViewController (Additions) – (void)exampleMethod; @end —– #import UIViewController+Additions.h

  • 0

I have the following category:

@interface UIViewController (Additions)

- (void)exampleMethod;

@end

-----

#import "UIViewController+Additions.h"

@implementation UIViewController (Additions)

- (void)exampleMethod {
    NSLog(@"Example.");
}

@end

I also have the following abstract class:

@interface DFAbstractViewController : UIViewController

@end

-----

#import "DFAbstractViewController.h"
#import "UIViewController+Additions.h"

@implementation DFAbstractViewController

@end

And here’s the concrete class:

#import "DFAbstractViewController.h"

@interface DFConcreteViewController : DFAbstractViewController

@end

-----

#import "DFConcreteViewController.h"

@implementation DFConcreteViewController

- (void)viewDidLoad {
    [self exampleMethod];
}

@end

Okay. So it’s my understanding that the concrete class, DFConcreteViewController, can use methods imported from a category in its superclass, DFAbstractViewController. This is correct, because the method call works as expected.

The problem is Xcode is giving me the following warning: 'DFConcreteViewController' may not respond to '-exampleMethod'.

I don’t see how this method and its availability to DFConcreteViewController isn’t completely clear to the compiler? Perhaps I’ve misunderstood something about categories?

  • 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-16T02:55:19+00:00Added an answer on May 16, 2026 at 2:55 am

    Right. I figured it out. It was an elementary mistake and one for which I feel rather foolish. If you want your category methods to be visible to subclasses, make sure to import your category in your header:

    #import "UIViewController+Additions.h"
    
    @interface DFAbstractViewController : UIViewController
    
    @end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following tables category, Restaurant, and menu. A restaurant can have more
I have following Table with records for ActivityLog: ID, UserId, Category, Created 1 11
I have following object structure, deseralized from XML (WS): <ns2:Category> <ns2:CategoryId>800003</ns2:CategoryId> <ns2:CategoryName>Name1</ns2:CategoryName> <ns2:Categories> <ns2:Category>
I have the following hierarchical table: Table Category: CategoryId, ParentCategoryId, CategoryName 1, null, SomeRoot
I have the following relationship: Post hasMany Comment Post belongsTo Category Post HABTM Tag
If I have defined the following types: type category = Noun | Verb |
I have the following code: $(document).ready(function() { // Manage sidebar category display jQuery(#categories >
I have a following HQL query: SELECT s.id FROM stack s WHERE s.category is
If I have the following class defined, class Category { /** * * @var
I have the following script currently, which gets the category IDs as arrays: $sql_select_categories

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.