0

I am trying to build a similar flow to the Apple Watch Workout App where after you begin a workout you are presented with an InterfaceController showing the duration and you scan swipe left to see an additional InterfaceController or swipe right to end the workout etc. on another InterfaceController. However (below) I cannot swipe right to see the IC on the left to end the workout. How can I achieve this so that the user is placed in the 2nd IC of the navigation stack without a hack solution such as if I'm presented from the initial InterfaceController auto reload to IC #2?

enter image description here

GarySabo
  • 5,806
  • 5
  • 49
  • 124

1 Answers1

0

Not sure if it's possible to do it in the storyboard as I was attempting, but figured out how to do exactly what I wanted via code:

    WKInterfaceController.reloadRootPageControllers(withNames: ["testIC1", "testIC2", "testIC3"],
                                                    contexts: [contextDictionary],
                                                    orientation: .horizontal,
                                                    pageIndex: 1)
}
GarySabo
  • 5,806
  • 5
  • 49
  • 124
  • 1
    I'm trying to implement this using SwiftUI. I have a few questions, did you remove the next relationships between `["testIC1", "testIC2", "testIC3"]` in the storyboard ? Moreover where exactly did you put the code outlines above ? did you simply put that code in the interface controller of `testIC2` or did you put similar code in `testIC1` and `testIC3 ` with the correct page index (0, 2 respectively) ? – 39fredy Oct 23 '19 at 19:34