We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8db33fd commit 3297ec8Copy full SHA for 3297ec8
Source/TokenField/ICToken.swift
@@ -94,12 +94,10 @@ class ICToken: UIView {
94
self.init()
95
if let attributes = normalAttributes { normalTextAttributes = attributes }
96
if let attributes = highlightedAttributes { highlightedTextAttributes = attributes }
97
- // didSet is not called within the initializer
98
- setText(text)
99
- }
100
-
101
- private func setText(_ text: String) {
102
- self.text = text
+ ({
+ // Workaround to trigger didSet inside the initializer
+ self.text = text
+ })()
103
}
104
105
// MARK: - Private Methods
0 commit comments