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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -