JTRevealSideBar UI is not getting displayed properly in landscape mode on iPhone and iPad
Asked Answered
M

1

26

In my project I am using JTRevealSideBar to show side table UI, but when I am changing iPad/iPhone from portrait to landscape mode the UI iss getting disturbed http://screencast.com/t/EDi8xbsvV

    - (CGRect)applicationViewFrame {
CGRect appFrame = [[UIScreen mainScreen] applicationFrame];
CGRect expectedFrame = [self.view convertRect:appFrame fromView:nil];
return expectedFrame;

}

- (UIView *)viewForLeftSidebar {
CGRect mainFrame = [self.navigationController applicationViewFrame];
if (!self.leftSidebarViewController) {
    SP2SideBarViewController * sideController = [[SP2SideBarViewController alloc] initWithStyle:UITableViewStylePlain];
    self.leftSidebarViewController = sideController;
    [sideController release];
    self.leftSidebarViewController.sidebarDelegate = self;

    if ( self.callerAppName )
        [self.leftSidebarViewController setLaunchAppName:self.callerAppName];

    if ([UIHelper isPad]) {
        self.leftSidebarViewController.view.frame = CGRectMake(0, mainFrame.origin.y, SIDEBAR_IPAD_WIDTH, mainFrame.size.height);

    } else {
        self.leftSidebarViewController.view.frame = CGRectMake(0, mainFrame.origin.y, 170, mainFrame.size.height);
    }

    self.leftSidebarViewController.title = @"LeftSidebarViewController";
    self.leftSidebarViewController.view.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleHeight;
}

self.leftSidebarViewController.slideDecksCount = [slideDecks count];
self.leftSidebarViewController.jsonDecksCount = [self.jsonDecks count];
// [self.leftSidebarViewController.tableView reloadData];
return self.leftSidebarViewController.view;
}

Thanks in advance

Matta answered 5/6, 2013 at 11:39 Comment(3)
When I am installing app first at that time only I am getting this UI issue rather than UI is working fineMatta
I can't open the link you sharedTiertza
Please check now thanksMatta
B
0

Try this for side menu apps its working fine in ios6,ios7.

https://github.com/mikefrederick/MFSideMenu

Brisco answered 21/12, 2013 at 6:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.