Commit 825878c9 authored by yuzheng's avatar yuzheng

修复playButton可能被挡住的问题

parent 333e3324
......@@ -418,6 +418,7 @@
[_playButton setImage:[UIImage tz_imageNamedFromMyBundle:@"MMVideoPreviewPlay"] forState:UIControlStateNormal];
[_playButton setImage:[UIImage tz_imageNamedFromMyBundle:@"MMVideoPreviewPlayHL"] forState:UIControlStateHighlighted];
[_playButton addTarget:self action:@selector(playButtonClick) forControlEvents:UIControlEventTouchUpInside];
_playButton.frame = CGRectMake(0, 64, self.tz_width, self.tz_height - 64 - 44);
[self.contentView addSubview:_playButton];
[self.contentView addSubview:_iCloudErrorIcon];
[self.contentView addSubview:_iCloudErrorLabel];
......@@ -475,7 +476,7 @@
self.playerLayer = [AVPlayerLayer playerLayerWithPlayer:self.player];
self.playerLayer.backgroundColor = [UIColor blackColor].CGColor;
self.playerLayer.frame = self.bounds;
[self.layer addSublayer:self.playerLayer];
[self.contentView.layer addSublayer:self.playerLayer];
[self configPlayButton];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pausePlayerAndShowNaviBar) name:AVPlayerItemDidPlayToEndTimeNotification object:self.player.currentItem];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment