Skip to content

Commit ba8524a

Browse files
committed
Set a default text color in TextView.
1 parent 2efa3e4 commit ba8524a

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

Aztec/Classes/TextKit/TextView.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -248,16 +248,16 @@ open class TextView: UITextView {
248248
return attributes
249249
}
250250

251-
open var defaultTextColor: UIColor?
252-
253-
override open var textColor: UIColor? {
254-
get {
255-
return super.textColor
256-
}
257-
set {
258-
super.textColor = newValue
251+
open lazy var defaultTextColor: UIColor? = {
252+
let color: UIColor
253+
if #available(iOS 13.0, *) {
254+
color = UIColor.label
255+
} else {
256+
color = UIColor.darkText
259257
}
260-
}
258+
return color
259+
}()
260+
261261
// MARK: - Plugin Loading
262262

263263
var pluginManager: PluginManager {

0 commit comments

Comments
 (0)