WatchKit: setTitle delay?

When I click on the new controller in WatchKit and use setTitle in the awakeWithContext method of the new controller: it takes a second or so to set the title, it remains empty until then. When I set the title in the storyboard, it appears instantly.

Am I missing something or is this the expected behavior?

+5
source share
1 answer

It is right. If you set the title in the storyboard, Watch reads the value directly from the resources that are stored on the device.

If you install it in code, Watch will have to run a request for your extension (which runs on your iPhone), and then it will get the value back and display it.

If the controller header is static, you must directly add it to the storyboard.

+8
source

Source: https://habr.com/ru/post/1216604/


All Articles