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

Trailing wont change UITextField left-to-right for Arabic text #757

Open
3 tasks done
nikolafamit opened this issue Jul 8, 2022 · 1 comment
Open
3 tasks done

Comments

@nikolafamit
Copy link

New Issue Checklist

🚫 If this template is not filled out your issue will be closed with no comment. 🚫

  • I have looked at the Documentation
  • I have read the F.A.Q.
  • I have filled out this issue template.

Issue Info

Info Value
Platform ios
Platform Version 15.5
SnapKit Version 5.0.0
Integration Method cocoapods

Issue Description

I have a problem when using left to right (arabic) view. If i put trailing on UITextField, arabic text is starting from left side.
If i remove trailing, then it's changing to left-to-right

Screen Shot 2022-07-08 at 22 09 10 PM

	textField.snp.makeConstraints { (make) in
	    make.leading.equalTo(imageView.snp.trailing).offset(Margins.standard)
	    make.trailing.equalToSuperview().inset(Margins.big)
            make.top.equalToSuperview().offset(40.0)
	    make.bottom.equalTo(separatorView.snp.top).offset(-Margins.tiny)
	}

        imageView.snp.makeConstraints { (make) in
            make.leading.equalToSuperview().offset(Margins.big)
            make.height.width.equalTo(Constants.imageSize)
            make.bottom.equalTo(textField).offset(-Margins.small)
        }
        
        separatorView.snp.makeConstraints { (make) in
            make.bottom.equalToSuperview()
            make.leading.equalTo(imageView.snp.trailing).offset(Margins.standard)
            make.trailing.equalTo(textField.snp.trailing)
            make.height.equalTo(1)
        }
@robertjpayne
Copy link
Member

@nikolafamit does this work if you use normal NSLayoutConstraint api's? We only translate our calls into those so I can't see why SnapKit would be causing this issue directly.

Might be equalToSuperview could try to be explicit equalTo(superview.snp.leading) etc…?

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

No branches or pull requests

2 participants