Extension

NSMutableParagraphStyle

This extension adds a convenient initializer to NSMutableParagraphStyle.

Declaration

extension NSMutableParagraphStyle

Overview

Instead of setting every property one at a time, this method allows you to initialize an NSMutableParagraphStyle with all the necessary properties.

Topics

Initialization

init()

This initializer takes in a variety of necessary properties for constructing a new paragraph style.

extension NSMutableParagraphStyle {
    convenience init(alignment: NSTextAlignment,
                     firstLineHeadIndent: CGFloat,
                     headIndent: CGFloat,
                     tailIndent: CGFloat,
                     lineHeightMultiple: CGFloat,
                     maximumLineHeight: CGFloat,
                     minimumLineHeight: CGFloat,
                     lineSpacing: CGFloat,
                     paragraphSpacing: CGFloat,
                     paragraphSpacingBefore: CGFloat) {
        self.init()
        self.alignment = alignment
        self.firstLineHeadIndent = firstLineHeadIndent
        self.headIndent = headIndent
        self.tailIndent = tailIndent
        self.lineHeightMultiple = lineHeightMultiple
        self.maximumLineHeight = maximumLineHeight
        self.minimumLineHeight = minimumLineHeight
        self.lineSpacing = lineSpacing
        self.paragraphSpacing = paragraphSpacing
        self.paragraphSpacingBefore = paragraphSpacingBefore
    }
}
background Made with Flow.
underscore Made with Flow.
line2 Made with Flow.
line1 Made with Flow.
circle Made with Flow.
hit Made with Flow.

result(s) found for “”.