Discarding Right to left not working in iOS
My app supports right to left direction but i want to discard the phone language and just change direction depending on the user preference.
On a right to left phone, I forced the left to right using
UIView.appearance().semanticContentAttribute = .forceLeftToRight
it fixed most things but not everything.
Check the text fields placeholder alignment; some labels were aligned right! Anyone has a solution how to fix this?
我不知道它会适用于所有的UITextField,但你可以尝试这个,但它应该工作的单个UITextField
UITextField.appearance().makeTextWritingDirectionLeftToRight(nil)
链接地址: http://www.djcxy.com/p/71574.html
下一篇: 放弃在iOS中无法使用的权利