小编jai*_*kar的帖子

CoreData - 将实体的属性设置为非空 - 属性应设置为 Optional 还是 Mandatory

我需要将 Coredata 实体中的一个属性设置为非空并具有默认值。

我在 .xcdatamodeld 架构定义中为实体的属性设置了默认值

我的问题是该属性是否应标记为可选。

如果我不检查以下三个属性中的任何一个 - Transient, Optional, Indexed 会有什么影响?这个属性会被视为强制性的吗?

编辑:当我将属性设置为强制并且如果尝试设置的值为 nil 时,插入失败,错误代码为 1570 - NSValidationMissingMandatoryPropertyError,我只是希望该属性被设置为默认值并被插入。

那么有一个默认值有什么意义呢?任何人都可以帮助我在这里真正缺少的东西。

core-data ios

4
推荐指数
1
解决办法
2510
查看次数

我在我的iOS应用崩溃报告中遇到了很多SIGSEGV异常,并且在UINavigationController中也崩溃了

这是我的崩溃报告,这与iOS版本和设备无关.另外我想知道,SIGSEGV_ACCERR是与内存有关的东西.你能帮我解决一下这个问题.我有一堆崩溃报告,下面是日志

Date/Time:       2012-09-25 23:55:33 +0000
OS Version:      iPhone OS 5.1.1 (9B206)
Report Version:  104

Exception Type:  SIGSEGV
Exception Codes: SEGV_ACCERR at 0x60000008
Crashed Thread:  0

Thread 0 Crashed:
0   libobjc.A.dylib                     0x37734f78 objc_msgSend + 16
1   UIKit                               0x32e0c503 -[UINavigationController _startDeferredTransitionIfNeeded] + 251
2   UIKit                               0x32e568eb _popViewControllerNormal + 191
3   UIKit                               0x32e56719 -[UINavigationController _popViewControllerWithTransition:allowPoppingLast:] + 393
4   UIKit                               0x32e56c79 -[UINavigationController navigationBar:shouldPopItem:] + 153
5   UIKit                               0x32e56a8f -[UINavigationBar _popNavigationItemWithTransition:] + 99
6   UIKit                               0x32ea6247 -[UINavigationBar popNavigationItemAnimated:] + 123
7   UIKit                               0x32ea60d5 -[UINavigationBar _handleMouseUpAtPoint:] …
Run Code Online (Sandbox Code Playgroud)

iphone segmentation-fault ios

1
推荐指数
1
解决办法
9773
查看次数

标签 统计

ios ×2

core-data ×1

iphone ×1

segmentation-fault ×1