levey/AwesomeMenu

run crash

mountainKingG opened this issue · 1 comments

AwesomeMenu[15456:271322] *** Assertion failure in -[UIApplication _runWithMainScene:transitionContext:completion:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3512.60.7/UIApplication.m:3401
2016-07-19 20:30:52.682 AwesomeMenu[15456:271322] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Application windows are expected to have a root view controller at the end of application launch'

(BOOL)application:(UIApplication )application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
self.window.backgroundColor = [UIColor whiteColor];
.............
.............
.............
UIViewController rootCtr = [[UIViewController alloc] init];
UINavigationController
nav = [[UINavigationController alloc] initWithRootViewController:rootCtr];
[rootCtr.view addSubview:menu];
[self.window setRootViewController:nav];
// [self.window addSubview:menu];
[self.window makeKeyAndVisible];
return YES;
}