How Can i reload data in tableview in view controller in iphone

Posted by Pugal Devan on Stack Overflow See other posts from Stack Overflow or by Pugal Devan
Published on 2010-04-02T11:19:31Z Indexed on 2010/04/02 11:23 UTC
Read the original article Hit count: 585

Filed under:
|
|
|

Hi, I am new to iphone development. I have created 5 buttons in the view. On clicking the buttons it navigates to the corresponding views. On clicking the "News" button it navigates and displayed the parsing details in the table view.(This table view, I have created View controller and added table view using Interface Builder and i have set all the properties.) and i go to another button and comes back to the "News" button, every time parsing will happened.How to avoid the multiple parsing when i come back to the button.

i have tried this one and my code is,

    - (void)viewDidAppear:(BOOL)animated {

[super viewDidAppear:animated];

static int i;

if(i == 0)
{
    NSString * path = @"http://www.AAAAAAAAAAAAAAAA.com";

    [self parseXMLFileAtURL:path];

    i++;

    }

    [self.newsTable reloadData];
 }

} Now the parsing is happened only time but the datas are doesnt displayed.

My problem is the tableview doesnot reload. newsTable is the instance of the Tableview.

How can i achieve this.

Please help me out.

Thanks.

© Stack Overflow or respective owner

Related posts about reload

Related posts about data