Answer the question
In order to leave comments, you need to log in
Subclasses and methods with the same name. How to be?
Task:
There is a ViewA class and ViewB inherited from it with 2 designated initializers each. Both have a configure method called from each initializer:
- (instancetype)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
if (self) {
[self configure];
}
return self;
}
//...
- (void)configure {
// Create some subviews etc
}
ViewA *view = [[ViewA alloc] initWithFrame:someFrame];
[view configure];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question