Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/LeoMobileDeveloper/LeoDanmakuKit
An iOS Danmaku Kit (添加纯文字弹幕)
https://github.com/LeoMobileDeveloper/LeoDanmakuKit
Last synced: 28 days ago
JSON representation
An iOS Danmaku Kit (添加纯文字弹幕)
- Host: GitHub
- URL: https://github.com/LeoMobileDeveloper/LeoDanmakuKit
- Owner: LeoMobileDeveloper
- License: mit
- Created: 2015-12-23T03:14:06.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-04T13:40:39.000Z (over 6 years ago)
- Last Synced: 2024-10-19T18:27:05.765Z (about 2 months ago)
- Language: Objective-C
- Homepage:
- Size: 683 KB
- Stars: 52
- Watchers: 5
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-danmaku - LeoDanmakuKit - An iOS Danmaku Kit (一个iOS的弹幕库,可以方便的添加弹幕功能) (Clients / iOS)
README
# LeoDanmakuKit
[![Version](https://img.shields.io/cocoapods/v/LeoDanmakuKit.svg?style=flat)](http://cocoapods.org/pods/LeoDanmakuKit)
[![License](https://img.shields.io/cocoapods/l/LeoDanmakuKit.svg?style=flat)](http://cocoapods.org/pods/LeoDanmakuKit)
[![Platform](https://img.shields.io/cocoapods/p/LeoDanmakuKit.svg?style=flat)](http://cocoapods.org/pods/LeoDanmakuKit)## Screenshot
## Requirements
- ARC
- iOS 7 +## Support
- Storyboard
- Auto limit buffer size
- Random color or channel
- High performance## Installation
LeoDanmakuKit is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:```ruby
pod "LeoDanmakuKit"
```## Manual installation
You can also download the Example project and copy the Class floder into your project
## Usage
```
#import "LeoDanmaku.h"
```When you add a new danmaku,you first create a `LeoDanmakuModel`,for example,you may use the random factory method build in
```
NSArray * colors = @[[UIColor redColor],[UIColor blueColor],[UIColor greenColor],[UIColor whiteColor]];
LeoDanmkuModel * danmaku = [LeoDanmkuModel randomDanmkuWithColors:colors MaxFontSize:18 MinFontSize:15];
danmaku.text = self.textfiled.text;
```Then
```
[self.danmakuView addDanmaku:danmaku];```
## About remove
When you want the view remove from superview and get dealloced,do not forget to call
```
[self.danmakuView stop]
```## Propertys
You can set the speed and other related property of LeoDanmakuChannelManager
```
@property (assign,nonatomic)CGFloat maxSpeed;//Default 100 points/s@property (assign,nonatomic)CGFloat minSpeed;//Default 50 points/s
@property (assign,nonatomic)CGFloat minSpace;//Default 20
@property (assign,nonatomic)CGFloat inverval;//Default 0.25
@property (assign,nonatomic)NSInteger channelsCount;//Number of channels
```## Author
LeoMobileDeveloper, [email protected]
## License
LeoDanmakuKit is available under the MIT license. See the LICENSE file for more info.
------
## 中文文档请见我的[博客](http://blog.csdn.net/hello_hwc/article/details/50382078)