Skip to content

Commit 46ac801

Browse files
committed
Add documentation.
1 parent 7eddd37 commit 46ac801

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Aztec/Classes/TextKit/TextView.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ open class TextView: UITextView {
226226

227227
// MARK: - Properties: UI Defaults
228228

229+
/// The font to use to render any HTML that doesn't specify an explicit font.
230+
/// If this is changed all the instances that use this font will be updated to the new one.
229231
public var defaultFont: UIFont {
230232
didSet {
231233
textStorage.replace(font: oldValue, with: defaultFont)
@@ -359,6 +361,10 @@ open class TextView: UITextView {
359361

360362
// MARK: - Init & deinit
361363

364+
/// Creates a Text View using the provided parameters as a base for HTML rendering.
365+
/// - Parameter defaultFont: The font to use to render the elements if no specific font is set by the HTML.
366+
/// - Parameter defaultParagraphStyle: The default paragraph style if no explicit attributes are defined in HTML
367+
/// - Parameter defaultMissingImage: The image to use if the view is not able to render an image specified in the HTML.
362368
@objc public init(
363369
defaultFont: UIFont,
364370
defaultParagraphStyle: ParagraphStyle = ParagraphStyle.default,
@@ -385,7 +391,7 @@ open class TextView: UITextView {
385391
}
386392

387393
required public init?(coder aDecoder: NSCoder) {
388-
self.defaultFont = FontProvider.shared.defaultFont
394+
defaultFont = FontProvider.shared.defaultFont
389395
defaultParagraphStyle = ParagraphStyle.default
390396
defaultMissingImage = Assets.imageIcon
391397

0 commit comments

Comments
 (0)