Skip to content

Commit

Permalink
Merge pull request Tencent#897 from Jonas-o/master
Browse files Browse the repository at this point in the history
修复 QMUITableViewHeaderFooterView 中 titleLabel 的坐标计算问题
  • Loading branch information
MoLice authored Jan 2, 2020
2 parents f198c49 + 3f546a2 commit 2416a78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion QMUIKit/QMUIComponents/QMUITableViewHeaderFooterView.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ - (void)layoutSubviews {

self.titleLabel.qmui_left = self.contentEdgeInsets.left;
self.titleLabel.qmui_extendToRight = self.accessoryView ? self.accessoryView.qmui_left - self.accessoryViewMargins.left : self.contentView.qmui_width - self.contentEdgeInsets.right;
self.titleLabel.qmui_top = self.contentEdgeInsets.top + CGFloatGetCenter(self.contentView.qmui_height - UIEdgeInsetsGetVerticalValue(self.contentEdgeInsets), self.titleLabel.qmui_height);
CGSize titleLabelSize = [self.titleLabel sizeThatFits:CGSizeMake(self.titleLabel.qmui_width, CGFLOAT_MAX)];
self.titleLabel.qmui_height = titleLabelSize.height;
self.titleLabel.qmui_top = self.contentEdgeInsets.top + CGFloatGetCenter(self.contentView.qmui_height - UIEdgeInsetsGetVerticalValue(self.contentEdgeInsets), self.titleLabel.qmui_height);
}

- (CGSize)sizeThatFits:(CGSize)size {
Expand Down

0 comments on commit 2416a78

Please sign in to comment.