我在目标c代码中遇到了一个问题,
我有副菜单,
除了Ipad pro-11英寸外,侧菜单在所有设备上都能成功地工作,
但是在Ipad pro-11英寸中,除了"didSelectRowAtIndexPath“之外,所有的表视图方法都能成功地工作。
我不知道问题出在哪里,
这是我的一些代码:
在附文中:
[[ApplicationDelegate window] setRootViewController: [storyboard instantiateInitialViewController]];
[[SlideNavigationController sharedInstance] initWithRootViewController:destinationViewController];
// SlideNavigation Width
int num = isTargetedSize ? 3 : 2;
CGFloat portraitSlideOffset = [UIScreen mainScreen].bounds.size.width / num;
// SlideNavigation
UIViewController *viewController = (SlideOutMenuViewController *)[storyboard instantiateViewControllerWithIdentifier: @"SlideOutMenuViewController"];
[[SlideNavigationController sharedInstance] setLeftMenu: viewController];
[[SlideNavigationController sharedInstance] setMenuRevealAnimationDuration: 0.25f];
[[SlideNavigationController sharedInstance] setEnableSwipeGesture:YES];
[[SlideNavigationController sharedInstance] setPortraitSlideOffset:portraitSlideOffset];在SlideOutMenuViewController.h
- (void)viewDidLoad {
[super viewDidLoad];
//
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
modulesArray = [defaults objectForKey:@"modulesArray"];
NSLog(@"viewDidLoad_Slide");
//
[self mapAuthModules];
// Auto resize table view cell
self.tableView.rowHeight = UITableViewAutomaticDimension;
// self.tableView.rowHeight = 44;
// self.tableView.cancelsTouchesInView = false
//
serviceGroup = dispatch_group_create();
} 我该如何解决这个问题?
发布于 2022-08-11 10:39:54
在SlideNavigationController中,您必须添加以下行
self.view.superview insertSubview:menuViewController.view atIndex:0;
https://stackoverflow.com/questions/72760685
复制相似问题