Saturday, 31 August 2013

Objective-C: Is there any trick to avoid casting of NSArray objects?

Objective-C: Is there any trick to avoid casting of NSArray objects?

Very often I find myself casting objects in NSArray to my types, when I
want to access their specific properties with dot notation without
creating an extra variable.
Is there any cool feature or trick to tell objective-c which one class of
objects I'm going to store to NSArray, so that compiler will assume
objects in an array to be my type, not an id?

No comments:

Post a Comment