Cannot assign to 'self' outside of a method in the init family

Cannot assign to 'self' outside of a method in the init family

实例化函数名的开头必须是initxxxx且是小写开头:如下

+ (instancetype)fooWithBar:(NSInteger)bar;

+ (instancetype)initWithBar:(NSInteger)bar;

你可能感兴趣的:(Cannot assign to 'self' outside of a method in the init family)