-1
초기화 메소드 (이미 초기화 된 태그가있는 인스턴스 생성)를 클래스에서 무시하고 예외를 얻으려고합니다. 코드 샘플 : 정의 id
을 반환하면서 방법의ios - init 메소드를 오버라이드하여 메소드 구현이 선언과 일치하지 않음
@interface DiagnosticsReport : NSObject {
}
@property NSString *tag;
- (void) initWithTag:(NSString*) tag;
@end
@implementation DiagnosticsReport
- (id) initWithTag:(NSString*) tag {
if (self = [self init]) {
_tag = tag;
}
return self;
}
- (id) init {
if (self = [super init]) {
// default init here
}
return self;
}
굉장합니다. 고마워. –