开发者

Test if a created object is nil

开发者 https://www.devze.com 2023-03-17 08:32 出处:网络
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.

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");
}
0

精彩评论

暂无评论...
验证码 换一张
取 消