I am currently creating my first app for a personal project and I'm having trouble modifying a UILabel's properties when MyViewController is loaded.
From other tutorials, I see that when the nib for my app is unarchived, the initWithCoder app is called:
@synthesize tipText; //references the UILabel i created in my nib file
- (id)initWithCoder:(NSCoder *)coder {
if (self = [super initWithCoder:coder]) {
self.tipText.layer.cornerRadius = 8; //the UILabel property i wish to modify
}
return self;
}
However, when the above code runs, the tipText is not bound to any memory yet.
Where should i place my self.tipText.layer.cornerRadius
code such that tipText
is initialized and before the UILabel is displayed in my UI?