Skip to content

Commit

Permalink
修复 QMUITableViewHeaderFooterView 中 titleLabel 的坐标计算问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas-o committed Jan 2, 2020
1 parent f198c49 commit 3f546a2
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 3f546a2

Please sign in to comment.