ios - For loop when I don't know what objects are in an array? -
itemprop = "text">
I have an array with some objects Want loop I thought I would use id for typing.
NSArray * myArray = [[NSArray alloc] initWithObjects: @ "one string", @ "other", @ 3, zero]; (Id = some in myArray) {....} What is wrong with for loop? Why can not I use the id and what will be the proper "type" to use it.
I am a beggar in iOS Dev.
id is an intrinsic indication, so you only need all Is: Some code in myArray (for example
btw, uses continuous object syntax, such code is more legible:
@ [@ "one string", @ "other", @ 3]
Comments
Post a Comment