Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make UIPageControl work the same on iOS 8 and 9 in right-to-left languages

I would like UIPageView control to highlight the rightmost dot when its currentPage property is zero in right-to-left languages like Arabic.

First page in iOS 9:

enter image description here

It works like that out of the box in iOS 9 so I do not need to do anything. But in iOS 8 it shows the highlighted dot on the left which can be confusing for people who use right-to-left languages.

First page in iOS 8:

enter image description here

Question: is there a way to make UIPageControl highlight the rightmost dot for the first page in right-to-left languages in iOS 8 as well? I would like to achieve consistent behaviour when the app is run in both iOS 8 and iOS 9.

like image 805
Evgenii Avatar asked Dec 14 '22 12:12

Evgenii


1 Answers

Probably the easiest thing to do would be to flip the control’s view:

pageControl.transform = CGAffineTransformMakeScale(-1, 1);
like image 124
Noah Witherspoon Avatar answered Dec 17 '22 00:12

Noah Witherspoon