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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:50:39+00:00 2026-05-28T15:50:39+00:00

when writing interface and implementation files, is there a middle found between choosing one

  • 0

when writing interface and implementation files, is there a middle found between choosing one class of objects to use as arguments or to be returned and using id? That is, can I choose a collection of classes that could be used instead of just one specific one or any object type (id)?

  • 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-28T15:50:40+00:00Added an answer on May 28, 2026 at 3:50 pm

    You could specify that the Objective-C type must conform to a protocol. NSObject is both a class and a protocol. So, one idea would be to specify id<NSObject>.

    Or, alternatively, have your protocol extend the NSObject protocol. You’ll need that if you want use of methods such as respondsToSelector.

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

Sidebar

Related Questions

I am writing an interface to a sorted collection of objects. As is the
I'm currently writing a class that implements the SeekableIterator interface and have run into
I am writing (junit) unit tests for a class which implements an exposed interface
I'm writing an Objective-C++ class interface that has to be usable from both Objective-C
I'm currently writing an interface to allow applications to send exception data to a
I'm writing a web interface to MySQL that executes a couple queries and returns
I am writing a firefox extension that interacts with a JSON server interface. I
I'm writing a plugin (dll file), and I'm creating a WinForm as its interface/dialog.
My first question =). I'm writing a video game with a user interface written
Is it possible to store randomly accessed files (both on writing and reading) in

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.