incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <>
Subject [jira] [Commented] (CB-1209) CDVViewController.supportedOrientations not set in a timely fashion
Date Wed, 08 Aug 2012 15:52:21 GMT


Andrew Grieve commented on CB-1209:

Thanks Kevin!

Commit link:;a=commit;h=23b7600dffab2aec430ff2e4b112aec379515133
> CDVViewController.supportedOrientations not set in a timely fashion
> -------------------------------------------------------------------
>                 Key: CB-1209
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 2.0.0
>         Environment: Mac OS X Lion, Xcode 4.4, iOS SDK 5.1
>            Reporter: Kevin Hawkins
>            Assignee: Shazron Abdullah
>             Fix For: 2.1.0
>   Original Estimate: 2h
>  Remaining Estimate: 2h
> The iOS template app (reasonably) expects to be able to access its viewController's `supportedOrientations`
property to process the app's supported orientations, in `application:didFinishLaunchingWithOptions:`.
 However, supportedOrientations is not set until `CDVViewController`'s `viewDidLoad` method,
which isn't called until the window is made visible.  This trickles down into the status bar
being forced into a state of `UIDeviceOrientationUnknown` by the forceStartupRotation functionality
in the app delegate.
> What's more, when the status bar orientation is forced by setting UIApplication's statusBarOrientation
property explicitly, it will no longer adhere to any autorotation behavior.  This means that
the status bar is permanently set into an unknown state, which basically impacts the main
view size, since [[UIScreen mainScreen] applicationFrame] assumes an unknown state means that
it gets the whole device frame for its area.
> Making the window visible before testing the orientations is a workaround, but arguably
the initial setting of the supportedOrientations property should happen outside of the view
lifecycle (i.e. in the `init` functionality of CDVViewController), since it has no dependency
on any UI state--it reads `UISupportedInterfaceOrientations` configuration data from the app
bundle to determine valid orientations.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message