Reputation: 4986
I have a UILabel being populated from data from a database. The data comes in like this:
LV:7:00 AM - 10:00 PM,S:7:00 AM - 10:00 PM,D:9:00 AM - 10:00 PM
I want it to wrap around the comma so the UILabel looks like this:
LV:7:00 AM - 10:00 PM,
S:7:00 AM - 10:00 PM,
D:9:00 AM - 10:00 PM
Upvotes: 0
Views: 656
Reputation: 9768
Try:
myLabel.text = [myString stringByReplacingOccurrencesOfString:@"," withString:@",\n"];
Upvotes: 4