Open vp-Petkov opened 7 years ago
same here... Did you discover any workaround?
Workaround: I fixed the issue by applying an affine transform on the drop down menu, and applying another affine transform on the child views of the child views of the menu:
if Utility.isRTL() {
// Flip the drop down menu (To make it appear on the other side)
self.mainDropDownMenu.layer.setAffineTransform(CGAffineTransform(scaleX: -1, y: 1))
// Flip the subviews of the subviews
for view in self.mainDropDownMenu.subviews {
for view in view.subviews {
view.layer.setAffineTransform(CGAffineTransform(scaleX: -1, y: 1))
}
}
}
Utility.isRTL()
is a method that decides whether the application is running in RTL mode or not.
I know this is not the best way to do it!
or use dropdown.semanticContentAttribute=UIApplication.isRTL() ? .forceLeftToRight : .forceLeftToRight
if you change the semantic of the layout of your app to RTL the positioning of the drop down on the x axis is not respecting it.