alexy13 alexy13 - 3 months ago 19
Objective-C Question

Convert NSArray to NSString in Objective-C

I am wondering how to convert an NSArray

[1,@"Hello",3,4,5]
to an string in Objective-C. An Applescript example is:

set the_array to {1,"Two", 3,4,5,6}
set the_array to the_array as string

Answer
NSString * result = [[array valueForKey:@"description"] componentsJoinedByString:@""];