Interface Transitions in Code

Not every transition can be implemented in your storyboard. Whether you need to gut your app’s interface entirely and start fresh, or dynamically choose interface controllers to present, you may need to use some of WKInterfaceController’s methods to accomplish your tasks. Because of this, you may see interface controllers in your storyboard that don’t appear to be connected to anything. Fear not: you can always instantiate one by name, using the identifier that you give it in the storyboard. For that reason, Xcode will warn you if you have an interface controller in your storyboard with no linked segues or an identifier—there’s no way to get to it! Let’s look at two ways to transition in code. First, let’s transition ...

Get Developing for Apple Watch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.