iOS 11 Beta 1 uses the increased navigation-bar title for almost all system-apps (it started doing this in iOS 10 and the Music app). I am wondering if Apple has a public API for this coming in iOS 11, or whether it will stay private for now.
The behavior is that the title has an increased font-size, is left aligned and will move to the navigation-bar once the user scrolls down. I've attached some screens showing this behavior in the Messages app here:
Although I could not find any reference in the UINavigationController
and UINavigationBar
so far, maybe someone knows some more details!
A user changes the navigation bar's style, or UIBarStyle , by tapping the “Style” button to the left of the main page. This button opens an action sheet where users can change the background's appearance to default, black-opaque, or black- translucent.
A navigation bar appears at the top of an app screen, enabling navigation through a hierarchy of content. A navigation bar also provides a natural place to display a screen's title — helping people orient themselves in your app or game — and it can include controls that affect the screen's content.
iPhone X added extra height for the Home Bar to toolbars and tab bars and their sizes are unchanged from iOS 11: 83 points tall in portrait and 53 points tall in landscape.
The only change done to UINavigationBar
API for iOS 11 is prefersLargeTitles
.
Documentation here: https://developer.apple.com/documentation/uikit/uinavigationbar/
You can do it to your own apps with one small change: check "Prefers Large Titles" for your navigation bar in IB, or if you prefer to do it in code using:
navigationController?.navigationBar.prefersLargeTitles = true
If you need to change the text attributes of the large title you need to use the new largeTitleTextAttributes
property on UINavigationBar
:
UINavigationBar.appearance().largeTitleTextAttributes = [ NSAttributedString.Key.foregroundColor: UIColor.black ]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With