我想预测我的元素的名称。请你帮助我好吗
这是我的代码:
NSNumber *min = [NSNumber numberWithInteger:30];
NSNumber *max = [NSNumber numberWithInteger:100];
NSPredicate *predi;
predi = [NSPredicate predicateWithFormat:@"number BETWEEN %@", [NSArray arrayWithObjects:min, max, nil]];
NSArray *BoxWithPriceBetween = [array filteredArrayUsingPredicate:predi];
NSLog(@"Box %@", BoxWithPriceBetween);
这是我的结果:
2012-05-02 17:42:28.019 CoreDataTuto[2690:fb03] Box (
"<Phone: 0xba68790> (entity: Phone; id: 0xba687c0 <x-coredata:///Phone/t73E15BA0-90CA-4AEA-91B4-93BD8FD328737> ; data: {\n name = NAME6;\n number = 40;\n})",
"<Phone: 0xba64dc0> (entity: Phone; id: 0xba64df0 <x-coredata:///Phone/t73E15BA0-90CA-4AEA-91B4-93BD8FD328735> ; data: {\n name = NAME4;\n number = 33;\n})",
"<Phone: 0xba572a0> (entity: Phone; id: 0xba571e0 <x-coredata:///Phone/t73E15BA0-90CA-4AEA-91B4-93BD8FD328733> ; data: {\n name = NAME2;\n number = 33;\n})",
"<Phone: 0xba64d20> (entity: Phone; id: 0xba64d50 <x-coredata:///Phone/t73E15BA0-90CA-4AEA-91B4-93BD8FD328734> ; data: {\n name = NAME3;\n number = 43;\n})"
)
我想预测所有的名字。
谢谢 !