From f7b2d0ba29a7e5c2203a3cb875a2e9f7397ea3d2 Mon Sep 17 00:00:00 2001 From: Husam Aamer Date: Tue, 8 Aug 2017 22:16:10 +0300 Subject: [PATCH] Swift 4 compatibility NSAttributedStringName renamed to NSAttributedStringKey --- ALTextInputBar/ALTextView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)