How to convert NSArray into NSString

前端 未结 4 1019
北恋
北恋 2020-12-15 11:33

How to convert NSArray into NSString in objective-c?

4条回答
  •  南笙
    南笙 (楼主)
    2020-12-15 12:14

    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.

提交回复
热议问题