내 수업은 UIImageView의 하위 클래스입니다. 나는이UIImageView의 하위 클래스에있는 사용자 정의 초기화 프로그램 - initWithImage 또는 initWithFrame 초기화 프로그램을 덮어 쓸 필요가 있습니까?
@interface FishView : UIImageView
@end
@implementation FishView
- (id)initWithFishType:(FishType)fishType {
self = [super init];
if (self) {
//my custom initialization
}
return self;
}
처럼 내 사용자 정의 초기화가 필요 initWithImage을 무시하는 것입니다 만들?
먼저 빠른 답변을 보내 주셔서 감사합니다. 아마도 나는 커스텀 클래스를 위해 지정된 초기화자를 오버라이드 (override)하는 것과 혼합 할 것이다. – Michael