NSMutableAttributedString计算内容长度
来源:互联网 发布:50岁知天命 编辑:程序博客网 时间:2024/05/29 17:55
目前还只会用NSMutableAttributedString计算固定宽度的内容size,如下:
1、根据内容初始化
NSMutableAttributedString *attrContent = [NSMutableAttributedStringattributedStringWithString:text];
2、设置自体
[attrContent setFont:[UIFontsystemFontOfSize:customFontSize]];
3、计算内容的高度和宽度(这里限制了最大宽度)
CGSize msgSize = [attrContentsizeConstrainedToSize:CGSizeMake(customWidth,999)];
待完善和补充。。。
- NSMutableAttributedString计算内容长度
- NSMutableAttributedString设置内容的属性
- NSMutableAttributedString
- NSMutableAttributedString
- NSMutableAttributedString
- NSMutableAttributedString
- NSMutableAttributedString
- NSMutableAttributedString
- NSMutableAttributedString
- NSMutableAttributedString
- NSMutableAttributedString
- NSMutableAttributedString
- NSMutableAttributedString
- NSMutableAttributedString
- js监听textarea 内容的变化,并计算内容的长度
- iOS计算NSMutableAttributedString、NSString指定宽度前提下的高度
- oracle字段内容长度
- 长度限制计算长度与服务器计算长度不符
- 释放SQL Server占用的内存
- C++ Boost Thread 编程指南
- DataTable多表合并 同结构和不同结构的合并
- DevCache轻量级缓存组件
- F-dd-vctools-vc7libs-ship-atlmfc-src-mfc-doctempl-cpp
- NSMutableAttributedString计算内容长度
- python读取文件末尾N行
- 自己编写错误代码的规范
- 返回到上一个页面
- 祭奠信任Nokia的那些日子
- Boost线程库学习笔记
- .net 画图 饼图折线图等
- jquery必看之学习站点及零星经验
- OutOfMemoryExceptions while remoting very large datasets,由于数据太大无法通过remoting传递