Reputation: 1451
Is there any way to make the navigationTitle at the top to be a multiline one, or shrink when that is too long? Now, in my case, it shows "..." at the end because of not enough spaces to display. i have checked all other posts and none of the results are related to swiftui solution.
Upvotes: 3
Views: 2131
Reputation: 41
init() {
UILabel.appearance(whenContainedInInstancesOf: [UINavigationBar.self]).adjustsFontSizeToFitWidth = true
}
you can add this into your view struct
Reference to this SwiftUI Size to fit or word-wrap navigation title
Upvotes: 4