cdbitesky
cdbitesky

Reputation: 1396

MVVMCross iOS Supported Orientations

With the update of iOS(Monotouch) to 6, the method of choosing whether or not to rotate is no longer dependent solely on the ViewController.
With GetSupportedInterfaceOrientations and ShouldAutorotate being the method of doing so now, it is necessary to control the RootViewController. Otherwise the local override methods value will just be ignored.
Doing this in Objective C or even is straight Monotouch is pretty straight forward, but MVVMCross seems to handle most of the Pushing and Popping of the ViewControllers in the background, I am unable to get these methods to work with MVVMCross.

Is there some way of controlling orientation properly with MVVMCross and iOS6 or is it just not supported yet?

Upvotes: 0

Views: 371

Answers (1)

Stuart
Stuart

Reputation: 66882

MvvmCross pushes and pops the viewcontrollers via a component called the presenter. This is what provides the RootController and helps it interact with its children.

It's easy to customise and override the presenter in the App Setup.cs process - you can implement and return your custom presenter in protected override IMvxTouchViewPresenter CreatePresenter().

For some examples on this, see http://slodge.blogspot.co.uk/2013/06/presenter-roundup.html

Upvotes: 1

Related Questions