I want to make multiple rows selection in uitableview(uipopover view) which is subview of UISplitview. The selected rows info should be displayed in Lable in detail pane of splitview.
I have managed to get multiple rows selection but not getting to display the selected rows info in detail pane.
Any help/snippet code would be appreciated.
Thanks,
since you don't give us some sample code we cannot provide you exact snippets. There are plenty ways to fill a tableView so how should we know how you did that?
Nonetheless I will tell you how it should work abstractly. You will need either an array with the current selection or - as @ Ricard Pérez del Campo suggested - you add a property to your data-model which contains the state (e.g.
selected).Step 2 you will check this property (or array) every time you
a) change the selection OR
b) the
tableViewis displayed on screen (viewWillAppearand popup appear)Therefore you need a dataSource which is available from all places (in your case the
Popover, thesplitViewand adetailView)You said one
tableViewalready work so the problem for the second is probably the selectiondataSource.There is also a method in
UITableViewcalledindexPathsForSelectedRowswhich will give you an array for the current selection. You could apply that selection to the othertableViewbut it's a hackish way and you should definitely change your data-model instead.