I am developing an ipad app.In this app,I have two sections-one showing a Gallery like grid view and other a tableview.
My gridview worked successfully.
When I implemented the tableview,it goes full screen with specified row height and bgcolor.But the data is not shown on the tableview.I am collecting the data from plist.
I designed the tableviewcell to display each row in style.But the tableviewcell design is not working in tableview.
I used some codes from Advancedtableviews sample program by Apple.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"categoryCell";
categoryCell *cell = (categoryCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
// Configure the data for the cell.
NSDictionary *dataItem = [data objectAtIndex:indexPath.row];
cell.icon = [UIImage imageNamed:[dataItem objectForKey:@"Icon"]];
cell.name = [dataItem objectForKey:@"Name"];
cell.num = [dataItem objectForKey:@"Num"];
return cell;
}
How could I overcome the problem?
Add a breakpoint to your cellForRowAtIndexPath method. If the method is never called, then there is an issue in your other data source methods – you will be returning 0 for the number of sections in the table, or the number of rows in a section.