Skip to content


Subversion checkout URL

You can clone with
Download ZIP


ViewDeck automatically pass the left controller to setAutoresizingMask:UIViewAutoresizingFlexibleWidth #247

cyrilchampier opened this Issue · 2 comments

2 participants


I would like to have a left menu (like in facebook) of a fixed size, and set
leftSize to (self.view.bounds.size.width - leftController_.view.bounds.size.width).

My controller is not UIViewAutoresizingFlexibleWidth, but it seems that IIViewDeckController automatically set this property, and I am unable to have a constant width without commenting the lines 817-819 of IIViewDeckController.m

In fact I think that there is a bigger pb: ViewDeck does not support iOs 6 rotations ?
If I launch the examples on my iOs6 iPad in landscape mode, I got strange behaviors.
If I launch in portrait and then turn into landscape it works correctly.

I think there might be a problem with view bounds that are "buggued" in iOs6:
in a controller, self.view.frame always returns portrait dimensions into viewDidAppear.


To have the desired behavior, I had to add this into my container controller viewDidAppear:

deckController_.sizeMode = IIViewDeckViewSizeMode;
deckController_.leftSize = leftController_.view.bounds.size.width;

And replace in IIViewDeckController viewWillAppear (line 817):

[self doForControllers:^(UIViewController* controller, IIViewDeckSide side) {
  controller.view.frame = self.sideViewBounds;
  controller.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

By this:

[self doForControllers:^(UIViewController* controller, IIViewDeckSide side) {
  controller.view.frame = CGRectMake(self.sideViewBounds.origin.x,
  //                controller.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

Or use IISideViewController.

@Inferis Inferis closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.