ios - NSPredicate with ANY and "=nil" doesn't work -
this condition works
nspredicate *predicate = [nspredicate predicatewithformat: @"any region.beacons.major = %d",rangedbeacon.major.intvalue];
but not
nspredicate *predicate = [nspredicate predicatewithformat: @"any region.beacons.minor = nil"];
beacons list inside region object. major , minor have type nsnumber
you may try this:
nspredicate *predicate = [nspredicate predicatewithformat:@"any region.beacons.minor = $minor"]; predicate = [predicate predicatewithsubstitutionvariables: [nsdictionary dictionarywithobject:[nsnull null] forkey: @"minor"]];
Comments
Post a Comment