# 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.
没有合适的资源?快使用搜索试试~ 我知道了~
iOS 视频剪辑 ICGVideoTri...
共27个文件
m:7个
h:6个
plist:2个
需积分: 17 4 下载量 90 浏览量
2019-09-17
19:12:26
上传
评论
收藏 64KB ZIP 举报
温馨提示
iOS 视频剪辑 ICGVideoTrimmer ,ICGVideoTrimmer 是视频快速剪辑库,模仿 Instagram。
资源推荐
资源详情
资源评论
收起资源包目录
ICGVideoTrimmer.zip (27个子文件)
ICGVideoTrimmer-master
.gitignore 600B
ICGVideoTrimmer.podspec 977B
README.md 3KB
ICGVideoTrimmer
AppDelegate.h 278B
ViewController.h 216B
Base.lproj
Main.storyboard 9KB
LaunchScreen.xib 4KB
main.m 335B
Images.xcassets
AppIcon.appiconset
Contents.json 585B
Info.plist 1KB
AppDelegate.m 2KB
ViewController.m 9KB
ICGVideoTrimmerTests
Info.plist 749B
ICGVideoTrimmerTests.m 884B
LICENSE 1KB
Source
ICGThumbView.h 679B
ICGRulerView.m 3KB
ICGThumbView.m 3KB
ICGVideoTrimmer.h 315B
ICGVideoTrimmerView.h 2KB
ICGVideoTrimmerView.m 19KB
ICGRulerView.h 722B
ICGVideoTrimmer.xcodeproj
project.xcworkspace
contents.xcworkspacedata 160B
xcshareddata
ICGVideoTrimmer.xccheckout 1KB
project.pbxproj 20KB
xcuserdata
huongdo.xcuserdatad
xcschemes
ICGVideoTrimmer.xcscheme 4KB
trimmer.gif 38KB
共 27 条
- 1
资源评论
weixin_38744207
- 粉丝: 344
- 资源: 2万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功