10
我发现从here一些示例代码。+(无效)初始化在Objective-C类静态变量构造函数
static UIImage *backgroundImageDepressed;
/**
*
*/
@implementation DecimalPointButton
+ (void) initialize {
backgroundImageDepressed = [[UIImage imageNamed:@"decimalKeyDownBackground.png"] retain];
}
是这样的 - +(void) initialize
方法在目标C中初始化一个类(接口)的静态变量?我从来没有见过这个。