我有下面的代碼行:如何擺脫警告有關:indexForInsertingObject:sortedUsingBlock:
int insertIdx = (int)[self.itemsToDisplay indexForInsertingObject:item sortedUsingBlock:^(id a, id b) {
MWFeedItem *item1 = (MWFeedItem *) a;
MWFeedItem *item2 = (MWFeedItem *) b;
return [item1.date compare:item2.date];
}];
但XCode的給我就可以瞭如下警告:
NSMutableArray' may not respond to '-indexForInsertingObject:sortedUsingBlock:
如何擺脫這個警告?並且我可以知道在SDK中定義了哪種方法嗎? 在此先感謝這麼多...
這個項目是顯示一個正常的NSMutableArray還是你擴展NSMutableArray的? – Manuel
@ dragon112是的這是一個正常的NSMutableArray – JaHelia