ios - Select next row programmatically -
how can select next row programmatically in ios?
i have nextbutton on view, , want mytable select next row after clicking nextbutton.
[mytable selectrowatindexpath: ?????? animated:yes scrollposition:uitableviewscrollpositionmiddle]; is code correct?
create variable current index of table
long currentindex; create index path , select row code :
currentindex = currentindex +1; nsindexpath *indexpath = [nsindexpath indexpathforrow:currentindex insection:0]; [mytable selectrowatindexpath: indexpath animated:yes scrollposition:uitableviewscrollpositionmiddle];
Comments
Post a Comment