Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
所以,我有一个包含 NSString 的 NSArray。如何将 NSArray 转换为 NSString 用新行分隔它们。
使用componentsJoinedByString:
NSString *combinedString = [myArray componentsJoinedByString:@"\n"];