如何使用NSPredicate過濾數組中的對象 - > _ title變量等於變量標題?我嘗試了下面的內容,但它沒有過濾任何東西。NSPredicate filter array
NSMutableArray *array = [[posts mutableCopy] autorelease];
NSString *title = [[TBForrstr sharedForrstr] stringForPostType:type];
[array filterUsingPredicate:[NSPredicate predicateWithFormat:[NSString stringWithFormat:@"SELF->_title == %@", title]]];
'stringWithFormat:'不是真的必要時,直接使用'predicateWithFormat:'! – V1ru8 2011-12-21 16:28:44
我的不好。複製/粘貼:D。固定。 – Jeremy 2011-12-21 16:30:22