Skip to content

Loading…

autoResizeToFillScreen problem (wrong mask) #90

Closed
alexburkhay opened this Issue · 1 comment

1 participant

@alexburkhay

I think there's wrong default autoresizing mask which returned from autoResizeToFillScreen method:
-(NSUInteger)autoResizeToFillScreen
{
return (UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight |
UIViewAutoresizingFlexibleTopMargin |
UIViewAutoresizingFlexibleBottomMargin |
UIViewAutoresizingFlexibleLeftMargin |
UIViewAutoresizingFlexibleRightMargin);
}

(its setuped for all subviews
[_topViewController.view setAutoresizingMask:self.autoResizeToFillScreen];
[self.topViewSnapshot setAutoresizingMask:self.autoResizeToFillScreen];
[self.underLeftView setAutoresizingMask:self.autoResizeToFillScreen];
[self.underRightViewController.view setAutoresizingMask:self.autoResizeToFillScreen];)

When you want to fill the screen you should just set mask to UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight because subviews should have fixed margins and fulfill ecsliding view.

I think this problem is related to another one which was described in issue #38 -- i see same issue in my app: my window.rootviewcontroller is ecslidingviewcontroller and ecslidingviewcontroller.topviewcontroller is uinavigationcontroller. Its really hard to reproduce but it comes up.
After changing mask to UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight didnt see this issue but still its really hard to reproduce.

@alexburkhay

In other implementations of sliding menu mask is (UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight) or UIViewAutoresizingNone.
SWRevealViewController :
_frontView.autoresizingMask = UIViewAutoresizingNone;
[_contentView setAutoresizingMask:UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight];
PPRevealSideViewController :
self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
ViewDeck :
_wrappedController.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.centerView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;

Just for example:)

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.