editedObject undeclared
In my code I have a pretty simple
[editedObject setValue:[NSData dataWithContentsOfURL:url] forKey:editedFieldKey];
however my compiler is telling me "editedObject undeclared" as well as "editedFieldKey". This looks like I didn't #import
an API but I don't know what I need to impor开发者_Go百科t.
Not necessarily.
Doesn't have anything to do with #import unless those properties belong to another class. In which case the properties would still have to be defined.
Check where you've defined
editedObject
editedFieldKey
In your code.
You should have something in .h or .m that declares them as objects (or for editedFieldKey, a constant)
"#define editedFieldKey @"somekey"
NSString *editedObject;
or something close to that, editedObject could be any object.
精彩评论