标签按照内容长度修改高度:
2013-09-10 17:18
232 查看
CGRect newFrame = self.labelDescription.frame;
[self.labelDescription sizeToFit];
newFrame.size = CGSizeMake(maxDescriptionWidth, self.labelDescription.frame.size.height);
self.labelDescription.frame = newFrame;
if (self.labelDescription.frame.size.height > maxDescriptionHeight) {
[self.labelDescription sizeToFit];
newFrame.size = CGSizeMake(maxDescriptionWidth, self.labelDescription.frame.size.height);
self.labelDescription.frame = newFrame;
if (self.labelDescription.frame.size.height > maxDescriptionHeight) {
相关文章推荐
- 爬虫奇遇记——如何按照标签的文本内容来抓取
- UILable高度根据内容长度自适应
- 子元素浮动后父元素自适应高度,ul->li标签设定宽高后overflow无效,li标签里面的内容多出内容会换行
- textArea tag 标签内容限制最大长度js
- cell根据文本标签内容自适应高度
- dedecms修改按tag标签显示全站相关内容的方法
- 页面显示内容按照输入时换行显示标签
- 修改select标签为可输入内容的input标签,同时在首次点击第一个下拉框时也会触发onchange事件
- DedeCMSv5.7 tag标签长度限制12字节修改方法
- css如何让<a>标签,根据输入的内容长度调整宽度,宽度自适应,那位大仙帮帮忙
- 修改dede_tag标签的长度
- JQuery动态修改select标签的内容,并绑定onchange事件,弹出选择的值
- DEDEcms的tag标签修改长度、语法及调用方法
- 点击按钮触发js获取标签里的内容并修改
- 织梦截取标题长度和去除HTML标签获取内容函数
- android actionBar修改高度内容居中
- java采用压缩解压缩方式修改word中内容或替换标签
- js获取多个标签元素的内容,并根据元素的内容修改标签的属性
- 关于使用weui.io的界面修改,已经weui中<a>标签调用script中的内容为空的解决
- U盘的文件内容如何按照修改时间排列?