[TIMOB-25922] Allow programmatically disabling UI autorotation
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Richard Lustemberg |
Assignee | Eric Merriman |
Created | 2018-03-23T15:25:20.000+0000 |
Updated | 2018-03-31T23:38:55.000+0000 |
Description
There are certain circumstances when we want to prevent autorotation of views after the view's allowed orientation modes have been set and the view controller has already become the root controller. Since iOS 6 we have the shouldAutorotate which we could use to prevent the UI to apply the transforms and translations performed by UIKit.
If we add a property to Ti.App called ie. preventRotation and set from the proxy, we could enable and disable UI rotation at will. The property will then be checked by the shouldAutorotate method in TiRootController.m
I think this could be a useful feature.
// self.preventRotation defined in the class TiRootController
- (BOOL)shouldAutorotate
{
return !self.preventRotation;
}
Thanks for the ticket. Our engineers will look into it. You will be informed when they decide to integrate this. Thanks.