Reputation: 8715
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?
Upvotes: 0
Views: 178
Reputation: 8715
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.
Upvotes: 0
Reputation: 5536
You can't improve the response time. The WatchKit
UI interactions are sent via bluetooth to your app's extension. The extension then provides UI feedback into the Apple Watch.
Therefore, the delay is dependent on the connection between the Apple Watch and the phone, and you will never be able to control it.
Upvotes: 1