Respond to CR.

This commit is contained in:
Matthew Chen 2018-06-29 12:49:23 -04:00
parent 23435b690a
commit 24c4c4c098
4 changed files with 18 additions and 4 deletions

View File

@ -249,6 +249,11 @@ NS_ASSUME_NONNULL_BEGIN
[self.dateHeaderView autoPinTrailingToSuperviewMarginWithInset:self.conversationStyle.gutterTrailing],
[self.dateHeaderView autoPinEdgeToSuperviewEdge:ALEdgeTop],
// DO NOT pin to the bottom of dateHeaderView.
//
// Being a UIStackView, it doesn't reflect the spacing below the date
// header contents. Instead pin using dateHeaderHeight which includes
// the spacing.
[self.messageBubbleView autoPinEdge:ALEdgeTop
toEdge:ALEdgeTop
ofView:self.dateHeaderView
@ -365,7 +370,7 @@ NS_ASSUME_NONNULL_BEGIN
- (CGFloat)dateHeaderStrokeThickness
{
return 1.f / UIScreen.mainScreen.scale;
return CGHairlineWidth();
}
- (CGFloat)dateHeaderBottomMargin

View File

@ -103,8 +103,10 @@ NS_ASSUME_NONNULL_BEGIN
self.layoutConstraints = @[
[self.stackView autoPinEdgeToSuperviewEdge:ALEdgeTop],
[self.stackView autoPinEdgeToSuperviewEdge:ALEdgeBottom],
[self.stackView autoPinLeadingToSuperviewMarginWithInset:self.conversationStyle.fullWidthGutterLeading],
[self.stackView autoPinTrailingToSuperviewMarginWithInset:self.conversationStyle.fullWidthGutterTrailing],
[self.stackView autoPinEdgeToSuperviewEdge:ALEdgeLeading
withInset:self.conversationStyle.fullWidthGutterLeading],
[self.stackView autoPinEdgeToSuperviewEdge:ALEdgeTrailing
withInset:self.conversationStyle.fullWidthGutterTrailing],
];
}
@ -128,7 +130,7 @@ NS_ASSUME_NONNULL_BEGIN
- (CGFloat)strokeThickness
{
return 1.f / UIScreen.mainScreen.scale;
return CGHairlineWidth();
}
- (CGSize)cellSizeWithTransaction:(YapDatabaseReadTransaction *)transaction

View File

@ -170,4 +170,6 @@ CG_INLINE CGSize CGSizeMax(CGSize size1, CGSize size2)
return CGSizeMake(MAX(size1.width, size2.width), MAX(size1.height, size2.height));
}
CGFloat CGHairlineWidth();
NS_ASSUME_NONNULL_END

View File

@ -542,4 +542,9 @@ CGFloat ScaleFromIPhone5(CGFloat iPhone5Value)
@end
CGFloat CGHairlineWidth()
{
return 1.f / UIScreen.mainScreen.scale;
}
NS_ASSUME_NONNULL_END