# ICGVideoTrimmer
A library for quick video trimming based on `SAVideoRangeSlider`, mimicking the behavior of Instagram's.
![Screenshot](https://raw.githubusercontent.com/itsmeichigo/ICGVideoTrimmer/master/trimmer.gif)
## Note
I've made this very quickly so here's a list of things to do for improvements (pull requests are very much appreciated!):
- ~~Make panning thumb views smoother~~
- ~~Make ruller view more customizable~~
- ~~Added video tracker, mimicking the behaviour of Instagram's~~ - [@FabKremer](https://github.com/FabKremer)
- Bug fixes if any
- More and more, can't remember right now hahha.
## Getting started
#### Using CocoaPods:
Just add the following line in to your pod file:
pod 'ICGVideoTrimmer'
#### Manually add ICGVideoTrimmer as a library:
Drag and drop the subfolder named `Source` in your project and you are done.
### Usage
Create an instance of `ICGVideoTrimmer` using interface builder or programmatically. Give it an asset and set the delegate. You can select theme color for the trimmer view and decide whether to show the ruler view by setting the properties. Finally, don't forget to call `resetSubviews`!
```objective-C
[self.trimmerView setThemeColor:[UIColor lightGrayColor]];
[self.trimmerView setAsset:self.asset];
[self.trimmerView setShowsRulerView:YES];
[self.trimmerView setRulerLabelInterval:10];
[self.trimmerView setTrackerColor:[UIColor cyanColor]];
[self.trimmerView setDelegate:self];
[self.trimmerView resetSubviews];
```
If necessary, you can also set your desired minimum and maximum length for your trimmed video by setting the properties `minLength` and `maxLength` for the trimmer view. By default, these properties are 3 and 15 (seconds) respectively.
You can also customize your thumb views by setting images for the left and right thumbs:
```objective-C
[self.trimmerView setLeftThumbImage:[UIImage imageNamed:@"left-thumb"]];
[self.trimmerView setRightThumbImage:[UIImage imageNamed:@"right-thumb"]];
```
See the project example to see how to manage the tracker on a video.
## Requirements
ICGVideoTrimmer requires iOS 7 and `MobileCoreServices` and `AVFoundation` frameworks. Honestly I haven't tested it with iOS 6 and below so I can't be too sure if it's compatible.
### ARC
ICGVideoTrimmer uses ARC. If you are using ICGVideoTrimmer in a non-arc project, you
will need to set a `-fobjc-arc` compiler flag on every ICGVideoTrimmer source files. To set a
compiler flag in Xcode, go to your active target and select the "Build Phases" tab. Then select
ICGVideoTrimmer source files, press Enter, insert -fobjc-arc and then "Done" to enable ARC
for ICGVideoTrimmer.
## Contributing
Contributions for bug fixing or improvements are welcome. Feel free to submit a pull request.
## Licence
ICGVideoTrimmer is available under the MIT license. See the LICENSE file for more info.
weixin_38744207
- 粉丝: 344
- 资源: 2万+
最新资源
- influxdb-1.7.11-linux-amd64.tar.gz
- 自己总结的嵌入式单片机复习资料 纯干货知识点,重点内容由不同颜色明显区分
- 批量替换文本文件内容/txt文本批量内容替换/批量替换文本中内容【一键搜索替换】
- chrom浏览器 ChromiumSetup3.2.1.280
- 水面船舶固定时间领导跟随编队控制;固定时间编队;领导跟随算法
- 第三方浏览器下载包.apk
- MFC小游戏十三:登陆验证界面
- 三菱PLC程序 3x3升降横移基于plc的立体车库控制系统设计,所有的附件即为邮箱里的东西
- 批量替换txt文档内容 文本内容批量替换工具 v1.5.8.7
- MFC小游戏十四:最后总结
- github加速访问器nginx conf
- ideaIC-2021.2.4.exe
- 简传-win-1.4.1-x64.exe
- 高频注入foc方案,无感pmsm 永磁同步电机 无刷电机驱动器 stm32的版本,堵转力矩有,不发散,不抖动或反转,低速有力 清单:源码,原理图,matlab仿真
- 委托书 - 副本.zip
- 双馈风机惯性控制+下垂控制参与系统一次调频的Matlab Simulink模型,调频结束后转速回复,造成频率二次跌落 系统为三机九节点模型,所有参数已调好且可调,可直接运行,风电渗透率19.4% 风机
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈