Displaying text in UILabel in iPhone
- by SeniorLee
OK. What's wrong with my code?
- (void)viewDidLoad {
[super viewDidLoad];
lblResult = [UILabel alloc];
}
- (void)viewWillAppear:(BOOL)animated {
lblResult.text = @"BlahBlah";
}
I linked lblResult to Label object in IB well. But the label only shows the default text. Where's my BlahBlah??
And when the default string I set in the IB actually set to lblResult??
The reason that BlahBlah string is not displyed is I guess because lblResult.text is over-written by default string specified from IB. Just my guess.
Can anyone make me clear with that?