@@ -235,10 +235,10 @@ - (void)stopActivityAnimating
235
235
- (void )setProgress : (CGFloat)progress
236
236
{
237
237
#if !defined(CT_APP_EXTENSIONS)
238
- [[ UIApplication sharedApplication ] setNetworkActivityIndicatorVisible: ( progress < 1 )] ;
238
+ [UIApplication sharedApplication ]. networkActivityIndicatorVisible = progress < 1 ;
239
239
#endif
240
240
[self .progressView setProgress: progress animated: (progress < 1 )];
241
- [ self .progressView setHidden: ( progress == 1 )] ;
241
+ self.progressView . hidden = progress == 1 ;
242
242
}
243
243
244
244
// To mimic image downloading progress
@@ -311,7 +311,7 @@ - (void)bind:(AVPlayerItem *)playerItem requestInfo:(NSDictionary *)info
311
311
312
312
CALayer *layer = self.imageView .layer ;
313
313
[layer addSublayer: playerLayer];
314
- [ playerLayer setFrame: layer.bounds] ;
314
+ playerLayer. frame = layer.bounds ;
315
315
316
316
self.player = player;
317
317
@@ -487,11 +487,11 @@ - (void)addGestureRecognizers
487
487
UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc ] initWithTarget: self action: @selector (handleTapping: )];
488
488
UITapGestureRecognizer *doubleTap = [[UITapGestureRecognizer alloc ] initWithTarget: self action: @selector (handleTapping: )];
489
489
490
- [ doubleTap setNumberOfTapsRequired: 2.0 ] ;
490
+ doubleTap. numberOfTapsRequired = 2.0 ;
491
491
[singleTap requireGestureRecognizerToFail: doubleTap];
492
492
493
- [ singleTap setDelegate: self ] ;
494
- [ doubleTap setDelegate: self ] ;
493
+ singleTap. delegate = self;
494
+ doubleTap. delegate = self;
495
495
496
496
[self addGestureRecognizer: singleTap];
497
497
[self addGestureRecognizer: doubleTap];
@@ -523,7 +523,7 @@ - (void)scrollViewWillBeginZooming:(UIScrollView *)scrollView withView:(UIView *
523
523
524
524
- (void )scrollViewDidZoom : (UIScrollView *)scrollView
525
525
{
526
- [ self setScrollEnabled: ( self .zoomScale != self .perspectiveZoomScale)] ;
526
+ self. scrollEnabled = self.zoomScale != self.perspectiveZoomScale ;
527
527
528
528
if (self.shouldUpdateConstraints )
529
529
{
@@ -607,9 +607,9 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N
607
607
{
608
608
if (object == self.player && [keyPath isEqual: @" currentItem.loadedTimeRanges" ])
609
609
{
610
- NSArray *timeRanges = [ change objectForKey: NSKeyValueChangeNewKey ];
610
+ NSArray *timeRanges = change[ NSKeyValueChangeNewKey ];
611
611
612
- if (timeRanges && [ timeRanges count ] )
612
+ if (timeRanges && timeRanges. count )
613
613
{
614
614
CMTimeRange timeRange = [timeRanges.firstObject CMTimeRangeValue ];
615
615
0 commit comments