how can i check if an property is set in an Core Data Object?
I load all my Core Data Objects in an Directory:
var formQuestions = [Questions]()
And my Core Data NSManagementObject is:
@NSManaged var noticeText: String
formQuestions[indexPath.row].noticeText
// load with:
var fetchRequest = NSFetchRequest(entityName: "Questions")
fetchRequest.predicate = NSPredicate(format: "forms = %@", currentForm!)
formQuestions = context.executeFetchRequest(fetchRequest, error: nil) as [Questions]
My property "noticeText" could be empty or not, so when i create my Core Data Object some values could be not set. (The property is set as optional in Core Data)
When i now try to proove if there is a value, it always brings me an "EXC_BAD_ACCESS...."
if(formQuestions[indexPath.row].noticeText.isEmpty == false)
I could set an empty String when i create my Core Data Object, but that should be not a good solution.
So how can i check if an (optinal) and not setted value exists?
Thanks in advance.