i have a strange problem. I have a tableview and a button where i switch to a modal view. After dismissing the modal view, the tableview shall be reloaded.
For testing i just made a button that calls [tableview reloadData]. But nothing happens... And there is new data to be displayed.
Any tips would be nice !
My header:
@interface MainViewController : UIViewController UITableViewDelegate,UITableViewDataSource,UIPopoverControllerDelegate>
{
UITableView *_tableView;
UIPop开发者_C百科overController *popoverController;
}
@property(nonatomic, retain) IBOutlet UITableView *tableView;
My m file:
@synthesize tableView = _tableView;
-(void) reload: (id) sender
{
[_tableView reloadData];
NSLog(@"reloadData");
}
Well, i solved the problem. In the modal view i save data to coreData. But i only read the data in the init function of my tableViewController!! Now i have the readData function included in viewWillAppear and all works great. [tableview reloadData] just had no new data to display.
精彩评论