iOSDropDown
iOSDropDown copied to clipboard
Option list layout not correct after rotation
Hi,
when the option list is displayed and then rotating the device you face that option list is not positioned correctly below the DropDown text field.
Any idea how to fix this? What shall I call on UIViewController's willTransition callback?
Thanks for your help, cheers, Thomas
I also got this issue, have you found any solution?
I just solved it, please comment pointToParent = getConvertedPoint(self, baseView: parentController?.view), and then move it outside the if(). please check the following sample code and you can solve the issue. It means every showList would get the latest point from parent view.
public func showList() {
if parentController == nil{
parentController = self.parentViewController
backgroundView.frame = parentController?.view.frame ?? backgroundView.frame
//pointToParent = getConvertedPoint(self, baseView: parentController?.view)
}
pointToParent = getConvertedPoint(self, baseView: parentController?.view)
parentController?.view.insertSubview(backgroundView, aboveSubview: self)