Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 11-11-2008, 07:47 PM   #3 (permalink)
PhoneyDeveloper
New Member
 
Join Date: Sep 2008
Posts: 1,431
Default

You can of course use C-style arrays in Objective-C. I do that with constant arrays, where I build them at compile time and don't modify the contents, similar to the example you showed. You can put constant pointers to objects in them, of which the most likely, or maybe only, kind is NSString*

I also sometimes will use an NSArray or NSDictionary for the same purpose. I'll have an accessor that builds the NSArray/NSDictionary lazily. These objects have some advantages over C-style arrays.
PhoneyDeveloper is offline   Reply With Quote
 

» Advertisements
» Online Users: 624
19 members and 605 guests
aijo, alphy, armmzz, brianmethod, chits12345, ckgni, claudia99, Dani77, devangvyas, Domele, drewrico, ghost, hiddendemo, JamesCahall, lilianprice, oceanlablight, Oral B, SoulRed12, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,786
Threads: 89,205
Posts: 380,600
Top Poster: BrianSlick (7,129)
Welcome to our newest member, lilianprice
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 12:13 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.