Note that there are some explanatory texts on larger screens.

plurals
  1. PO[self.view addSubview:_topViewController.view]; autorotation issue
    text
    copied!<p>Really been stuck for this for weeks. I am using <a href="https://github.com/edgecase/ECSlidingViewController" rel="nofollow">ECSlidingViewController</a>, and i want one view, to be able to rotate to landscape and portrait, as it is a landscape photo, and needs to make use of available space, whilst i don't want the rest of the app to rotate, just stay in landscape. </p> <p>I'm sure the autorotation methods are not getting called as it uses this technique to switch to views...</p> <pre><code>- (void)setTopViewController:(UIViewController *)theTopViewController { CGRect topViewFrame = _topViewController ? _topViewController.view.frame : self.view.bounds; [self removeTopViewSnapshot]; [_topViewController.view removeFromSuperview]; [_topViewController willMoveToParentViewController:_topViewController]; [_topViewController removeFromParentViewController]; _topViewController = theTopViewController; [self addChildViewController:self.topViewController]; [self.topViewController didMoveToParentViewController:self]; [_topViewController.view setAutoresizingMask:self.autoResizeToFillScreen]; [_topViewController.view setFrame:topViewFrame]; _topViewController.view.layer.shadowOffset = CGSizeZero; _topViewController.view.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.view.layer.bounds].CGPath; [self.view addSubview:_topViewController.view]; } </code></pre> <p>And on my initialviewcontroller...</p> <pre><code>self.topViewController = [storyboard instantiateViewControllerWithIdentifier:@"Home"]; </code></pre> <p>So it's just stacking on top, rather than switching to this view. So, its always listening to initial view controllers rotation methods...</p> <p>Help is much appreciated, as i said i have been stuck for days...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload