ios - tableview execute before web service call resulting in a blank tableview -
i want populate data tableview web service call. tableview numberofrowsinsection executes before results web service call(which brings data immediately) here code:
- (void)viewdidload { [super viewdidload]; routes = [[nsmutablearray alloc] init]; [self loaddatawithstopname:@""]; [self.tblview reloaddata]; }
.h:
@interface viewcontroller : uiviewcontroller<uitableviewdelegate, uitableviewdatasource>
as can see, tried reloaddata on tableview property, did not work.
i guess call web service asynchronous in loaddatawithstopname
.
means reloaddata
called if web service call not finished yet.
have make sure call reloaddata
after data loaded. in callback method of web service call.
Comments
Post a Comment