我有一个 UILabel 是从数据库中的数据填充的。数据是这样进来的:
LV:7:00 AM - 10:00 PM,S:7:00 AM - 10:00 PM,D:9:00 AM - 10:00 PM
我希望它环绕逗号,因此 UILabel 看起来像这样:
LV:7:00 AM - 10:00 PM,
S:7:00 AM - 10:00 PM,
D:9:00 AM - 10:00 PM
最佳答案
尝试:
myLabel.text = [myString stringByReplacingOccurrencesOfString:@"," withString:@",\n"];
关于ios - 如何使 UILabel 中的文本环绕特定字符?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17005656/