I have a table view and I have NSMutable array for the tableview's data source. The problem is that if I try to remove all the objects in the NSMutable array before I get the data to re-load the tableview then it crashes. I have this code in viewWillAppear method
- (void) viewWillAppear:(BOOL)animated{
[conversations removeAllObjects];//conversation is NSMutalble array
[tableView reloadData];
[[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES];
//I am trying to populate NSMutalbe array here on background
[self performSelectorInBackground:@selector(getPosts) withObject:nil];
}