UIlabel 遇到\n 换行iOS

NSString  *msg;
        msg = [NSString stringWithFormat:@"%@",[[[DATA.specificSearchList objectAtIndex:indexPath.row]objectForKey:@"content"] stringByReplacingOccurrencesOfString:@"\\n" withString:@" \r\n" ]];

label.numberOfLines = 0;        //不要忘记设置这个
label.text = msg; 
原文地址:https://www.cnblogs.com/qingjoin/p/2801705.html