Thursday, 17 April 2014

Create an array with both int, strings and other arrays


i'm trying create array (only if doesn't exist) have composed both int, strings , other arrays.
i'm doing doesen't works.
thank you

code:
if (! [mixedarray count]){      nsarray *mixedarray =  [[nsarray alloc] init];      mixedarray[0] = 5;      mixedarray[1] = @"string";      mixedarray[2] = otherarray;  }
 

why need that? sounds if there's no pattern items it'd kinda cryptic mess go through.

think want array of objects contain int, string, , perhaps else. however, if you're going use nsstrings. if 'cookie' nsstring, int value asking cookie.intvalue.
 


Forums iPhone, iPad, and iPod Touch iOS Programming


  • iPhone
  • Mac OS & System Software
  • iPad
  • Apple Watch
  • Notebooks
  • iTunes
  • Apple ID
  • iCloud
  • Desktop Computers
  • Apple Music
  • Professional Applications
  • iPod
  • iWork
  • Apple TV
  • iLife
  • Wireless

No comments:

Post a Comment