I have a view in a Watch app Im working on with 8 buttons, I would like to be able to put them into an array to make it cleaner and easier to set background images as well as set an action for each in a loop.
As far as I can tell, this isn't possible at the moment I'm trying to do something like this:
@IBOutlet var button0: WKInterfaceButton!
@IBOutlet var button1: WKInterfaceButton!
@IBOutlet var button2: WKInterfaceButton!
@IBOutlet var button3: WKInterfaceButton!
@IBOutlet var button4: WKInterfaceButton!
@IBOutlet var button5: WKInterfaceButton!
@IBOutlet var button6: WKInterfaceButton!
@IBOutlet var button7: WKInterfaceButton!
let buttons = [button0, button1, button2, button3, button4, button5, button6, button7]
for button in buttons{
//do stuff in here
button.setBackgroundImageNamed("image")
}