ios - UITableView never calls tableView:shouldShowMenuForRowAtIndexPath: on its delegate -
i'm creating , displaying instance of uitableview
. delegate (which subclass of uitableview
) never receives of following selectors:
tableview:shouldshowmenuforrowatindexpath:
tableview:canperformaction:forrowatindexpath:withsender:
tableview:performaction:forrowatindexpath:withsender:
even though documentation states, example, under discussion of tableview:shouldshowmenuforrowatindexpath:
if user tap-holds row in table view, method (if implemented) invoked first. return no if editing menu shouldn’t shown—for example, cell corresponding row contains content shouldn’t copied or pasted over.
other tutorials document shortcut displaying uimenucontroller
in table views. why isn't working documented?
although isn't documented (i'm submitting documentation update, knows when/if posted), uitableviewdelegate methods:
- tableview:shouldshowmenuforrowatindexpath:
- tableview:canperformaction:forrowatindexpath:withsender:
- tableview:performaction:forrowatindexpath:withsender:
are called if table view instance managed instance of uitableviewcontroller. standalone table view will not have these methods invoked.
if table view isn't connected table view controller, you'll need display uimenucontroller manually long tap listeners (to duplicate standard system functionality) on each table view cell.