if ([dict objectForKey:@"photo"] !=(id)[NSNull null])
{NSLOG(@"dictinary is not empty")}
This is not working for me. to check empty tag
Use count
.
For example:
if ([dict count] == 0) {
NSLog("empty");
}
If you want to check for a key then:
if([dict objectForKey:@"photo"]) {
NSLog(@"There's an object in photo");
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With