tableview not reloading using reloadData

2019-08-17 07:58发布

问题:

On load i show my table with one cell showing "Loading...", using threading, in the background im obtaining my rss and adding it to my sqlite table. The method (updatedDbWithRSSfeed) callied via performSelectorOnMainThread:@selector(updatedDbWithRSSfeed:) is not in the same class thats holding the uitableview (which is in FeedsView). So in updatedDbWithRSSfeed after updating my sqlite table, im calling the the relevant class (FeedsView) to reload uitableView (reloadMyData), but does not seem to reload the data and numberOfRowsInSection doesnt seem to be called so i can resize my table. Any ideas why this may be happening, am I going about this the wrong way?

rootViewcontroller.m

-(void)updatedDbWithRSSfeed:(NSMutableArray*)items {

/* inserting data into table here */

FeedsView *feedview = [[FeedsView alloc]init];  
[feedview reloadMyData];
[feedview release];

}

FeedsView.m

-(void) reloadMyData {
/* reading latest entries from db table and updating my dataSource (feedTableDS)*/
[self.feedTableDS reloadData];
}