Class

NSParagraphStyle

The paragraph or ruler attributes used by an attributed string.

Declaration

@interface NSParagraphStyle : NSObject

Overview

The NSParagraphStyle class and its subclass NSMutableParagraphStyle encapsulate the paragraph or ruler attributes used by the NSAttributedString classes. Instances of these classes are often referred to as paragraph style objects or, when no confusion will result, paragraph styles.

Topics

Creating an NSParagraphStyle

defaultParagraphStyle

Returns the default paragraph style.

Accessing Style Information

alignment

The text alignment of the receiver.

firstLineHeadIndent

The indentation of the first line of the receiver.

headIndent

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

tailIndent

The trailing indentation of the receiver.

lineHeightMultiple

The line height multiple.

maximumLineHeight

The receiver’s maximum line height.

minimumLineHeight

The receiver’s minimum height.

lineSpacing

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

paragraphSpacing

The space after the end of the paragraph.

paragraphSpacingBefore

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

Accessing Tab Information

tabStops

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

defaultTabInterval

The document-wide default tab interval.

Getting Text Block and List Information

textBlocks

An array specifying the text blocks containing the paragraph.

textLists

An array specifying the text lists containing the paragraph.

Getting Line Breaking Information

lineBreakMode

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

hyphenationFactor

The paragraph’s threshold for hyphenation.

tighteningFactorForTruncation

The threshold for using tightening as an alternative to truncation.

allowsDefaultTighteningForTruncation

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

Getting HTML Header Level

headerLevel

A Boolean that specifies whether the paragraph is to be treated as a header for purposes of HTML generation.

Writing Direction

+ defaultWritingDirectionForLanguage:

Returns the default writing direction for the specified language.

baseWritingDirection

The base writing direction for the receiver.

Constants

NSLineBreakMode

Constants that specify what happens when a line is too long for its container.

NSTextAlignment

These constants specify text alignment.

NSWritingDirection

These constants specify the writing directions:

NSTextTabType

These constants describe the various type of tab stop.

Relationships

Inherits From

See Also

Paragraphs

NSMutableParagraphStyle

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

NSTextTab

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