diff --git a/Yep/Configs/YepConfig.swift b/Yep/Configs/YepConfig.swift index a694c332..7a87e7ca 100644 --- a/Yep/Configs/YepConfig.swift +++ b/Yep/Configs/YepConfig.swift @@ -169,6 +169,8 @@ class YepConfig { static let mediaMinHeight: CGFloat = 30 static let centerXOffset: CGFloat = 4 + + static let bubbleCornerRadius: CGFloat = 20 static let imageAppearDuration: NSTimeInterval = 0.1 diff --git a/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift b/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift index f47754dc..a94a8f45 100644 --- a/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift +++ b/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift @@ -113,7 +113,7 @@ class ChatLeftTextCell: ChatBaseCell { let bubbleBodyFrame = CGRectInset(strongSelf.textContainerView.frame, -12, -3) - strongSelf.bubbleBodyShapeLayer.path = UIBezierPath(roundedRect: bubbleBodyFrame, byRoundingCorners: UIRectCorner.AllCorners, cornerRadii: CGSize(width: 18, height: 18)).CGPath + strongSelf.bubbleBodyShapeLayer.path = UIBezierPath(roundedRect: bubbleBodyFrame, byRoundingCorners: UIRectCorner.AllCorners, cornerRadii: CGSize(width: YepConfig.ChatCell.bubbleCornerRadius, height: YepConfig.ChatCell.bubbleCornerRadius)).CGPath if strongSelf.inGroup { strongSelf.nameLabel.text = strongSelf.user?.nickname diff --git a/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift b/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift index 70e40651..689dac8a 100644 --- a/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift +++ b/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift @@ -105,7 +105,7 @@ class ChatRightTextCell: ChatRightBaseCell { let bubbleBodyFrame = CGRectInset(strongSelf.textContainerView.frame, -12, -3) - strongSelf.bubbleBodyShapeLayer.path = UIBezierPath(roundedRect: bubbleBodyFrame, byRoundingCorners: UIRectCorner.AllCorners, cornerRadii: CGSize(width: 18, height: 18)).CGPath + strongSelf.bubbleBodyShapeLayer.path = UIBezierPath(roundedRect: bubbleBodyFrame, byRoundingCorners: UIRectCorner.AllCorners, cornerRadii: CGSize(width: YepConfig.ChatCell.bubbleCornerRadius, height: YepConfig.ChatCell.bubbleCornerRadius)).CGPath // strongSelf.bubbleBodyImageView.frame = strongSelf.bubbleTailImageView.center = CGPoint(x: CGRectGetMaxX(bubbleBodyFrame), y: CGRectGetMidY(strongSelf.avatarImageView.frame))