17
在我的項目中,我使用JTRevealSideBar顯示邊桌UI,但是當我將縱向更改爲iPad/iPhone模式時,UI會受到干擾 http://screencast.com/t/EDi8xbsvVJTRevealSideBar UI未在iPhone和iPad上的橫向模式下正確顯示
- (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;
}
在此先感謝
當我在那個時候第一次安裝的應用程序只有我得到這個UI問題,而不是UI工作正常 – Nishi
我無法打開您共享 – LuisCien
鏈接請立即檢查感謝 – Nishi