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

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -