I am using following method in my application:
- (UITableViewCell *)tableView:(UITableView *)tblView cellForRowAtIndexPath:(NSIndexPath *)indexPath
In this method by using indexPath.row I can get the row number of each row.
But I want to actually access the cell at that row and do some formatting on that cell only.
Please guide me.
Maybe there is a misunderstanding. The method you are quoting is supposed to tell the tableView which row to display at that indexPath. So, whenever the tableView asks for this method, it does so because there is no row at this indexPath yet.
The template code will generate a new cell or dequeue one:
You can then access
cellto configure the content of each cell or add content to the contentView.If you manipulate the formatting of a cell on a per row basis (e.g. the color of the cell.textLabel) you should do this in the following delegate method: