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 implementation issue #22

Open
AhmadShaheer28 opened this issue Jun 30, 2021 · 1 comment
Open

RTL implementation issue #22

AhmadShaheer28 opened this issue Jun 30, 2021 · 1 comment

Comments

@AhmadShaheer28
Copy link

AhmadShaheer28 commented Jun 30, 2021

Hi, I have used this library but I'm unable to move thumbnailImageView from right to left if I slide finger from left to right the thumbnailImageView moves from right to left when layoutDirection is rightToLeft

@himanimehta1
Copy link

try this:
in // MTSlideToOpenControl.swift file you need to add

for dragview slide:

func isOnRightToLeftLanguage() -> Bool {
if UserDefaults.standard.bool(forKey: "Is_rtl") {
return UIApplication.shared.userInterfaceLayoutDirection == .leftToRight // for rtl
}else{
return UIApplication.shared.userInterfaceLayoutDirection == .rightToLeft
}
}

for sliderText flipped text :

func mt_flipView() {
if UserDefaults.standard.bool(forKey: "Is_rtl") {
self.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
}else{
self.transform = CGAffineTransform(scaleX: 1.0, y: 1.0)
}
}

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