相关疑难解决方法(0)

iPhone核心数据"生产"错误处理

我已经在Apple引用的示例代码中看到了如何处理Core Data错误.即:

NSError *error = nil;
if (![context save:&error]) {
/*
 Replace this implementation with code to handle the error appropriately.

 abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development. If it is not possible to recover from the error, display an alert panel that instructs the user to quit the application by pressing the Home button.
 */
    NSLog(@"Unresolved error %@, …
Run Code Online (Sandbox Code Playgroud)

iphone error-handling core-data

83
推荐指数
4
解决办法
9143
查看次数

在iPhone应用程序中调用exit(0)

在我的应用程序的某些时候,我已经完成了这个exit(0)崩溃我的应用程序.但我还没弄清楚在执行时调用哪种方法.

我把消息放入:

(void)applicationWillTerminate:(UIApplication *)application
(void)applicationDidEnterBackground:(UIApplication *)application
Run Code Online (Sandbox Code Playgroud)

但这一切似乎都没有被召唤!什么方法在exit(0)完成时被调用?

iphone objective-c exit ios

5
推荐指数
3
解决办法
1万
查看次数

标签 统计

iphone ×2

core-data ×1

error-handling ×1

exit ×1

ios ×1

objective-c ×1