TextUtil
一个工具类帮你三行代码实现图文混排功能。
项目截图
说明
项目中使用的表情图片是从其他地方拷贝出来的,尺寸大小不是很合适,原本都是@2x的,因为发送出来太小了,所以修改成了1倍图,如果要完整显示所有表情,修改图片名,去掉@2x,然后添加完全plist文件。
图文混排使用的三个场景例子
NSString *text = @"<微信>腾讯科技讯 微软提供免费升级的Windows 10,在全球获得普遍好评。但微软已经有一段时间没有公布最新升级数据。科技市场研究公司StatCounter发布了有关Windows升级的相关数据,显示出Windows 10的升级节奏开始放缓。<微信>另外,数据显示Windows 8用户是升级的主力军,Windows 7用户升级动力不太足。";
NSMutableAttributedString *attrStr2 = [Utility exchangeString:@"<微信>" withText:text imageName:@"header_wechat"];
怎么让 imageName 支持网络图?
我已经在model缓存了cell高度, 而且只是在请求回来之后匹配一次富文本,计算一次高度,但是还是很卡,在cell内部, 我是直接把attributestring 赋值给了textView的attributestring的.这里不知道该怎么优化,特来求助
朋友圈没数据,表情发送不出去,表情上滑动崩溃等
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.