Skip to content

Commit

Permalink
fixed spelling and added method for setting current time with animation
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy G committed Sep 19, 2017
1 parent 99aa6ef commit 00995d1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
- (CALayer *)maskLayerFromImage:(UIImage *)image
withFrame:(CGRect)frame;

- (void)setCurrentTime:(NSTimeInterval)currentTime
animated:(BOOL)animated;
@end


Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ - (void)awakeFromNib {
- (void)prepareForReuse {

[super prepareForReuse];

[self setViewState:QMMediaViewStateNotReady];

self.progress = 0.0;
self.previewImageView.image = nil;

Expand All @@ -89,7 +91,8 @@ - (void)prepareForReuse {
}
}

- (void)setCurrentTime:(NSTimeInterval)currentTime {
- (void)setCurrentTime:(NSTimeInterval)currentTime
animated:(BOOL)animated {

if (_currentTime == currentTime) {
return;
Expand All @@ -103,6 +106,12 @@ - (void)setCurrentTime:(NSTimeInterval)currentTime {
self.durationLabel.text = [self timestampString:currentTime forDuration:_duration];
}


- (void)setCurrentTime:(NSTimeInterval)currentTime {
[self setCurrentTime:currentTime
animated:NO];
}

- (void)showLoadingError:(NSError *)error {

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef NS_ENUM(NSInteger, QMMediaViewState) {
@property (nonatomic, assign) CGFloat progress;

/**
Sets the placeholder image.
Sets the thumbnail image.
*/
@property (nonatomic, strong) UIImage *thumbnailImage;

Expand Down

0 comments on commit 00995d1

Please sign in to comment.