0

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?

Hemang
  • 26,840
  • 19
  • 119
  • 186

1 Answers1

0

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.

Hemang
  • 26,840
  • 19
  • 119
  • 186
  • I have a somehow similar question ; but I want to detect a double tap in group B, so the button trick will probably not make it completely – claude31 May 12 '19 at 12:44
  • If you're not using it inside the `TableRowController` then you can directly have double tap gesture. – Hemang May 15 '19 at 10:25
  • Thanks. Not using what ? Do you mean that if the IBAction is not in TableRowController, I can add a gesture on the group ?. So far, I used the solution of the button with a group inside. That works well enough, even if I loose the double tap detection. – claude31 May 16 '19 at 11:04
  • Not using a group inside the `TableRowController`. – Hemang May 17 '19 at 11:18