My application is navigation base. I have UITableViewController.when i tap a cell i need to display check mark in left side of selected cell for indication of cell is sele
Try this. In your cellForRowAtIndexPath delegate method put the following code.
if (cell == nil) {
...
[[cell imageView] setImage:[UIImage imageNamed:@"checkMark"]];
...
}
[[cell imageView] setHidden:YES];
if (indexPath.row == selectedRow) {
[[cell imageView] setHidden:NO];
}
Have a integer variable named selectedRow and in your didSelectRowAtIndexPath delegate method include the following code,
...
selectedRow = indexPath.row;
[self.tableView reloadData];
Make sure you initialize ,
selectedRow = -1;
in init method or somewhere where it will be initialized before the table view loads.