I'm a Objective-C newbie and I'm 开发者_运维技巧currently trying to build an app which has a UITextField
(called "initial_dose") and I'm wondering how can I set a default value which will be visible straight after the application is loaded.
I kind of know how to set the value but not sure where I need to call this?
initial_dose.text = "@myInitialVal";
Thanks a lot in advance!
Yes, in :
- (void)viewDidLoad {
[super viewDidLoad];
initial_dose.text = @"myInitialVal";
}
Which should I use, -awakeFromNib or -viewDidLoad? - for more info.
精彩评论