Skip to content

Commit db5a7aa

Browse files
authored
Fix bad math with UIFont descender (#68)
1 parent 2069987 commit db5a7aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MessageViewController/MessageView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public final class MessageView: UIView, MessageTextViewListener {
274274

275275
// adjust for font descender so button aligns with the text baseline
276276
let descenderAdjustment = floor(textView.font?.descender ?? 0)
277-
let buttonYStarter = textViewMaxY - textViewInset.bottom - descenderAdjustment
277+
let buttonYStarter = textViewMaxY - textViewInset.bottom + descenderAdjustment
278278

279279
// adjust by bottom offset so content is flush w/ text view
280280
let leftButtonFrame = CGRect(

0 commit comments

Comments
 (0)