ios - Select First Row as default in UITableView -


i have application viewbased , adding tableview subview main view. have taken uitableviewdelegate respond table methods. working fine, want select first row or uitableview default selected(highlighted).

please me, code need , need put it.

- (void)viewdidappear:(bool)animated {     [super viewdidappear:animated];     nsindexpath *indexpath=[nsindexpath indexpathforrow:0 insection:0];     [mytableview selectrowatindexpath:indexpath animated:yes  scrollposition:uitableviewscrollpositionbottom]; } 

the best way use in code, if want select row default, use in viewdidappear.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -