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

Popular posts from this blog

angularjs - Redirect to a new template in angular js -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

Desktop Launcher for Python Script Starts Program in Wrong Path (Linux) -