ios - Select first row in tableview at default and fire didselect when load view -
when view load, tableview select first row , fire didselectatrow method something. i've know how select first row not fire didselectatrow method @ same time show me how
you can call method manually in viewdidload
:
- (void)viewdidload { [super viewdidload]; // select first row nsindexpath *firstrowpath = [nsindexpath indexpathforrow:0 insection:0]; [self.tableview selectrowatindexpath:firstrowpath animated:no scrollposition: uitableviewscrollpositionnone]; [self tableview:self.tableview didselectrowatindexpath:firstrowpath]; }
Comments
Post a Comment