A cell is selected by default
[Self.searchresulttv selectrowatindexpath:[nsindexpath indexpathforrow:0 insection:0] Animated:YES scrollPosition: Uitableviewscrollpositionnone];
Implementing the Didselectrowatindexpath method of the cell
Nsindexpath *indexpath = [Nsindexpath indexpathforrow:0 insection:0];
if ([Self.searchResultTV.delegate respondstoselector: @selector (Tableview:willselectrowatindexpath:)]) {
[Self.searchResultTV.delegate TableView:self.searchResultTV Willselectrowatindexpath:indexpath];
}
[Self.searchresulttv Selectrowatindexpath:indexpath Animated:yes Scrollposition:uitableviewscrollpositionnone];
if ([Self.searchResultTV.delegate respondstoselector: @selector (Tableview:didselectrowatindexpath:)]) {
[Self.searchResultTV.delegate TableView:self.searchResultTV Didselectrowatindexpath:indexpath];
}
How to trigger Didselect event when cell is selected by default in iOS settings UITableView