Merge pull request #78 from dpeek/fix/disable-layer-resize-animation

Disables default system animation when resizing AVPlayerLayer
This commit is contained in:
Brent Vatne 2015-07-18 20:32:59 -07:00
commit cb3c519195

View File

@ -389,7 +389,10 @@ static NSString *const statusKeyPath = @"status";
- (void)layoutSubviews - (void)layoutSubviews
{ {
[super layoutSubviews]; [super layoutSubviews];
[CATransaction begin];
[CATransaction setAnimationDuration:0];
_playerLayer.frame = self.bounds; _playerLayer.frame = self.bounds;
[CATransaction commit];
} }
#pragma mark - Lifecycle #pragma mark - Lifecycle