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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:37:36+00:00 2026-06-14T23:37:36+00:00

Say i create a viewController. Then I want to create another viewController that’s like

  • 0

Say i create a viewController. Then I want to create another viewController that’s like the first one. Looks like a job for inheritance.

However, many of the task of the originalViewController are private methods and I want to minimize public interface.

If I declare those methods public then well, the objective of keeping private things private is not achieved.

If I declare those methods private, then the child class do not know those methods.

If I create a special .h files for the child class, it’ll be awkward.

So what’s the industry standard way of doing this sort of thing anyway?

In C++ we would use protected methods or function to accomplish this right?

Update:

I put

#import "BGGoogleMap+protected.h"

@implementation BGGoogleMap ()

@end

It doesn’t work. It asks for identifier.

  • 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-14T23:37:37+00:00Added an answer on June 14, 2026 at 11:37 pm

    In addition to what Catfish_Man suggests, you can make categories on your class that only your subclasses have access to. Here are the docs for how to do that. Basically, you just create a new interface for your class and put any private methods in there. Like this:

    @interface MyClass (MyClass_Private)
    // Method declarations
    @end
    

    Put those in Foo_Internal.h, and include Foo_Internal.h in your subclasses, but don’t make it public.

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

Sidebar

Related Questions

Let's say I have a viewcontroller ViewBViewController. In that viewcontroller I create an instance
Is that correct, when ViewController creates another ViewController inside its' methods (let's say viewDidLoad
First of all, I just want to say that I begin at Objective-C. Here
Say I create one object and add it to my ArrayList . If I
Say you create a directory like: CREATE OR REPLACE DIRECTORY EXT_DATA_FILES AS '/data/ext_data_files'; GRANT
Say I create some object class like so public class thing { private String
Let's say I create an instance of a class and want to assign some
Let's say I create a jagged 2d array like so: public static char[,] phoneLetterMapping
Let's say that I create a vector/array in Scheme: (let* ((x #(1 2 3)))
There are other posts that say you can create a control in windows forms

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.