IOS: Check Core Data Object is null
Code
@property (nonatomic,retain) TipRecord*record; |
To check the object in the code above, that should check whether the object is nil.
Code
if(self.record == nil) |
Please note that, that is a pointer. If it has not initialized yet, it will be nil, not NSNull null.
Code
if([self.record isEqualToString [NSNull null]) |
null is a value for nothings, all pointer won't be null, unless you assign that is null object to there.
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 6 feedbacks awaiting moderation...
Form is loading...