开发者

iPhone - plist data type item empty but not nil

开发者 https://www.devze.com 2023-02-28 17:39 出处:网络
I use a plist file to store some data, and I have into that plist file an item whose type is Data. I use it to store a little UIImage.

I use a plist file to store some data, and I have into that plist file an item whose type is Data. I use it to store a little UIImage.

When loading the开发者_运维百科 NSDictonary including this item, I see that it's not null. But I never put anything into it, I'm sure (it's a default plist item).

UIImage* test = [dict objectForKey:@"miniImage"];

How can I check if that item contains something or not ?


Do you check both nil or [NSNull null] since for value in dictionary, when it does not exist it should be [NSNull null]. Just a guess.

0

精彩评论

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