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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:15:20+00:00 2026-05-26T00:15:20+00:00

Is there ability to insert base class to inheritance hierarchy? Here is an example:

  • 0

Is there ability to insert base class to inheritance hierarchy?
Here is an example:

@interface BaseClass // has a lot of basic functionality and interface
{...}
@end

@interface ChildClass : BaseClass // customizes BaseClass functionality
{...}
@end

@interface BaseClassEx : BaseClass // add some features to base class
{...}
@end

I want to have ChildClassEx that has all methods from ChildClass but is inherited from BaseClassEx

  • 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-26T00:15:21+00:00Added an answer on May 26, 2026 at 12:15 am

    Sounds like multiple inheritance. Objective C doesn’t have it.

    Based on your description, I would suggest a different design pattern.

    @class BaseUtility // has a lot of basic functionality
    {...}
    @end
    
    @class BaseClass // has interface
    {...}
    @property BaseUtility *utility;
    @end
    
    @class ChildUtility : BaseUtility // customizes basic functionality
    {...}
    @end
    
    @class BaseClassEx : BaseClass // add some features to base class
    {...}
    @end
    

    Now you can have four kinds of things.

    1. A BaseClass with a BaseUtility assigned to it, which is like your BaseClass.
    2. A BaseClass with a ChildUtility assigned to it, which is like your ChildClass. It gets customized behavior and has the same interface as BaseClass.
    3. A BaseClassEx with a BaseUtility assigned to it, which is like your BaseClassEx. It has extra features (extra interface I assume).
    4. A BaseClassEx with a ChildUtility assigned to it, which is like the ChildClassEx that you want. It has extra features and customized functionality.

    Class inheritance is the “is a” pattern. The above combines both the “is a” pattern and the “has a” pattern. To get the effect of a ChildClassEx you want, you make something that “is a” BaseClassEx, but “has a” ChildUtility.

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

Sidebar

Related Questions

There has been a lot of discussion over this ability (such as in this
In <insert non-IE browser here> there is the <canvas> element that allows for doing
Within SQL Server Integration Services (SSIS) there is the ability to setup a connection
Aside from DeployerFTP, are there any plugins that offer the ability to deploy a
There are a few ways to get class-like behavior in javascript, the most common
There are several types of objects in a system, and each has it's own
Is there any ability to mock methods that are provided with RIA Services? I
Is there any ability to write applications for the new iPod Nano 6th Generation,
Just wondering if there is the ability to search while in watch? Instead of
Wix has the ability to replace the stock images with custom ones http://wix.sourceforge.net/manual-wix2/WixUI_dialog_library.htm Is

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.