here에서 몇 가지 샘플 코드를 발견했습니다.+ (void) objective-c 클래스 정적 변수 생성자에서 초기화
static UIImage *backgroundImageDepressed;
/**
*
*/
@implementation DecimalPointButton
+ (void) initialize {
backgroundImageDepressed = [[UIImage imageNamed:@"decimalKeyDownBackground.png"] retain];
}
이런 식입니까? +(void) initialize
메서드는 Objective C에서 클래스 (인터페이스)의 정적 변수를 초기화합니까? 나는 전에 이것을 본 적이 없다.