您的位置:首页 > 移动开发 > IOS开发

【代码笔记】iOS-用户发布后能保存崩溃

2016-07-18 10:17 441 查看
一,工程图。



二,代码。

AppDelegate.m

#import "AppDelegate.h"
#import "RootViewController.h"
#import "NdUncaughtExceptionHandler.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point for customization after application launch.

RootViewController *rootVC=[[RootViewController alloc]init];
UINavigationController *nav=[[UINavigationController alloc]initWithRootViewController:rootVC];
self.window.rootViewController=nav;

//使用方法
[NdUncaughtExceptionHandler setDefaultHandler];

self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}


内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: