I'd like to change the color of a row in a WKInterfaceTable if it has been selected. I've done these steps but don't know how I can go further:
override func table(table: WKInterfaceTable, didSelectRowAtIndex rowIndex: Int) {
let row = tableView.rowControllerAtIndex(rowIndex) as! TableRowObject
}
I hope someone of you guys can help me to do this.
I think you have to set the background colors in Storyboard.
Highly theoretical, never done this myself:
If you have a more dynamic app, your could potentially create two prototype rows and give them ids (Normal, Highlighted). Then use
insertRowsAtIndexes(_:)
andremoveRowsAtIndexes(_:)
to "switch" the row against a highlighted one...Not the best solution, but the only one that comes to mind with WatchKit still being very limited.