iOS 实现图文混排
来源:互联网 发布:网络传输的结构形状 编辑:程序博客网 时间:2024/05/17 21:40
NSMutableAttributedString *str=[[NSMutableAttributedStringalloc] initWithString:@"设置文字"attributes:nil];
NSTextAttachment *attachment=[[NSTextAttachmentalloc] initWithData:nilofType:nil];
UIImage *img=[UIImageimageNamed:@"图片.png"];
attachment.image=img;
attachment.bounds=CGRectMake(0,0,20, 20);
NSAttributedString *text=[NSAttributedStringattributedStringWithAttachment:attachment];
[str insertAttributedString:textatIndex:2];
self.textView.attributedText=str;
1 0
- iOS 实现图文混排
- iOS实现简单图文混排效果
- iOS实现简单图文混排效果
- iOS实现简单图文混排效果
- iOS实现简单图文混排效果
- iOS实现简单图文混排效果
- iOS实现简单图文混排效果
- iOS实现简单图文混排效果
- iOS实现简单图文混排效果
- iOS实现简单图文混排效果
- iOS实现简单图文混排效果
- iOS实现简单图文混排效果
- iOS实现图文混排效果
- iOS 使用webView实现图文混排
- iOS图文混排的简易实现
- iOS实现简单图文混排效果
- iOS图文混排的简单实现
- iOS-利用NSAttributedString实现图文混排
- ioctl
- Linux 常用基本命令之十三 whereis
- iOS 时间问题
- [Leetcode]Edit Distance
- 7款让人惊叹的HTML5粒子动画特效
- iOS 实现图文混排
- JAVA读取BMP图片文件
- ADO.NET基础01(ADO.NET组成,数据库的方式,SqlCommand,SqlDataReader)
- 编译JDK
- Linux下的PCI总线驱动
- 日历签到
- php自带过滤函数
- 快速排序
- hadoop 集群环境搭建