Reputation: 33138
I like to use the default size of UINavigationBar.
However, sometimes the title is too long and I want the font size to get reduced appropiately.
How would I do so?
I suppose, first I need to find out the size of the titleView first. I think that can be done.
Then I need to call a function that will tell me the appropriate font size.
Then I would need to specify the font with that size WITHOUT changing the font name for that UINavigationBar.
Anyone knows how to do any of those (doesn't need to be all).
Upvotes: 0
Views: 263
Reputation: 10011
You need to set the titleTextAttributes
property of the UINavigationBar
. You can get the font size and font type from the same property and adjust or change the font size and font type depending on ur requirement.
Check out the documentation for more details on the same.
Upvotes: 1