Search code examples
objective-ciphonexcode7watchkit

Context menu not being displayed in watchkit objective c


i have implemented a context menu in my controller and when i tested it in simulator with a long press it is not being displayed. I am using xcode 7.1.1 and watchos for development. Please help me.


Solution

  • How did you test it in simulator? Simply pressing the mouse button for a long time is not the way. You have to go to the Menu item: Hardware->Force Touch Pressure, and change it to "Deep Press" From that moment on, your mouse taps will all be long presses. You have to change it back to "Shallow Press" in order for your normal mouse behavior to simulate regular tapping. Note there are also keyboard equivalents: shift-command 1 and shift-command 2.