how to give "\n" character in label text?
I have coded like that, but can't get output:
label.text = @"hai\nyou";
but the output is hai you
. I want开发者_C百科: hai
and then you
must be in the next line.
...
label.text = @"hai\nyou";
label.numberOfLines = 0;
Try to set the "# of Lines" to 0 and let me know if it works.
Or, if you are typing in the little box in IB use option-return to insert a line feed (\n).
精彩评论