#import <Foundation/Foundation.h>

 @interface XXObject :NSObject

 @end

 @implementation XXObject

 +(void)load{

    NSLog(@"XXObject load");

}

@end

int main(int argc, const char * argv[]) {

    @autoreleasepool {

        // insert code here...

        NSLog(@"Hello, World!");

    }

    return 0;

}

//运行结果:(显然先执行load 方法)

2017-05-19 10:41:51.090320 LoadTest[99069:13403889] XXObject load

2017-05-19 10:41:51.095309 LoadTest[99069:13403889] Hello, World!

Program ended with exit code: 0

相关文章:

  • 2021-10-17
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2021-08-30
  • 2022-01-10
  • 2022-12-23
  • 2021-06-22
  • 2021-06-20
相关资源
相似解决方案