我使用 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;
}