I have 4 interface controllers:
- [Home]InterfaceController (entry point)
- [Progress]InterfaceController
- [Action]InterfaceController
- [Results]Interface Controller
I'd like the user to be able to swipe from Home to Progress, so I created a segue in the Interface.storyboard. This works fine when I first go into the app -- I see two dots at the bottom of the Home screen and can swipe between them. Home has a button that brings the user to the Action screen. I'm using this call which works:
WKInterfaceController.reloadRootControllers(withNames: ["HomeInterfaceController"], contexts: [])
Likewise, when I tap the button from the Action screen to the results screen, I'm using this call which works, too :
WKInterfaceController.reloadRootControllers(withNames: ["ResultsInterfaceController"], contexts: [])
On the Results screen, I have a button that contains this call:
a) WKInterfaceController.reloadRootPageControllers(withNames: ["HomenterfaceController", "ProgressInterfaceController"], contexts: nil, orientation: .vertical, pageIndex: 0)
I also tried...
b) WKInterfaceController.reloadRootControllers(withNames: ["HomeInterfaceController", "ProgressInterfaceController"], contexts: [])
In both cases, when I tap the button off the Results screen, I see the HomeInterfaceController, but the ProgressInterfaceController isn't present so I can't swipe to get to it. What's even stranger, is for a) I see no indication of pages, there's no "dots" at the bottom of the Home screen. However, for b) I see one dot (I should see two).
Any idea what's going on and how to solve this?
Thank you!
- Stephen