Skip to content

Commit 21edfc1

Browse files
committed
Make textColor property the default attribute foreground color.
1 parent 0caa361 commit 21edfc1

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

Aztec/Classes/TextKit/TextView.swift

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,13 @@ open class TextView: UITextView {
226226
var defaultMissingImage: UIImage
227227

228228
fileprivate var defaultAttributes: [NSAttributedString.Key: Any] {
229-
let attributes: [NSAttributedString.Key: Any] = [
229+
var attributes: [NSAttributedString.Key: Any] = [
230230
.font: defaultFont,
231-
.paragraphStyle: defaultParagraphStyle
231+
.paragraphStyle: defaultParagraphStyle,
232232
]
233-
233+
if let color = textColor {
234+
attributes[.foregroundColor] = color
235+
}
234236
return attributes
235237
}
236238

0 commit comments

Comments
 (0)