Learning all the new SwiftUI 2.0 changes but came across .navigationTitle
which seems to work almost exactly like .navigationBarTitle
. I looked at the WWDC 2020 videos and found one video where it was mentioned as being used to distinguish tab titles in MacOS? But not sure if it I should use it now instead of .navigationBarTitle
in iOS? Also the Apple documentation is not clear about the differences between the two..
So my question is, what are the exact differences and how would you use them in iOS/MacOS?
The navigationBarTitle
is just deprecated and renamed to navigationTitle
:
@available(iOS, introduced: 13.0, deprecated: 100000.0, renamed: "navigationTitle(_:)")
@available(macOS, unavailable)
@available(tvOS, introduced: 13.0, deprecated: 100000.0, renamed: "navigationTitle(_:)")
@available(watchOS, introduced: 6.0, deprecated: 100000.0, renamed: "navigationTitle(_:)")
public func navigationBarTitle(_ title: Text) -> some View
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