Jorge Vega Sánchez
Jorge Vega Sánchez

Reputation: 7590

Subarray from NSMutableArray

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.

Upvotes: 7

Views: 9290

Answers (1)

EmptyStack
EmptyStack

Reputation: 51374

Use subarrayWithRange: method of NSArray.

Upvotes: 18

Related Questions