Convert NSArray to NSString in Objective-C
问题 I am wondering how to convert an NSArray [@"Apple", @"Pear ", 323, @"Orange"] to a string in Objective-C . 回答1: NSString * result = [[array valueForKey:@"description"] componentsJoinedByString:@""]; 回答2: One approach would be to iterate over the array, calling the description message on each item: NSMutableString * result = [[NSMutableString alloc] init]; for (NSObject * obj in array) { [result appendString:[obj description]]; } NSLog(@"The concatenated string is %@", result); Another