NSArray *copy = [YourMutableArray copy];
NSInteger index = [copy count] - 1;
for (id object in [copy reverseObjectEnumerator]) {
if ([
YourMutableArray
indexOfObject:object inRange:NSMakeRange(0, index)]
!= NSNotFound)
{ [
YourMutableArray
removeObjectAtIndex:index];
}
index--;
}
[copy release];
Thanks @vijay this works for me...
ReplyDelete