2
我期待在以下类型的数据结构:NSPredicate与子阵列
{ author = "Author 1"; channelIds = ( 7 ); }, { author = "Author 2"; channelIds = ( 7, 1 ); }, , { author = "Author 3"; channelIds = ( 3, 7 ); }
我想建立一个由所有项的阵列,其中channeldIds = 7。
我正沿着以下谓词的行尝试新事物:
NSPredicate * filterById = [NSPredicate predicateWithFormat:@"channelIds[0] = '7'"];
- 我怎样才能做到想什么,我在这里?
- 我可以有x个channelIds,有什么方法可以迭代谓词吗?
蒂亚,S.