Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WatchKit: setTitle delay?

When I push a new controller in WatchKit and use setTitle in the new controllers' awakeWithContext: method it takes a second or so to set the title, it stays blank until then. When I set the title in the storyboard it appears instantly.

Am I missing something or is this expected behavior?

like image 728
Nico Reese Avatar asked Apr 01 '15 12:04

Nico Reese


1 Answers

That's correct. If you set the title in the Storyboard, the Watch reads the value directly from the resources which are saved on the device.

If you set it in code, the Watch will need to run a request to your Extension (which runs on your iPhone) and then it'll receive the value back and display it.

If the title of the controller is static, you should directly add it to your storyboard.

like image 198
BalestraPatrick Avatar answered Sep 21 '22 16:09

BalestraPatrick