开发者

Break a text in a label in iphone

开发者 https://www.devze.com 2022-12-16 22:11 出处:网络
I am new to iphone development.I have created three labelsin a cell and i have just displ开发者_Python百科ayed the text in the corresponding labels , but i want to display the full text in the label.I

I am new to iphone development.I have created three labels in a cell and i have just displ开发者_Python百科ayed the text in the corresponding labels , but i want to display the full text in the label.I am not able to see the full text,So is there any possibility for breaking the text and show them in two lines.I am not displaying any static text .I am getting the text dynamically from the website and displaying it in the label.Please help me out.Thanks.


  1. set label's numberOfLines property to 2 (or to 0 to have any number of lines you need)
  2. set label's lineBreakMode property (e.g. to UILineBreakModeWordWrap)
  3. make sure that label's height is enough to contain 2 (or more) lines of text
0

精彩评论

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

关注公众号