Saturday 25 May 2013

Hi all,

We have a small issue  in handling tableView dynamically.

When the view loads for first time,its working fine.But I need to reload the table data according to the data we get from web service in the same view.
But while reloading the table, section number is not updating.

For example if I have 9 sections in my table,

for the first time loading its updating from 0 to 8.
But while reloading the table, we are getting the section numbers as 8,0,1,2,3,4,5,6,7,8 instead of 0 to 8 so that we got all the sections of table  in interchanged manner.
Can anyone help me in this aspect?

Thanks,
Tejaswini.

1 comment:


  1. We can Solve this problem by maintaing a loop, But one issue raised here
    When am displaying the data in cell, simply it displays last value from the array..

    Array Contains NULL, Empty Space Values ..

    How to display all the values in a cell?

    int var;

    for (var=0; var < [glsList count]; var++)
    {
    if ([glsList objectAtIndex:var] == [NSNull null])
    {
    //NSLog(@"With Out null options ");
    [myAry addObject:[glsPrcList objectAtIndex:var]];
    custCell.glassTitle.text = @"";
    }

    else if ([[glsList objectAtIndex:var] isEqualToString:@"no"])
    {
    [myAry addObject:[glsPrcList objectAtIndex:var]];
    custCell.glassTitle.text = @"";
    }
    else if ([[glsList objectAtIndex:var] isEqualToString:@"yes"])
    {
    [myAry addObject:[glsPrcList objectAtIndex:var]];
    custCell.glassTitle.text = [myAry objectAtIndex:var];
    }
    else {
    [myAry addObject:[glsPrcList objectAtIndex:var]];
    custCell.glassTitle.text = @"";

    }
    NSLog(@"MYARY VALUES JOOOOOO :-) IS : %@", myAry);
    }

    ReplyDelete