I have created 5 static cells in UITableViewController scene. Everything working fine but I am not able to set the particular cell selected! If it is prototype cell then its simple but how could I set static cell selected? Following code raises BAD memory access exception! I have done this based on discussion on apple thread but not sure what’s wrong! Could someone help please.
- (void)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
[super tableView:tableView cellForRowAtIndexPath:indexPath];
if(indexPath.section == _rating)
[tableView cellForRowAtIndexPath:indexPath].accessoryType =UITableViewCellAccessoryCheckmark;
}
Fixed this. I have to return UITableViewCell return type and have to used this method like below. It was recursive calling the methods and hence was failing.