移除array中重复的item

//move the repeated item
            NSInteger index = [orignalArray count] - 1;
            for (id object in [orignalArray reverseObjectEnumerator]) {
                if ([orignalArray indexOfObject:object inRange:NSMakeRange(0, index)] != NSNotFound) {
                    [orignalArray removeObjectAtIndex:index];
                }
                index--;
            }

posted @ 2014-08-29 11:05  如来藏  阅读(138)  评论(0编辑  收藏  举报