As of iOS 11, Apple has added Large Title Display Mode for UINavigationBar
and UINavigationItem
which makes an effect like this:
We could simply turn this effect on using the following Swift code:
navigationBar.prefersLargeTitles = true
My question is how we can make the large title right to left to be usable for Eastern right to left languages?
Thanks in advance.
I use this approach :
override func viewDidLoad() {
super.viewDidLoad()
navigationController?.navigationBar.subviews[1].semanticContentAttribute = .forceRightToLeft
}
Well, it should be auto RTL for all RTL languages. All you have to do is to set a device language as one of RTL languages. Or, if you debug this in simulator, you can use on of Instruments Xcode is delivered with to simulate RTL while you are actually using LTR language
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