-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right to left support #282
Comments
Hello I changed to español and works perfectly, Can you share the code? |
Isn't español a LTR language? I meant for occasions where view direction changes (mirror) to right to left. |
I will check for LTR Language(Arabic) and see if it works |
In summary the problem is the tabs works correctly but the scroll view still populate view from left to the right so the rightmost tab show the leftmost view and so on ... |
@hrsalehi Do you have time to look at it and find out a solution? |
Setting force Right-to-Left semantic on the containerView (UIScrollView) did not solve the issue 👎 Any suggestion that might fix this issue please? |
@santiagofm Do you think anything could be done on this one please? |
One solution is to reverse the tabs array before setting it to the controller @musbaalbaki |
Hi hrsalehi, Thank you |
Thanks @mohammadghk, that is actually what I ended up doing. However I am still looking for a cleaner approach using the native iOS RTL support |
since I am using autolayout, the tabs section automatically adjusted in RTL language. Now the problem I am facing is that the view controllers slide in from right side in Arabic which is basically opposite. |
hi, |
This is not a proper solution but after way too many hours trying to solve this problem, this actually solved it.
|
Thanks |
I used @AdnanMajeed06 solution by adding the transform function in
The tabs start from right to left and the scrollview direction is working like it supoosed to do in RTL |
I ended up with another similar solution, which fixes the unexpected rotation if implemented using @AdnanMajeed06 solution. My solution: // Add at the end of `viewDidLoad` of `PagerTabStripViewController`
if UIView.userInterfaceLayoutDirection(for: view.semanticContentAttribute) == .rightToLeft {
containerView.transform = CGAffineTransform(scaleX: -1, y: 1)
for controller in viewControllers {
controller.view.transform = CGAffineTransform(scaleX: -1, y: 1)
}
} It works fine with RTL and LTR |
Nothing works for me and this bug is still open, any new solution here? |
Any solution for this issue |
stuck in the same issue ... |
This solution works like a charm Just add this class to your code RTLBaseButtonBarPagerTabStripViewController, and use it instead of normal BaseButtonBarPagerTabStripViewController
|
for 3 or less than thre tabs follwing code works fine for me ... but for more than three tabs above code not working... so I change the logic...
and assign the class to 'buttonBarView'
|
Hi, I just added pager tab strip into one of my controllers and my app local is RTL but the scroll view does not work correctly and since tabs are populated from right to left but controllers populated from left to the right.
To test that just change app default language to one of the RTL languages such as Arabic ,Farsi or Hebrew
The text was updated successfully, but these errors were encountered: