Class

NSMutableParagraphStyle

An object that enables changing the values of the subattributes in a paragraph style attribute.

Overview

The NSMutableParagraphStyle class adds methods to its superclass, NSParagraphStyle, for changing the values of the subattributes in a paragraph style attribute. For more information, see NSParagraphStyle and NSAttributedString.

Topics

Setting other style information

func setParagraphStyle(NSParagraphStyle)

Replaces the subattributes of the receiver with those in the specified paragraph style object.

var alignment: NSTextAlignment

The text alignment of the receiver.

var firstLineHeadIndent: CGFloat

The indentation of the first line of the receiver.

var headIndent: CGFloat

The indentation of the receiver’s lines other than the first.

var tailIndent: CGFloat

The trailing indentation of the receiver.

var lineBreakMode: NSLineBreakMode

The mode that should be used to break lines in the receiver.

var maximumLineHeight: CGFloat

The receiver’s maximum line height.

var minimumLineHeight: CGFloat

The receiver’s minimum height.

var lineSpacing: CGFloat

The distance in points between the bottom of one line fragment and the top of the next.

var paragraphSpacing: CGFloat

The space after the end of the paragraph.

var paragraphSpacingBefore: CGFloat

The distance between the paragraph’s top and the beginning of its text content.

var baseWritingDirection: NSWritingDirection

The base writing direction for the receiver.

var lineHeightMultiple: CGFloat

The line height multiple.

Accessing Tab Information

func addTabStop(NSTextTab)

Adds tabStop to the receiver.

func removeTabStop(NSTextTab)

Removes the first text tab whose location and type are equal to those of tabStop.

var tabStops: [NSTextTab]!

An array of NSTextTab objects representing the receiver’s tab stops.

var defaultTabInterval: CGFloat

The document-wide default tab interval.

Setting text blocks and lists

var textBlocks: [NSTextBlock]

The text blocks containing the paragraph, nested from outermost to innermost to array.

var textLists: [NSTextList]

The array of text lists containing the paragraph.

Controlling hyphenation and truncation

var hyphenationFactor: Float

The paragraph’s threshold for hyphenation.

var tighteningFactorForTruncation: Float

The threshold for using tightening as an alternative to truncation.

var allowsDefaultTighteningForTruncation: Bool

A Boolean value indicating whether the system may tighten inter-character spacing before truncating text.

Setting HTML header level

var headerLevel: Int

Specifies whether the paragraph is to be treated as a header for purposes of HTML generation.

Relationships

Inherits From

Conforms To

See Also

Paragraphs

class NSParagraphStyle

The paragraph or ruler attributes used by an attributed string.

class NSTextTab

A tab in an NSParagraphStyle object, storing an alignment type and location.