Extension
This extension adds a convenient initializer to NSMutableParagraphStyle.
extension NSMutableParagraphStyle
Instead of setting every property one at a time, this method allows you to initialize an NSMutableParagraphStyle
with all the necessary properties.
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
}
}
result(s) found for “”.