exotue
exotue

Reputation: 110

Add target to button on a tableView row on Apple Watch

I have a row controller set up with a button. How can I make it so when it's pressed, the background image changes with an animation? I can't do it in the RowController file because you cannot call animateWithDuration.

Any help greatly appreciated.

Upvotes: 0

Views: 257

Answers (1)

Muneeba
Muneeba

Reputation: 1776

You can implement the following method for row selection and in this method you can put the animation code.

-(void)table:(WKInterfaceTable *)table didSelectRowAtIndex:(NSInteger)rowIndex{}

Also Apple do not allow to programmatically set target for WKInterafaceButton, you need to implement that via storyboard.

Upvotes: 2

Related Questions