wkinterfacecontroller

Black screen page on apple watch apps with more that one page

孤者浪人 提交于 2021-01-29 09:51:07
问题 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 回答1: I had the same issue and it was due to calling crownSequencer.focus() without a corresponding crownSequencer

Selector not called on selecting menu item after force touch

六眼飞鱼酱① 提交于 2019-12-10 13:04:43
问题 I have this code, for responding to a menu item being tapped after a force touch: class InterfaceController: WKInterfaceController { override init() { super.init() self.addMenuItemWithItemIcon(WKMenuItemIcon.Pause, title: "Pause", action: Selector("test")) } func test() { print("test") } } When I force touch, the menu appears. When I tap the "Pause" button, test() is not called. Any ideas why this might be? 回答1: Solved. Though its the result of a silly mistake (aren't most problems?), I think