开发者

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).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜