Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25922] Allow programmatically disabling UI autorotation

GitHub Issuen/a
TypeNew Feature
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
ReporterRichard Lustemberg
AssigneeEric Merriman
Created2018-03-23T15:25:20.000+0000
Updated2018-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;
}

Comments

  1. Sharif AbuDarda 2018-03-24

    Thanks for the ticket. Our engineers will look into it. You will be informed when they decide to integrate this. Thanks.

JSON Source