iOS - ActionSheetPicker rotating when host ViewController fixed to portrait

162 views Asked by At

I am using the ActionSheetPicker control (ActionSheetPicker-3.0 on GitHub) for popup list pickers. Everything works fine except when I rotate the iPhone. In my app target settings I've ticked all orientations except for 'Upside Down'. In most view controllers I've limited the orientation to 'Portrait' by using the following code :

- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskPortrait;
}

This locks the view controller to portrait, but the ActionSheetPicker doesn't respect this and animates itself to landscape when the device is rotated. It also has the effect of taking the status bar with it so this ends up displayed along the long edge of the phone.

How should I use the control so that it either locks to portrait, or dismisses when the device is rotated?

0

There are 0 answers