StringAttributes
public extension StringAttributes
Undocumented
-
Create a dictionary with NSAttributedString.Key
Declaration
Swift
init(_ attributes: () -> [AttributedStringKey : Any])Parameters
attributesA trailing closure that accepts a dictionary with NSAttributedString.Key
-
Create a dictionary with one NSAttributedString.Key
Declaration
Swift
init(for key: AttributedStringKey, value: Any)Parameters
forA NSAttributedString.Key for the String
valueThe value for the attribute being modifed
-
Add an AttributedStringKey with a value of type Any to the dictionary
Declaration
Swift
@discardableResult mutating func add(key: AttributedStringKey, value: Any) -> StringAttributesParameters
keyA NSAttributedString.Key for the String
valueThe value for the attribute being modifed
View on GitHub
StringAttributes Extension Reference