これは私のコードです:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
self.window.backgroundColor = [UIColor whiteColor];
//侧滑菜单
YZTabBarController *tabBarController = [[YZTabBarController alloc]init];
YZPesonalCenterViewController *personalVC = [[YZPesonalCenterViewController alloc]init];
MFSideMenuContainerViewController *container = [MFSideMenuContainerViewController containerWithCenterViewController:tabBarController leftMenuViewController:personalVC rightMenuViewController:nil];
self.window.rootViewController = container;//[[YZTabBarController alloc] init];
[self.window makeKeyAndVisible];
NSShadow *titleShadow = [[NSShadow alloc] init];
titleShadow.shadowOffset = CGSizeMake(0, 0);
titleShadow.shadowColor = [UIColor lightGrayColor];
NSDictionary *titleAttrs = [NSDictionary dictionaryWithObjectsAndKeys:[UIColor whiteColor], NSForegroundColorAttributeName, titleShadow, NSShadowAttributeName, [UIFont boldSystemFontOfSize:18.0], NSFontAttributeName, nil];
[[UINavigationBar appearance] setTitleTextAttributes:titleAttrs];
[[UINavigationBar appearance] setTintColor:[UIColor whiteColor]];
[[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"navi_back"] forBarMetrics:UIBarMetricsDefault];
// 键盘设置
IQKeyboardManager *sharedManager = [IQKeyboardManager sharedManager];
sharedManager.shouldResignOnTouchOutside = YES;
sharedManager.enableAutoToolbar = YES;
//设置状态栏样式
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
return YES;
}
エラーは次のとおりです。
キャッチされない例外 'NSInvalidArgumentException' によるアプリ、
理由: '-[MFSideMenuContainerViewController tabBar]:
認識されないセレクターがインスタンス 0x7ff6fb16f780 に送信されました'