老师我用xcode7按你说的,没法实现窗口底色变红,而且启动程序报thread1:singal SIGABRT??
老师我用xcode7按你说的录入代码,没法实现窗口背景色变红,而且启动程序报thread1:singal SIGABRT??
这是怎么回事呀?
老师我用xcode7按你说的录入代码,没法实现窗口背景色变红,而且启动程序报thread1:singal SIGABRT??
这是怎么回事呀?
2016-03-23
老师用的xcode版本较老,最新版xcode中的代码应该这样写
AppDelegate.m文件:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
_navigationController=[[UINavigationController alloc]initWithRootViewController:[[ViewController 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;
举报