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

Popular posts from this blog

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -

jasper reports - How to center align barcode using jasperreports and barcode4j -

django - CommandError: You must set settings.ALLOWED_HOSTS if DEBUG is False -