Closed steveoleary closed 9 years ago
Confirmed. I'll fix the bug as soon as possible. That is, as soon as university let's me ;)
To be honest, I have no clue how to fix this :/
RMPickerViewController uses an additional UIWindow to show the picker view above all other views. If I do not use an additional UIWindow and instead add the picker view controller to the current view hierarchy, the swipe gesture of UINavigationControllers to go back, is still enabled and messes up everything. See: https://github.com/CooperRS/RMDateSelectionViewController/issues/28
So, I'll need an additional UIWindow. Then I want to support rotation. But when a UIWindow auto rotates, it shows a black background hiding everything behind it. That's not what I want, so I have to disable rotation of a UIWindow and handle it myself (done by setting the root view controller of the additional UIWindow which returns NO on shouldAutoRotate).
That's why I'm setting the frame of an UIWindow when showing the picker view and when rotating. This works on iOS 7 and 8 on all devices. Except for the iPhone 6/6+. On these devices something weird is done when setting UIWindow frames.
Maybe, someone can help me out?
It seems this issue is resolved (at least for me) by including my storyboard file in 'Launch Screen File' under App Icons and Launch Images. You can use a .nib file in it's place if you don't have a storyboard. I got the clue from here
http://stackoverflow.com/questions/26030420/iphone-6-orientation-transform-issue-uiwindow-object
So i guess this comes under the realm of iOS bug?
Really nice control btw, thanks
So i guess this comes under the realm of iOS bug?
Seems to be related to the question whether or not an app is optimized for iPhone 6/6+. My demo project was not optimized. If you add a Launch Screen file it is optimized. The control also works as expected when you add a good old Default.png of the right size. In this case the app also is treated as an optimized app.
Seems my assumption is right. See: https://github.com/CooperRS/RMDateSelectionViewController/issues/39
When showing the picker in landscape orientation on iPhone 6/6+ the picker view is not displayed in it's entirety. The issue is not present when first displaying the picker in portrait orientation and then rotating. It is also not present on iPhone 5s/4s or iPad.