I am trying to create an AttributedString and add attributes from
typingAttributes(from textView)
The problem is
.typingAttributes
return
[String, Any]
and
NSAttributedString(string:.. , attributes:[])
required
[NSAttributedStringKey: Any]
My code is:
NSAttributedString(string: "test123", attributes: self.textView.typingAttributes)
I do not want to create all the keys in a loop and change them to
NSAttributedStringKey
swift ios11 swift4 xcode9
Altimir Antonov
source share