Get writing language of “uitextview” iphone?

前端 未结 3 1655
时光说笑
时光说笑 2021-01-22 00:38

How can i get writing language of uitextview? or how can i know uitextview is right to left or left to right in current state?

3条回答
  •  清酒与你
    2021-01-22 01:16

    This solution worked better for me

    [NSLocale characterDirectionForLanguage:self.textView.textInputMode.primaryLanguage] == NSLocaleLanguageDirectionRightToLeft
    

提交回复
热议问题