I want to implement a custom initialization method for my UIViewController subclass to "replace" the initWithNibName method.
This is the code:
- (id) initWithMessage:(NSString *)message {
if ((self = [super initWithNibName:@"ToolTip" bundle:nil])) {
label.text = message;
}
return self;
}
The label is loaded from xib but at this point the reference to the label is nil (probably because the xib is not loaded yet?). Does anyone know a solution for that? Thanks