diff --git a/ALTextInputBar/ALTextView.swift b/ALTextInputBar/ALTextView.swift index 8c77b8f..c5202f6 100644 --- a/ALTextInputBar/ALTextView.swift +++ b/ALTextInputBar/ALTextView.swift @@ -153,7 +153,7 @@ public class ALTextView: UITextView { var newHeight: CGFloat = 0 if let font = font { - let attributes = [NSFontAttributeName: font] + let attributes = [NSFontAttributeKey: font] let boundingSize = CGSize(width: frame.size.width - textContainerInset.left - textContainerInset.right, height: .greatestFiniteMagnitude) let size = text.boundingRect(with: boundingSize, options: NSStringDrawingOptions.usesLineFragmentOrigin, attributes: attributes, context: nil) newHeight = ceil(size.height)