Andrew Bancroft 6/2/2015

Access Sub-Controllers from a UINavigationController in Swift

Read Original

This article provides practical Swift code snippets for accessing the first child view controller of a UINavigationController, whether from the AppDelegate or within prepareForSegue(_:sender:). It explains how to navigate the view controller hierarchy when a navigation controller is the root view controller, including handling iOS 13's SceneDelegate changes. The guide covers digging into the navigation controller's viewControllers array to set properties on the first child, with notes on using implicitly unwrapped optionals for fundamental app architecture.

Access Sub-Controllers from a UINavigationController in Swift

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser