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

Popular posts from this blog

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -