Objective-cクラスのさまざまな宣言に気付きました。私は、開発者が@interface
を宣言する理由を次の方法で理解したいと思います。これまで.m
ファイルに行く何@interface宣言の種類、いくつかはかっこ付き
// 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
たとえば:[クイック検索](http://stackoverflow.com/search?q=%5Bobjc%5D+%40interface+parentheses&submit=search)は、HTTPをターンアップ://stackoverflow.com/questions/7378479/what-does-the-text-inside-parentheses-in-interface-and-implementation-directive –
[言語仕様](http://developer.apple.com)を見てどうですか? .com/library/mac/documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocDefiningClasses.html#// apple_ref/doc/uid/TP30001163-CH12-SW1)? –