0

Hi I have created a Watch app which has two pages but when I run it on apple watch and do switch between pages after few seconds one page(sometimes page1 and sometimes page2)goes black and It doesn’t show my buttons, labels nothing. But when I run it on simulator there is no problem everything is fine and also before i add second page to the app It was ok on apple watch too

Developersian
  • 151
  • 2
  • 7

2 Answers2

0

I had the same issue and it was due to calling crownSequencer.focus() without a corresponding crownSequencer.resignFocus() call. In my case I was calling focus() in didAppear() and once I added a resignFocus() call to willDisappear() the problem went away.

jerarts
  • 31
  • 3
  • I don’t know if that was the case but it did go away when i added more features to the app and one of them was using digital crown which as you said you will use crownSequencer.focus() and .resignfFocus() for that functionality but i don’t know if that made the issue go away or not because I added other features at the same time so I don’t know which one it was. But yeah I used didDeactivate() func to resign the crown. Thank you for your Time and Answer and if your Answer gets more upvotes I’ll make it the right solution. – Developersian Apr 16 '20 at 09:48
0

I guess if you remove override function didDeactivate() from both interfaceControllers may solve the problem but that's when you don't need this function and if you do try user899076 answer.

remove this:

override func didDeactivate() {
    // This method is called when watch view controller is no longer visible
    super.didDeactivate()
}
Developersian
  • 151
  • 2
  • 7