Commit 7ec52b10 authored by yuzheng.tz's avatar yuzheng.tz

视频预览和gif预览页toolbar适配iPhoneX

parent b8fee9bf
...@@ -98,8 +98,9 @@ ...@@ -98,8 +98,9 @@
_previewView.frame = self.view.bounds; _previewView.frame = self.view.bounds;
_previewView.scrollView.frame = self.view.bounds; _previewView.scrollView.frame = self.view.bounds;
CGFloat toolBarHeight = [TZCommonTools tz_isIPhoneX] ? 44 + (83 - 49) : 44;
_toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight);
_doneButton.frame = CGRectMake(self.view.tz_width - 44 - 12, 0, 44, 44); _doneButton.frame = CGRectMake(self.view.tz_width - 44 - 12, 0, 44, 44);
_toolBar.frame = CGRectMake(0, self.view.tz_height - 44, self.view.tz_width, 44);
} }
#pragma mark - Click Event #pragma mark - Click Event
......
...@@ -119,10 +119,13 @@ ...@@ -119,10 +119,13 @@
- (void)viewDidLayoutSubviews { - (void)viewDidLayoutSubviews {
[super viewDidLayoutSubviews]; [super viewDidLayoutSubviews];
CGFloat statusBarHeight = [TZCommonTools tz_statusBarHeight];
CGFloat statusBarAndNaviBarHeight = statusBarHeight + self.navigationController.navigationBar.tz_height;
_playerLayer.frame = self.view.bounds; _playerLayer.frame = self.view.bounds;
_playButton.frame = CGRectMake(0, 64, self.view.tz_width, self.view.tz_height - 64 - 44); CGFloat toolBarHeight = [TZCommonTools tz_isIPhoneX] ? 44 + (83 - 49) : 44;
_toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight);
_doneButton.frame = CGRectMake(self.view.tz_width - 44 - 12, 0, 44, 44); _doneButton.frame = CGRectMake(self.view.tz_width - 44 - 12, 0, 44, 44);
_toolBar.frame = CGRectMake(0, self.view.tz_height - 44, self.view.tz_width, 44); _playButton.frame = CGRectMake(0, statusBarAndNaviBarHeight, self.view.tz_width, self.view.tz_height - statusBarAndNaviBarHeight - toolBarHeight);
} }
#pragma mark - Click Event #pragma mark - Click Event
......
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