AssistoLab / DropDown

A Material Design drop down for iOS
MIT License
2.44k stars 625 forks source link

How to user in Localisation (arabic language) #113

Open Rushang007 opened 7 years ago

Rushang007 commented 7 years ago

currently i'm use like this:-

QtydropDown.anchorView = cell.button my button in right side but dropdown open in left side....... plz help....

omarhassansadek commented 7 years ago

//Use it to change direction off table view with language dropdown.semanticContentAttribute=UIApplication.isRTL() ? .forceLeftToRight : .forceLeftToRight //use it to change textAlign dropDown.customCellConfiguration = { (index: Index, item: String, cell: DropDownCell) -> Void in // Setup your custom UI components cell.optionLabel.textAlignment = .right }

eldesoky commented 6 years ago
    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))
        }
    }