I am using a dynamic textview.
func textViewDidChange(_ textView: UITextView) {
let str = textView.text! as NSString
let size = str.size(attributes: [NSFontAttributeName: UIFont.systemFont(ofSize: 20.0)])
textView.frame = CGRect(origin: textView.frame.origin, size: size)
}
This is the code used for dynamic change in height and width. This works well while using "English". The problem is when i change language to "arabic", text view has to increase width towards the left, but it still increasing the width towards the right.