watchkitwatchoswkinterfacetablewkinterfacegroupwktapgesturerecognizer

How to detect a tap on a WKInterfaceGroup added within a table row controller?


So this is my InterfaceController hierarchy:

-> InterfaceController
      -> Table
            -> RowController
                  -> Group A
                        -> Group B
                              -> Gesture

I've also implemented override func table(_ table: WKInterfaceTable, didSelectRowAt rowIndex: Int) {...} of WKInterfaceTable where I'm receiving the selection of a row controller. However, I'm not receiving the touch event (a tap event) on Group B.

I've attached an IBAction with the tap gesture which should get call when I taps on the Groupp B. if I tap outside (means, on Group A) then it should call the table's didSelectRowAt: method but right now, it's not calling gesture's action.

Any other solution to implement this?


Solution

  • Temporary I've implemented this by replacing Group B with a WKInterfaceButton. So now, I can detect the button touch as well as table's didSelectRowAt:. I will wait for a perfect solution to this problem.