objective-cwatchkitwkinterfacebutton

WKInterfaceButton response time


My Watch app contains a number pad created from WKInterfaceButtons. Quite basic, every button represents digit (0-9) and has an IBAction that updates one WKInterfaceLabel. IBActions don’t contain any heavy work (no web service calls or core data updates), just concatenation of the selected digit to the already entered number and updating the label's text.

Now if I quickly press the same button twice or more times then sometimes the button don’t respond to the next press (it feels that touch down is still active and the button is not responding yet). I understand that any interaction with a Watch requires a round-trip communication between the Watch and the iPhone, but still it is working much slower then other Watch apps I have seen that implements similar number pad. Any ideas how I can improve button’s response time?


Solution

  • Not sure why but WKInterfaceButton with content type Text was causing the delay. Changing button content type to Group instead of Text and adding label inside it, fixed the problem. Now buttons respond instantly.