Varieties of @interface declarations, some with parentheses
问题 I've noticed a variety of @interface declarations for Objective-c classes. I'd like to understand why developers declare @interface in the following ways: // in the .h file @interface MyClass : NSObject // ... @end // in the .m file (what's the purpose of the parens?) @interface MyClass () // more property declarations which seem like they can go in the .h file @end // again in the .m file (what's the purpose of private?) @interface MyClass (Private) // some method declarations @end 回答1: This