2

I have a group within a WKInterfaceTable and use the function didSelectRowAtIndex to intercept the selection of a row and do other stuff. It all works great except for the fact that as soon as the user touches the row I would like to change its backgroundColor and I can't figure out how to achieve this behaviour.

The first lines of the function look like this:

override func table(table: WKInterfaceTable, didSelectRowAtIndex rowIndex: Int) {

    let slctedRow = self.mainTable.rowControllerAtIndex(rowIndex) as! MainTableRowController
    slctedRow.rowMainGroup.setBackgroundColor(self.rowSelectedColor)

Unfortunately the row does not change color immediately because the function is not called immediately but only when the user releases the touch.

Is there a way to immediately intercept the touch (and so change the group's background color)?

1 Answers1

0

I'm sure there aren't way to do that. As they said in a doc:

Responding to Taps in Table Rows

To respond to taps in a table row, implement your interface controller’s table:didSelectRowAtIndex: method. Use that method to present a different interface controller or to perform any other relevant tasks.

That all. Nothing more.

Arsen
  • 10,815
  • 2
  • 34
  • 46