iOS中interface、implementation、category、extesion

具体用法请参考【iOS】Category VS Extension 原理详解

以下在语法上都没错

@interface Object : NSObject
@end

@interface Object()  // 我靠,可以这样。。。。// 实际上是Extesion
@end

@implementation Object
@end
@interface ViewController : UIViewController
@end

@interface ViewController ()

@end

@interface ViewController ()

@end

你可能感兴趣的:(iOS中interface、implementation、category、extesion)