i have nstableview bond nsarraycontroller. want able select single row , values keys have set in tableview.
i have iboutlet table view , can selected row with:
nsinteger row = [tableview selectedrow]; nslog(@"selected index = %ld", (long)row);
how ask arraycontroller give me value key of selected index?
create outlet array controller , use
[arraycontroller selectedobjects];
make sure selection indexes
of table view bound selection indexes
of array controller.
if result array not empty object @ index 0.
if multiple selection enabled in table view array contains selected objects in table view order.
Comments
Post a Comment