Page Based “reloadRootControllersWithNames:” on launch loop?

前端 未结 4 1177
广开言路
广开言路 2020-12-10 05:05
- (void)awakeWithContext:(id)context {
[super awakeWithContext:context];
    [WKInterfaceController reloadRootControllersWithNames:@[@\"pageOne\", @\"pageTwo\"] cont         


        
4条回答
  •  执念已碎
    2020-12-10 05:35

    That is why awakeWithContext: exists. The first time your app is launched, the initial controller is passed nil as context. But if you reloadRootControllersWithNames:contexts:, you have an opportunity to pass a custom context instance and thus distinguish the launch mode.

提交回复
热议问题