How do I create an NSArray with string literals?

Posted by Kyle on Stack Overflow See other posts from Stack Overflow or by Kyle
Published on 2010-05-06T16:48:57Z Indexed on 2010/05/06 16:58 UTC
Read the original article Hit count: 223

Filed under:
|
|
|

I'm attempting to create an NSArray with a grouping of string literals, however I get the compile error "Initializer element is not constant".

NSArray *currencies = [NSArray arrayWithObjects:@"Dollar", @"Euro", @"Pound", nil];

Could someone point out what I'm doing wrong, and possibly explain the error message?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about objective-c