ios - How can I get the "row" from indexPathsForSelectedRows? -
i trying "row" value indexpathsforselectedrows.
nsarray *selectedcells = [self.storetableview indexpathsforselectedrows]; nslog(@"%@",[selectedcells objectatindex:0]);
this nslog prints out
<nsindexpath: 0xc000000000008016> {length = 2, path = 0 - 4}
how can number '4' integer in example?
i've tried objectforkey@"path". did not work.
you can do
nsarray *selectedcells = [self.storetableview indexpathsforselectedrows]; nsindexpath *firstindexpath = [selectedcells objectatindex:0]; nsuinteger row = firstindexpath.row
and row
4
in case.
Comments
Post a Comment