1

What is the difference between id and id<NSObject>. Isn't the <NSObject> redundant as every object conforms to this protocol.

1 Answer 1

3

Id is an instance of any class, not necessarily one that inherits from the NSObject class. Unlike Java's Object, NSObject isn't the "one true base class" from which every class inherits. So no, not all objects conform to the NSObject protocol, meaning the <NSObject> isn't redundant.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.