NSMutableArray removeObjectsInRange
- (void)removeObjectsInRange:(NSRange)aRange
Parameters
aRange
The range of the objects to remove from the array.
Discussion of [NSMutableArray removeObjectsInRange]
The objects are removed using removeObjectAtIndex:.
NSMutableArray removeObjectsInRange example.
NSLog(@"Length: %i",[rawData length]);
NSLog(@"Range: %i",StartTime*freq-1);
[rawData removeObjectsInRange:NSMakeRange(0, StartTime*freq-1)];
NSLog(@"Range: %i",StartTime*freq-1);
[rawData removeObjectsInRange:NSMakeRange(0, StartTime*freq-1)];
Example of [NSMutableArray removeObjectsInRange].
NSRange r;
r.location = 5;
r.length = [someArray count]-5;
[someArray removeObjectsInRange:r];
r.location = 5;
r.length = [someArray count]-5;
[someArray removeObjectsInRange:r];
NSMutableArray removeObjectsInRange example.
// Overridden Methods
- (void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray
*)otherArray range:(NSRange)otherRange;
{
[arrayLock lock];
[embeddedArray removeObjectsInRange:range];
[self addObjectsFromArray:[otherArray subarrayWithRange:otherRange]];
[arrayLock unlock];
}
- (void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray
*)otherArray;
{
[arrayLock lock];
[embeddedArray removeObjectsInRange:range];
[self addObjectsFromArray:otherArray];
[arrayLock unlock];
}
- (void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray
*)otherArray range:(NSRange)otherRange;
{
[arrayLock lock];
[embeddedArray removeObjectsInRange:range];
[self addObjectsFromArray:[otherArray subarrayWithRange:otherRange]];
[arrayLock unlock];
}
- (void)replaceObjectsInRange:(NSRange)range withObjectsFromArray:(NSArray
*)otherArray;
{
[arrayLock lock];
[embeddedArray removeObjectsInRange:range];
[self addObjectsFromArray:otherArray];
[arrayLock unlock];
}