ios - UITableView dynamic cell content -


i use create uitableview labels created using nsarray. followed tutorial here. i'm trying create uitableview dynamic content extracted server. pulling of data works nicely json assign such:

- (void)connectiondidfinishloading:(nsurlconnection *)connection {     nsstring *responsestring1 = [[nsstring alloc] initwithdata:responsedata1 encoding:nsutf8stringencoding];      nslog(@"%@",responsestring1);      sbjsonparser *parser = [[sbjsonparser alloc] init];     id sample = [parser objectwithstring:responsestring1];      tempholder=[nsmutablearray arraywithcapacity:[sample count]];      (int = 0; < [sample count]; i++) {         [tempholder addobject:[[sample objectatindex:i]objectatindex:0]];         //nslog(@"%@",[sample objectatindex:i]);         nslog(@"%@",[tempholder objectatindex:i]);     } } 

so how replace

tabledata = [nsarray arraywithobjects:@"item", @"item",             @"item", @"item", @"item", @"item", @"item",             @"item", @"item", nil]; 

which in

- (void)viewdidload 

with 'tempholder' nsmutablearray?

thanx in advance...

set tempholder array tabledata , reload table view @ end of connectiondidfinishloading: method.

tabledata = tempholder; [self.tableview reloaddata]; 

Comments

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

r - Update two sets of radiobuttons reactively - shiny -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -