UIWindow的使用,出错了。
都是按照老师的写法写的,UIWindow的使用。我这会出这个error,是怎么回事啊?求解答。。
都是按照老师的写法写的,UIWindow的使用。我这会出这个error,是怎么回事啊?求解答。。
2015-12-08
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
_navigationController=[[UINavigationController alloc]initWithRootViewController:[[UIViewController alloc] init]];
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
_window.rootViewController = _navigationController;
_window.backgroundColor = [UIColor redColor];
[_window makeKeyAndVisible];
return YES;
}
AppDelegate.h里加入
@property (strong,nonatomic)UINavigationController *navigationController;
举报