[英]how to make add see more featues in UILable if length of string is more than the number of line display in lable?
我使用下面的代碼計算所需的標簽大小
CGSize expectedLabelSize = [text sizeWithFont:instructions.font
constrainedToSize:instructions.frame.size
lineBreakMode:UILineBreakModeWordWrap];
我使用下面的代碼計算標簽的行數
int numberofline = ceil(lable.frame.size.height / font.lineHeight);
在我的情況下,我只需要在按鈕上單擊3行,就可以在tableview中單擊孔文本顯示...由於修改了單元格的高度...
//請幫助我檢查如何獲取給定字體系列的字符數。
![這是演示圖像] [1]在以下鏈接上查看圖像[單擊以查看圖像演示] [1]
set屬性的UILable
noOfLines = 0 ,默認為1 。 這將自動增加您的行數 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.