Answer by 9dan for Why use id when we can just use NSObject?
typedef struct objc_object { Class isa;} *id;Above is the actual definition of the id in Objective-C language. Objective-C runtime system is built around id and Class. Nothing have to do with NSObject...
View ArticleAnswer by Jasarien for Why use id when we can just use NSObject?
every object is a subclass of NSObjectThat is an incorrect statement. You can create objects that do not inherit from NSObject. it's not really recommended, but it is possible.NSProxy is an example -...
View ArticleAnswer by justin for Why use id when we can just use NSObject?
id erases the type and it is equivalent to saying "this object responds to any selector visible to the translation". Of course, it is your responsibility to make sure your program is correct when you...
View ArticleAnswer by James Webster for Why use id when we can just use NSObject?
every object is a subclass of NSObjectThat's not correct. You could make an object that extends from nothing as a root class.That's perhaps why id was introduced.
View ArticleWhy use id when we can just use NSObject?
I know that when we want to create an unknown value object we use id. However, I'm curious that why did Apple to choose id which decides it's value during runtime, when every object is a subclass of...
View Article
More Pages to Explore .....