How to concatenate all array values ​​in Xcode


This question already has an answer here:

  • Join an Array in Objective-C 3 answers

I am new in iOS and i am not able to find solution of my question . So please tell me how can i concatenate all values of array in iOS

Answer : -componentsJoinedByString: .

It will join the components in the array by the specified string and return a string representation of the array.

Use : NSString *finalStr = [yourArray componentsJoinedByString:@" "];

GoodLuck !!!