Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat the sequence of UITable view Datasource and delegate when we reload data from table?
    primarykey
    data
    text
    <p>Hello I'm beginner in iOS In one of my activity I want to reload table data ...then I have applied this code .....</p> <pre><code> -(void)buttonpress { for(int i=0;i&lt;buttonarr.count;i++) { NSString *butt=[NSString stringWithFormat:@"%@",[buttonarr objectAtIndex:i]]; for(int j=0;j&lt;LabelTag.count;j++) { NSString *labelbutt=[NSString stringWithFormat:@"%@",[LabelTag objectAtIndex:j]]; if([butt isEqualToString:labelbutt]) { NSIndexPath *indexPath1 =[NSIndexPath indexPathForRow:j inSection:0]; NSLog(@"indexPath %@",indexPath1); UITableViewCell *mycel=[self-&gt;table_AdviseTestDetails cellForRowAtIndexPath:indexPath1]; NSLog(@"cell %@",mycel); UILabel *mybutton=(UILabel*)[mycel viewWithTag:100+j]; // mybutton.selected=YES; NSLog(@"label %@",mybutton.text); r=r+[mybutton.text floatValue]; NSLog(@"r %f",r); } } } range=1; </code></pre> <blockquote> <p>[table_AdviseTestDetails reloadData];</p> </blockquote> <pre><code> netcharges.text=0; z1=0; NSLog(@"label arr %@",LabelArr); for(int i=0;i&lt;LabelArr.count;i++) { NSString *y= [NSString stringWithFormat:@"%@",[[LabelArr objectAtIndex:i] valueForKey:@"value"]]; z1=z1+[y integerValue]; netcharges.text=[NSString stringWithFormat:@"%.2f",z1]; NSLog(@"net %@",netcharges.text); //balance.text=[NSString stringWithFormat:@"%.2f",z]; } netcharges.text=[NSString stringWithFormat:@"%.2f",[netcharges.text floatValue]-r]; NSLog(@"net %@",netcharges.text); point.text=[NSString stringWithFormat:@"%.f",(floor([netcharges.text integerValue]/[[[Point_Result objectAtIndex:0]valueForKey:@"Value"] integerValue]))*[[[Point_Result objectAtIndex:0]valueForKey:@"Points"] integerValue]]; balance.text=netcharges.text; NSLog(@"net %@",balance.text); } </code></pre> <p>This is my code please ignore all code think is there [table_AdviseTestDetails reloadData]; when we reload table then my controller go in table datasource ... - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section and after this controller come below line of this [table_AdviseTestDetails reloadData]; and after this controller goes in ... - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath I have problem there .....I want when we reload table then first all datasource and delegate of UITableview run and then run other thing..... So IN my above code ....I want fist reload table data use this</p> <pre><code> [table_AdviseTestDetails reloadData]; </code></pre> <p>then run all delegate and datasource of table.....</p> <pre><code> - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath </code></pre> <p>and controller come after this below of [table_AdviseTestDetails reloadData]; this line .....how can do this ..please solve this problem ......thank in advance</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload