jonhory / livesendgift Goto Github PK
View Code? Open in Web Editor NEW直播发送弹幕效果
License: MIT License
直播发送弹幕效果
License: MIT License
hi 觉得您的文章写得不错,您可以授权文章发表在 http://www.code4app.com 上面么?期待您的回复!
Code4App 是一个移动平台的代码库。
Code4App 收集了 iOS 平台近 5 千份代码。
我们不需要造轮子,我们应该将我们的聪明才智发挥到其他更 牛逼 的创意上去。
在testVC中添加这段代码。
预加载礼物,3个以内是没问题的,3个以上的话,如果使用的是animatedWithGiftModel的话,后面加入的数字会一直累加(我发现是加载3个以上时toNumber会变成一个很大的值)
①:点击first,fourth,fifth,然后再快递点击third,third显示从1开始
②:点击first,fourth,fifth,然后再点击third一次,然后再快速点击third多次,third显示从99开始,然后累加了起来
我这边是个直播项目,然后送的礼物次数到达一定次数以后最上面那一行就不显示动画了,然后是第二行不显示,最后整个都不显示了。
这个功能怎么调用
- (LiveGiftShowCustom *)customGiftShow{
if (!_customGiftShow) {
_customGiftShow = [LiveGiftShowCustom addToView:self.view];
_customGiftShow.addMode = LiveGiftAddModeAdd;
[_customGiftShow setMaxGiftCount:3];
[_customGiftShow setShowMode:LiveGiftShowModeFromTopToBottom];
[_customGiftShow setAppearModel:LiveGiftAppearModeNone];
[_customGiftShow setHiddenModel:LiveGiftHiddenModeNone];
[_customGiftShow enableInterfaceDebug:NO];
_customGiftShow.delegate = self;
}
return _customGiftShow;
}
在加载本地gif的时候cpu会暴增 <使用YYimage加载>
使用 时内存会暴增
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.