Hi,
I have got a bit of an issue with trying to get a line break to appear in a UILabel view. I have looked around on this forum and several other and found fixes for specific cases but none that seems to work for me.
I am using:
Code:
NSString *response = [NSString stringWithContentsOfURL:requestURL encoding:NSASCIIStringEncoding error:&error];
To hit my server which calls a php script that returns a string to my app. My app then uses:
Code:
NSArray *myArray = [[tableData objectAtIndex:row] componentsSeparatedByString:@"/484"];
to split the string that we returned into an array of smaller strings. I then set the text of a label to one of these smaller strings as follows:
Code:
[myLabel setText:[myArray objectsatIndex:0]];
The string stored in the array is definitely valid, and contains a "\n", and a "\r" just in case, but when I load the app it just displays the "\n" and "\r" as text and does not move to the next line.
If anyone has any idea why this is happening, or how I might be able to fix it, it would be much appreciated.
Thanks