MyDelegate里边的设置
1.普通设置
self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen]bounds]];
self.window.backgroundColor = [UIColor orangeColor];
ViewController *vc = [[ViewController alloc]init];
self.window.rootViewController = vc;
[self.window makeKeyAndVisible];
return YES;
//这样就进入ViewController中
2.创建一个导航栏
self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen]bounds]];
self.window.backgroundColor = [UIColor orangeColor];
MyTableViewController *vc = [[MyTableViewController alloc]init];
UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:vc];
self.window.rootViewController = nvc;
[self.window makeKeyAndVisible];
return YES;
//这样进去就有一个导航栏
记得包含头文件