Unverified Commit d88eb774 authored by 谭真's avatar 谭真 Committed by GitHub

Merge pull request #1521 from JerryZQS/master

修复完成按钮显示多语言不完整的Bug
parents 89db3ae6 c39c6c2e
...@@ -118,7 +118,8 @@ ...@@ -118,7 +118,8 @@
_previewView.scrollView.frame = self.view.bounds; _previewView.scrollView.frame = self.view.bounds;
CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom; CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
_toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight); _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 sizeToFit];
_doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController; TZImagePickerController *tzImagePickerVc = (TZImagePickerController *)self.navigationController;
if (tzImagePickerVc.gifPreviewPageDidLayoutSubviewsBlock) { if (tzImagePickerVc.gifPreviewPageDidLayoutSubviewsBlock) {
......
...@@ -397,7 +397,7 @@ static CGFloat itemMargin = 5; ...@@ -397,7 +397,7 @@ static CGFloat itemMargin = 5;
_originalPhotoLabel.frame = CGRectMake(fullImageWidth + 46, 0, 80, 50); _originalPhotoLabel.frame = CGRectMake(fullImageWidth + 46, 0, 80, 50);
} }
[_doneButton sizeToFit]; [_doneButton sizeToFit];
_doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, _doneButton.tz_width, 50); _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 50);
_numberImageView.frame = CGRectMake(_doneButton.tz_left - 24 - 5, 13, 24, 24); _numberImageView.frame = CGRectMake(_doneButton.tz_left - 24 - 5, 13, 24, 24);
_numberLabel.frame = _numberImageView.frame; _numberLabel.frame = _numberImageView.frame;
_divideLine.frame = CGRectMake(0, 0, self.view.tz_width, 1); _divideLine.frame = CGRectMake(0, 0, self.view.tz_width, 1);
......
...@@ -288,7 +288,7 @@ ...@@ -288,7 +288,7 @@
_originalPhotoLabel.frame = CGRectMake(fullImageWidth + 42, 0, 80, 44); _originalPhotoLabel.frame = CGRectMake(fullImageWidth + 42, 0, 80, 44);
} }
[_doneButton sizeToFit]; [_doneButton sizeToFit];
_doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, _doneButton.tz_width, 44); _doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
_numberImageView.frame = CGRectMake(_doneButton.tz_left - 24 - 5, 10, 24, 24); _numberImageView.frame = CGRectMake(_doneButton.tz_left - 24 - 5, 10, 24, 24);
_numberLabel.frame = _numberImageView.frame; _numberLabel.frame = _numberImageView.frame;
......
...@@ -178,6 +178,7 @@ ...@@ -178,6 +178,7 @@
CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom; CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
CGFloat doneButtonWidth = [_doneButton.currentTitle boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]} context:nil].size.width; CGFloat doneButtonWidth = [_doneButton.currentTitle boundingRectWithSize:CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX) options:NSStringDrawingUsesFontLeading attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16]} context:nil].size.width;
doneButtonWidth = MAX(44, doneButtonWidth);
_cancelButton.frame = CGRectMake(12, self.view.tz_height - toolBarHeight, 44, 44); _cancelButton.frame = CGRectMake(12, self.view.tz_height - toolBarHeight, 44, 44);
[_cancelButton sizeToFit]; [_cancelButton sizeToFit];
_cancelButton.tz_height = 44; _cancelButton.tz_height = 44;
......
...@@ -87,7 +87,8 @@ ...@@ -87,7 +87,8 @@
CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom; CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
_toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight); _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 sizeToFit];
_doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
_playButton.frame = CGRectMake(0, statusBarAndNaviBarHeight, self.view.tz_width, self.view.tz_height - statusBarAndNaviBarHeight - toolBarHeight); _playButton.frame = CGRectMake(0, statusBarAndNaviBarHeight, self.view.tz_width, self.view.tz_height - statusBarAndNaviBarHeight - toolBarHeight);
_playerLayer.frame = self.view.bounds; _playerLayer.frame = self.view.bounds;
} }
......
...@@ -174,7 +174,8 @@ ...@@ -174,7 +174,8 @@
_playerLayer.frame = self.view.bounds; _playerLayer.frame = self.view.bounds;
CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom; CGFloat toolBarHeight = 44 + [TZCommonTools tz_safeAreaInsets].bottom;
_toolBar.frame = CGRectMake(0, self.view.tz_height - toolBarHeight, self.view.tz_width, toolBarHeight); _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 sizeToFit];
_doneButton.frame = CGRectMake(self.view.tz_width - _doneButton.tz_width - 12, 0, MAX(44, _doneButton.tz_width), 44);
_playButton.frame = CGRectMake(0, statusBarAndNaviBarHeight, self.view.tz_width, self.view.tz_height - statusBarAndNaviBarHeight - toolBarHeight); _playButton.frame = CGRectMake(0, statusBarAndNaviBarHeight, self.view.tz_width, self.view.tz_height - statusBarAndNaviBarHeight - toolBarHeight);
if (tzImagePickerVc.allowEditVideo) { if (tzImagePickerVc.allowEditVideo) {
_editButton.frame = CGRectMake(12, 0, 44, 44); _editButton.frame = CGRectMake(12, 0, 44, 44);
......
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