Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
HHK1 committed Oct 3, 2017
1 parent 69e1fd7 commit 97fe873
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ A set of tools written in swift to crop and trim videos.

To run the example project, clone the repo, and run `pod install` from the Example directory first.

### Trimming
### Trimming

![](https://media.giphy.com/media/GwZGkLiKxZcTm/giphy.gif)

Expand All @@ -31,9 +31,11 @@ it, simply add the following line to your Podfile:
pod "PryntTrimmerView"
```

For swift 3 compatibility, you can use version 1.0.1 or below.

## Usage

### Trimming
### Trimming

Create a `TrimmerView` instance (in interface builder or through code), and add it to your view hierarchy.

Expand All @@ -44,7 +46,7 @@ trimmerView.delegate = self

Access the `startTime` and `endTime` property to know where to trim your asset. You can use the `TrimmerViewDelegate` to link the trimmer with an `AVPlayer` and provide the end user with a preview. See the `VideoTrimmerViewController` inside the project to see an example.

You can also customize the trimmer view by changing its colors:
You can also customize the trimmer view by changing its colors:
```
trimmerView.handleColor = UIColor.white
trimmerView.mainColor = UIColor.orange
Expand All @@ -53,7 +55,7 @@ trimmerView.positionBarColor = UIColor.white

### Cropping

Create an instance of the `VideoCropView` and add it to your view hierarchy, then load your video into the crop view: `videoCropView.asset = asset`.
Create an instance of the `VideoCropView` and add it to your view hierarchy, then load your video into the crop view: `videoCropView.asset = asset`.

You can set the aspect ratio you want using the `setAspectRatio` method. Once you are satisfied with the portion of the asset you want to crop, call `getImageCropFrame` to retrieve the select frame. See the `VideoCropperViewController` in the example app for an actual example of how to crop the video for export.

Expand Down

0 comments on commit 97fe873

Please sign in to comment.