开发者

Obj-c UITableView reloadData

I have a UIViewController with 2 UITableView's added to the .xib and declared in the .h and then

-(void)viewDidLoad {
    [super viewDidLoad];
    if (rss1_tblController == nil) {
   开发者_如何学JAVA     rss1_tblController = [[RSS_CostumeTblViewController alloc] init];
    }
    if (rss2_tblController == nil) {
        rss2_tblController = [[RSS_CostumeTblViewController alloc] init];
    }

    [rss1_tblView setDataSource:rss1_tblController];
    [rss2_tblView setDataSource:rss2_tblController];

    [rss1_tblView setDelegate:rss1_tblController];
    [rss2_tblView setDelegate:rss2_tblController];

    rss1_tblController.view = rss1_tblController.tableView;
    rss2_tblController.view = rss2_tblController.tableView;
}

but in the RSS_CostumeTblViewController i parse some xml and i need to reloadData on the corresponding table but wen the process ends i call [self.tableView reloadData]; from within RSS_CostumeTblViewController and the only method fired is

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;

doing basecly nothing...

Thank you for your time :)


If -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section; is the only method triggered, it looks like it returns 0.
Double check that method to return the correct count of rows.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜