When code with iOS navigation application, I have facing with trouble this:
where can I put the method "initdata" for UITableView? in viewWillAppear or viewDidLoad?
please help me out.
You can put initData as per your requirement of the app,
if your table needs to load data every time with new Data then it should be under
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
//initData
}
Otherwise, if the table needs to be reload by a single Data which doesn't vary or there is not any editing operation performed on Data , you should use
- (void)viewDidLoad {
[super viewDidLoad];
//initData
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With