Reputation: 719
In my project, I have an interface controller which includes an Interface Table, and a button below the table. I'd like to popup the context menu when long press on the rows, but not on the button. However it seems that the context menu is tied to the Interface Controller, instead of single interface element.
Is there a way to prevent the context menu from being popped up from the button?
Thanks!
Upvotes: 2
Views: 744
Reputation: 421
You can add at the bottom of your view, a button or a switch that if enabled, it changes the behavior of your pressing on the table.
didSelectRowAtIndex
Upvotes: 0
Reputation: 20187
The contextual menu is automatically displayed with a force press (rather than a 'long press'). These menus are per interface controller. You can only have one (or none) per interface controller and you cannot restrict activation of this to a specific area of your screen. In short, it isn't possible to do what you want.
Upvotes: 3