Skip to content
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

RTL UITextField #1166

Closed
pedroOliveiraptc opened this issue Oct 2, 2018 · 10 comments
Closed

RTL UITextField #1166

pedroOliveiraptc opened this issue Oct 2, 2018 · 10 comments

Comments

@pedroOliveiraptc
Copy link

Hey guys congrats for the work.
i am facing a problem since ios12 and the new version that you guys release, my textfield in rtl break alignments as you can see above,

captura de ecra 2018-10-02 as 13 11 03

captura de ecra 2018-10-02 as 13 11 10

captura de ecra 2018-10-02 as 13 11 17

captura de ecra 2018-10-02 as 13 11 24

Do you already face this issue ? On iOS 11 and old version of the framework I don't have problems.
Thanks.

@daniel-jonathan
Copy link
Member

Hey @pedroOliveiraptc, Thank you. Can you try the development branch, and let us know if the issue persists. If so, please send a reproducible issue so we can investigate it. Thank you!

@pedroOliveiraptc
Copy link
Author

@DanielDahan thanks I will try.

@pedroOliveiraptc
Copy link
Author

Hey @pedroOliveiraptc, Thank you. Can you try the development branch, and let us know if the issue persists. If so, please send a reproducible issue so we can investigate it. Thank you!

Hello the placeholder its ok, but the input text and the component line it self are not aligned.
captura de ecra 2018-10-03 as 08 57 55

@OrkhanAlikhanov
Copy link
Contributor

@pedroOliveiraptc Can you share the code for us to achieve the same result on our computer?

@pedroOliveiraptc
Copy link
Author

@pedroOliveiraptc Can you share the code for us to achieve the same result on our computer?

i will create a sample app to share.
thanks.

@daniel-jonathan
Copy link
Member

@pedroOliveiraptc Are you still facing this issue? If so, please reopen this and submit a sample app. Thank you!

@pedroOliveiraptc
Copy link
Author

Hello sorry for the delay, the link for sample project

https://drive.google.com/file/d/1gl4BQvgH2QvU5FrU0FM3ViHDwUVVr_7U/view

@OrkhanAlikhanov
Copy link
Contributor

Thank you we'll look into soon.

@OrkhanAlikhanov
Copy link
Contributor

@pedroOliveiraptc You have following line:

UIView.appearance().semanticContentAttribute = .forceRightToLeft

It makes some changes internal to UITextField:
image
From: #WWDC15 App Frameworks

We give padding as much as the height of the textField if leftView has non-nil value. Since leftView is swapped with rightView internally when you have .forceRightToLeft, accessing leftView returns non-nil value (value of rightView) therefore we add padding. You workaround this by setting rightView to nil:

let textField = TextField()
textField.rightView = nil // so that when it gets swapped with leftView, leftView still stays nil

Actually we don' support RTL yet, so we don't test our framework against such cases.

btw, you can use development branch, it has cool updates such as Theming (#1115) and Dialog (#1173) :)

@daniel-jonathan
Copy link
Member

@OrkhanAlikhanov I created an issue for us to support RTL. #1179, let's follow that issue for the RTL feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants