• Stars
    star
    623
  • Rank 72,088 (Top 2 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

iOS Video trim control

SAVideoRangeSlider

======

iOS UI Control Providing An iMovie Style Video Trim Control.

Screens

SAVideoRangeSlider screen SAVideoRangeSlider screen SAVideoRangeSlider screen SAVideoRangeSlider screen SAVideoRangeSlider screen

SAVideoRangeSlider screen
SAVideoRangeSlider screen

SAVideoRangeSlider screen

SAVideoRangeSlider screen

Youtube video

SAVideoRangeSlider youtube

Requirements

  • iOS 5+,
  • ARC.

Installation

  1. Drop SAVideoRangeSlider files into your project.
  2. Add QuartzCore.framework, AVFoundation.framework, CoreMedia.framework to your project.
  3. Add #import "SAVideoRangeSlider.h" to use it in a class.

Example Usage

SAVideoRangeSlider *mySAVideoRangeSlider = [[SAVideoRangeSlider alloc] initWithFrame:CGRectMake(10, 200, self.view.frame.size.width-20, 70) videoUrl:videoFileUrl ];
[mySAVideoRangeSlider setPopoverBubbleSize:200 height:100];
mySAVideoRangeSlider.delegate = self;
mySAVideoRangeSlider.minGap = 10; // optional, seconds
mySAVideoRangeSlider.maxGap = 30; // optional, seconds
[self.view addSubview:mySAVideoRangeSlider];

Protocols

- (void)videoRange:(SAVideoRangeSlider *)videoRange didChangeLeftPosition:(CGFloat)leftPosition rightPosition:(CGFloat)rightPosition;
- (void)videoRange:(SAVideoRangeSlider *)videoRange didGestureStateEndedLeftPosition:(CGFloat)leftPosition rightPosition:(CGFloat)rightPosition;

Customization

Use PaintCode application to make left/right slider and resizible bubble (see examples in the PaintCodeFiles directory).

Contact

Andrei Solovjev

License

SAVideoRangeSlider is available under the MIT license. See the LICENSE file for more info.