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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:36:29+00:00 2026-06-08T04:36:29+00:00

Question is in title. Code example: UIViewController <MyProtocol> *viewcontroller = …; [viewcontroller methodFromProtocol]; //

  • 0

Question is in title. Code example:

UIViewController <MyProtocol> *viewcontroller = ...;

[viewcontroller methodFromProtocol]; // I expect to be able to call all methods that the protocol defines

//UIViewControllerSubclass implements MyProtocol

UIViewControllerSubclass *viewControllerSubclassWithoutMyProtocol = [[UIViewControllerSubclass alloc] init];
[viewControllerSubclassWithoutMyProtocol methodThatIsNotInTheInterfaceIsDisplayedHere]; // I only expect to be able to call the methods that are defined in this class' interface even though this class implements MyProtocol
  • 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-08T04:36:31+00:00Added an answer on June 8, 2026 at 4:36 am

    Your question isn’t completely clear, but I think you are asking if you can “privately” conform to a protocol?

    This can be done by declaring that you conform to the protocol inside the implementation file, rather than the interface file. With view controllers, you can do this in the class continuation that is generated for you automatically in the .m file, otherwise you’ll need to add the class continuation in yourself:

    @interface MyVCSubclass () <MyProtocol>
    

    Now, any class that imports only the header file will not know your controller conforms to the protocol.

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

Sidebar

Related Questions

First of all sorry for the intriguing title of my question, hopefuly a code
I am getting the error specified in the question title for the following code
Question is already been asked in title. Here is a code: (function($){ var filter
Title is most of the question, what allows this to be valid code? Is
This is probably a really silly question but, given the example code at the
A seen in the title, here the HTML Code example: <body> <!--CODE_START--> <p>I <strong>Want</strong>
First of all, I'd like to ask to correct my question title if something
I'm re-asking this question because the code and example is wrong (it actually works
Just what the question title says. I'm using SpringMVC, but that's irrelevant really. I
First of all I don't know how to phrase the question title, sorry if

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.