Subarray from NSMutableArray

Jorge Vega Sánchez picture Jorge Vega Sánchez · Dec 15, 2011 · Viewed 9k times · Source

I have a NSMutableArray with many objects. Can i extract a subarray from index range 'i' to 'j' directly? Yeah i know i can do a loop and use objectAtIndex:x and extract each object to a new.

I need to call a method which input is an array and want to use this array only with validate data.

Answer

EmptyStack picture EmptyStack · Dec 15, 2011

Use subarrayWithRange: method of NSArray.