Test if a created object is nil
I am using this code
if (managedObject == nil) {
NSLog(@"foooo");
}
开发者_开发百科
to test if the created managedObject is nil or not. But I can never print this Fooooo. Do you know what I am doing wrong?
exactly the same with comparing with nil like this
if (!managedObject) {
NSLog(@"foooo");
}
精彩评论