-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto-rotation happens even when presenting controller returns 'shouldAutoRotate' as 'NO' #64
Comments
Yeah, I see what the problem is. Making the alert view controller have the same rotation behavior as the user window's current view controller wouldn't be too hard. The coordinator would have to figure out rotation behavior from the user window's view controller and apply it to the alert view controller as well. I probably won't have time to look at this until next weekend, so if feel free to give it a shot if you're feeling adventurous. I can give you a few pointers if you want. Otherwise, I hope I can issue a fix next weekend. |
I would love to have a shot at it, but:
In terms of impact, the issue doesn't bother us too much, thought its worth mentioning hence this ticket. |
Sure, no problem! I'll get to it eventually, thanks for bringing it up. |
👍 Thanks again for a super useful library. |
Sure, no problem! Glad you like it. |
I tried it myself, and I believe this is fixed now. Please let me know if you're still encountering issues! |
Great! Verify from :head or from latest in CocoaPods mater repo? |
I haven't updated CocoaPods yet, so you'll want to pull the latest from here until CocoaPods is up to date as well. |
OK |
Verified here. 👍 |
Hello, soon a new pod version contains this fix? |
Yes, I'll look into updating the CocoaPods version to include this and a number of other fixes soon. |
Using SDCAlertView as follows, the controller that presents the alert view returns
shouldAutoRotate
as 'NO', however SDCAlertView sill rotates.Is there an easy way to turn this off?
Its not possible to use SDCAlertController, as the view is being presented as follows:
[self presentViewController]
except it has a custom animation on presentation, and uses UIToolbar to give a real-time iOS blur on the camera feed.(seems SDCAlertController doesn't like the above), but SDCAlertView is happy enough, except for the minor issue of unwanted auto-rotation.
Presenting Controller
The window has been given a root view controller, in this case a dedicated one, with its view having containers matching the diagram below.
willMoveToParentController
, etc) when presenting dismissing contained views.The implementation of shouldAutoRotate in the custom root controller is:
. . . the above autoRotate works as expected everywhere except for the SDCAlertView that is being presented as described. Adding a debug shows that:
shouldAutoRotate
returns the auto-rotation of _overlayController.topViewController, which is 'NO'. Yet auto-rotation still happens.The text was updated successfully, but these errors were encountered: