で をフィルタリングしようとしarray
てNSPredicate
いますが、常に が返されますempty array
。
コード:
_contentFilteredArray = [_contentArray mutableCopy];
[_contentFilteredArray filterUsingPredicate:[NSPredicate predicateWithFormat:@"special == 1"]]; // Always return an empty array.
元の _contentArray:
(
{
id = 1;
special = 0;
},
{
id = 2;
special = 1;
},
{
id = 3;
special = 1;
},
{
id = 4;
special = 0;
}
)
_contentFilteredArray に期待すること:
(
{
id = 2;
special = 1;
},
{
id = 3;
special = 1;
},
)