1

I have a dropdown which is working properly in english, but when the language changes to Arabic it doesn't show in the right position.

DropDown1.anchorView = self.ClassButton

result with english language

result with arabic language

Leo
  • 2,328
  • 2
  • 21
  • 41
  • Do you have issue in language or in dropdown position? – dahiya_boy Nov 13 '17 at 12:22
  • dropdown is working properly but with arabic language it does not show on proper position.u can see attachment – praveen srivastava Nov 13 '17 at 12:28
  • Do you know if this is related to the writing orientation? I'm just guessing here because I never worked with an app in Arabic. Maybe this works for: https://stackoverflow.com/a/31877713/6361488 – Yago Zardo Nov 13 '17 at 12:35

1 Answers1

1
if LanguageManager.shared.isRightToLeft {
    dropDown.layer.setAffineTransform(CGAffineTransform(scaleX: -1, y: 1))
    dropDown.customCellConfiguration = { (index: Index, item: String, cell: DropDownCell) -> Void in
        // Setup your custom UI components
        cell.optionLabel.layer.setAffineTransform(CGAffineTransform(scaleX: -1, y: 1))
    }
}
Kunal Nayek
  • 101
  • 2
  • 5