Separate names with a comma.
Discussion in 'iOS Programming' started by teguh123, Mar 26, 2011.
Is this because all classes are effectively an interface of NSObject?
It has nothing to do with inheritance from NSObject. The keyword is @interface because that is what you're declaring, the variables/properties/methods that a developer will use to interface with your class.
It's just an Objective-C keyword, no need to think about it for too long.
It makes sense when you think about its counterpart, @implementation. You declare the class' interface (i.e. how you can interface with it) in the header file, and then the implementation of the things listed in the interface goes in the .m file.
You also need to think about the compiler that is build in, think about how that works.
U basicly tell the compiler like this, make these these and these methods/variables in this viewController header file & then in the M file, u basicly tell it to get it from the header file, via the implementation.
This is not the right way to put it, but in big lines it is.
Think u can get a more nerdy explenation somewhere x)