iphone - how to remove duplicate value in NSMutableArray -
I am scanning Wifi information using NSMutableArray, but some duplicate values appear, so I use the following code Trying to do, but still getting a duplicate value, if ([scan_networks count]> 0) {NSArray * uniqueNetwork = [[NSMutableArray alloc] initWithArray: [[ NSSet Set Vitrara: Scan_Network] All Objects]]; [Scan_networks removeAllObjects]; NSSortDescriptor * networkName = [[[NSSortDescriptor alloc] initWithKey: @ "SSID_STR" ascending: Yes] Autoreclass]; NSArray * Notifier = [NSArray arrayWithObjects: networkName, Zero]; [Scan_networks addObjectsFromArray: [Exclusive Network Sorted Descriptor Descriptors]]; }
How can I solve it, thank you
then you can use Ansisti but if it is used only when it takes no orders, orders are for this case. I have used it and it gives the correct answer. Let your NSmutableArray Place of NSmutableArray array that contains duplicate values.
NSArray * copy = [NSmutableArray copy]; NSInteger Index = [Per Count] - 1; ([Copy to reverse object digitizing] ID object) {if ([NSmutableArray indexOfObject: Object Inrenj: Ansmkearenj (0, index)]! = NSNotFound {{NSmutableArray removeObjectAtIndex: index];} index;} [copy release];
Comments
Post a Comment