Open wajihkm opened 6 years ago
or use dropdown.semanticContentAttribute=UIApplication.isRTL() ? .forceLeftToRight : .forceLeftToRight
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))
}
}
Swift 4.2
dropDown.customCellConfiguration = {(index, item, cell: DropDownCell) -> Void in cell.optionLabel.textAlignment = .center }
When I set the language to Arabic, The list appears at the same place as English even the main anchor view change its location. The correct behavior:
In Arabic: