SwiftUI – How to set the title of a NavigationView to large title (or small)?

SwiftUI (iOS 14+) NavigationView { TopLevelView { // […] } .navigationBarTitleDisplayMode(.inline) // ⬅️ Important part } SwiftUI (Xcode 11.3) SwiftUI navigationBarTitle modifier has an optional displayMode property which you can set to .inline for small titles and .large for large titles. See documentation NavigationView { TopLevelView { // […] } .navigationBarTitle(“Test”, displayMode: .inline) // ⬅️ … Read more

How to constrain autorotation to a single orientation for some views, while allowing all orientations on others?

The short answer is that you’re using UINavigationController, and that won’t work like you want it to. From Apple’s docs: Why won’t my UIViewController rotate with the device? All child view controllers in your UITabBarController or UINavigationController do not agree on a common orientation set. To make sure that all your child view controllers rotate … Read more