Re: Finding object array index when iterating through array
Re: Finding object array index when iterating through array
- Subject: Re: Finding object array index when iterating through array
- From: Jens Alfke <email@hidden>
- Date: Tue, 06 Mar 2012 18:40:15 -0800
On Mar 6, 2012, at 12:42 PM, Prime Coderama wrote:
> Is there way to obtain the object's current array index position or do I have to add a counter?
You can add a counter, which is pretty easy. Or you can call -enumerateObjectsAtIndexes:options:usingBlock:, which passes the index as well as the object into your block.
—Jens
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden