This time I really don’t know where to look for this problem.
I have an UIViewController with an embedded UITableView.
I’ve added the UITableViewDelegate, UITableViewDataSource to my header file.
Inside the implementation file I’ve imported the header file of another Class I use to read/write to my DB.
In the “numberOfRowsInSection” section of my implementation file there’s this code:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
DbOperations *medi = [[DbOperations alloc] init];
self.orari = [medi ProssimeMedicineGrouped];
return [self.orari count];
}
I’ve added a breakpoint to the start of this method and then I’ve seen that the method “ProssimeMedicineGrouped” is not being called at all.
Yesterday it was working without problems. The only change I’ve made is changing the ViewController from UITableViewController with just the table, to an UIViewController with the tableView embedded.
Did you set the tableView’s
delegateproperty toself? And one more thing, I don’t think it’s a good practice to create theDbOperationsobject in this method as it’s called when the tableView needs more information about the data source and this can happen more than once.