ios - UITableView Automatically Select Row -
when uitableview
loads, want row, in section, selected code in didselectrowatindexpath
execute when user loads uitableview
. i've tried code below doesn't execute code in didselectrowatindexpath
section. thoughts?
nsindexpath *indexedpath = [nsindexpath indexpathforrow:0 insection:0]; [tableview selectrowatindexpath:indexedpath animated:yes scrollposition: uitableviewscrollpositionnone];
make use of code.this automatically call didselectrowatindexpath
when view loaded.
[self tableview:tableview didselectrowatindexpath:[nsindexpath indexpathforitem:0 insection:0]];