Clear labels, Images in WatchKit after didDeactivate (Glance and InterfaceController)

178 views Asked by At

I'm developing an app for apple watch. I'm having troubles to "clear" screen when the app goes sleep or to didDeactivate.

Inside didDeactivate, I clear all labels and Images, but when the app starts again, this labels and Images remains during 1sec.

How I handle it?

- (void)didDeactivate {
label = @" ";
[image setImage:[UIImage imageNamed:@"default"]];
}

(of course, didDeactivate is executed)

1

There are 1 answers

0
Yurkevich On

I recommend to clean your UI in willActivate(). You can't change UI in didDeactivate().

Do not use this method to make changes to your interface. WatchKit ignores attempts to set values of interface objects while your interface is inactive, including during the execution of this method.

Reference.