3

I found the ECSlidingViewController when rotate to landscape, the size of the view is not adjusted. so there is a big blank background shown. it works great in portrait.

this only happen on right side menu.

Please find the screen capture here : landscape! portrait!

update on 20-May-2014, sub class the ECSlidingViewController, add these 2 method. but the problem still there.

storyboard key path of MyECSlidingViewController

MyECSlidingViewController.m

-(BOOL)shouldAutorotate
{
    return [self.topViewController shouldAutorotate];
}

-(NSUInteger)supportedInterfaceOrientations
{
    return [self.topViewController supportedInterfaceOrientations];

}

MenuLeftViewController.m

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    NSString *menuItem = self.menuItems[indexPath.row];
    self.slidingViewController.topViewController.view.layer.transform = CATransform3DMakeScale(1, 1, 1);

    switch (indexPath.row)
    {
        case 0: // Home
            self.slidingViewController.topViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"MainPageNavigationController"];
            break; 

        case 1: // News
            self.slidingViewController.topViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"NewsNavigationController"];
            break; 

        case 2: // Songs
            self.slidingViewController.topViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"SongsNavigationController"];
            break;

        case 3: // Notifications
            self.slidingViewController.topViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PushNotificationNavigationController"];
            break;
    }


    [self.slidingViewController resetTopViewAnimated:YES];
}
user3491799
  • 322
  • 4
  • 16
  • Show some code. What does the view contain? What auto-resizing/layout are you using? How does it differ to the left view? – Wain May 16 '14 at 17:34
  • pls find the 2 new screencapture. i use storyboard to connect to each UINavigationController from the left or right menu. the default method of ECSlidingViewController is replacing the topViewController in the menuViewController – user3491799 May 20 '14 at 15:21

1 Answers1

1

Try to set shouldAutorotate supportedInterfaceOrientations
If you are trying to set orientation for different pages differently then its a different matter.
To me it seems like this is not possible to EC at the moment. For example the frame of portrait is different that frame of landscape. But when the topviewcontroller is replaced the old frame is just applied to the new topviewcontroller.

This is not a problem when all view controllers supports the same modes. But if some are limited compared to others then entering one of those gives wrong presentation

Hope its fixed in EC 2.0.

Jerin
  • 3,657
  • 3
  • 20
  • 45