views:

469

answers:

2

how to convert NSarray into NSString in objective-c.

+3  A: 

Bearing in mind that you don't say what's in the NSArray, you can do this:

NSArray *arr = [NSArray arrayWithObjects: @"foo", @"bar", @"baz"];
[arr componentsJoinedByString: @","]
Frank Shearar
+3  A: 

Aternatively to Frank's method, which works pretty well, you could also do

NSString *myArrayString = [array description];

The default implementation of description on NSArray will print out the contents in a neatly formatted fashion.

Jasarien