我使用JTRevealSidebarV2并遇到问题。侧边栏并不总是可见。它有时是白色的。有人有解决方案吗?
这是查看和关闭侧栏的代码:
// This is an examle to configure your sidebar view through a custom UIViewController
- (UIView *)viewForLeftSidebar {
[self changeAllButtonImageUnpressed];
// Use applicationViewFrame to get the correctly calculated view's frame
// for use as a reference to our sidebar's view
CGRect viewFrame = self.navigationController.applicationViewFrame;
UITableViewController *controller = self.leftSidebarViewController; NSLog(@"Controller.view %@", controller.view);
if ( controller == nil ) {
self.leftSidebarViewController = [[SidebarViewController alloc] init];
self.leftSidebarViewController.sidebarDelegate = self;
controller = self.leftSidebarViewController;
//controller.title = @"LeftSidebarViewController";
}
controller.view.frame = CGRectMake(0, viewFrame.origin.y, 250, viewFrame.size.height);
controller.view.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleHeight;
return controller.view;
// Use applicationViewFrame to get the correctly calculated view's frame
// for use as a reference to our sidebar's view
CGRect viewFrame = self.navigationController.applicationViewFrame;
UITableViewController *controller = self.leftSidebarViewController; NSLog(@"Controller.view %@", controller.view);
if ( controller == nil ) {
self.leftSidebarViewController = [[SidebarViewController alloc] init];
self.leftSidebarViewController.sidebarDelegate = self;
controller = self.leftSidebarViewController;
//controller.title = @"LeftSidebarViewController";
}
controller.view.frame = CGRectMake(0, viewFrame.origin.y, 250, viewFrame.size.height);
controller.view.autoresizingMask = UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleHeight;
return controller.view;
答案 0 :(得分:0)
当您打开侧边栏而不是按主页键时会发生这种情况。重新打开应用程序并将其全部搞砸了