I am downloading string data from the server. Data contains new line characters "\n" and when I assigned string to Label's text property, the new line characters printed as "\n" rather than having new line between lines. If I have same string stored locally, it works fine! I am getting UTF8 strings. Is that a problem?
            Asked
            
        
        
            Active
            
        
            Viewed 336 times
        
    0
            
            
         
    
    
        Paresh Masani
        
- 7,474
- 12
- 73
- 139
1 Answers
0
            Add this line to your UILabel creation
label.numberOfLines = 0;
Hope this helps you..
 
    
    
        P.J
        
- 6,547
- 9
- 44
- 74
- 
                    That was strange. I had "\n" on my server string but it was reading "\\n"!!! I had to do [myLabelText stringByReplacingOccurrencesOfString:@"\\n" withString:@"\n"] as mentioned on http://stackoverflow.com/questions/2312899/how-to-add-line-break-for-uilabel – Paresh Masani Jan 14 '13 at 16:39