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