Flip UIImageViews for Right to Left Languages

后端 未结 7 1482
悲&欢浪女
悲&欢浪女 2021-02-13 02:31

iOS automatically flips the entire ViewController when using a RTL language like Arabic and does a great job with most of the layout, especially text. The default b

7条回答
  •  逝去的感伤
    2021-02-13 02:56

    While we wait for iOS 9 improved right to left support you could create a UIImageView subclass and override setImage to mirror inside the images as @nikos-m suggests and calling super.image = flipImage.

    That way you can easily set all the images views you want to flip using custom classes in Interface Builder instead of having to add IBOutlets.

提交回复
热议问题