Instance Method

setAlignment:range:

Sets the alignment of the paragraphs containing characters in the specified range.

Declaration

- (void)setAlignment:(NSTextAlignment)alignment range:(NSRange)range;

Parameters

alignment

The new alignment.

aRange

The range of characters whose paragraphs will have their alignment set.

Discussion

This method does not include undo support by default. Clients must invoke shouldChangeTextInRanges:replacementStrings: or shouldChangeTextInRange:replacementString: to include this method in an undoable action.

See Also

Setting Text Attributes

- alignJustified:

Applies full justification to selected paragraphs (or all text, if the receiver is a plain text object).

- changeAttributes:

Changes the attributes of the current selection.

- changeColor:

Sets the color of the selected text.

typingAttributes

The receiver’s typing attributes.

- useStandardKerning:

Set the receiver to use pair kerning data for the glyphs in its selection, or for all glyphs if the receiver is a plain text view.

- lowerBaseline:

Lowers the baseline offset of selected text by 1 point, or of all text if the receiver is a plain text view.

- raiseBaseline:

Raises the baseline offset of selected text by 1 point, or of all text if the receiver is a plain text view.

- turnOffKerning:

Sets the receiver to use nominal glyph spacing for the glyphs in its selection, or for all glyphs if the receiver is a plain text view.

- loosenKerning:

Increases the space between glyphs in the receiver’s selection, or in all text if the receiver is a plain text view.

- tightenKerning:

Decreases the space between glyphs in the receiver’s selection, or for all glyphs if the receiver is a plain text view.

- useStandardLigatures:

Sets the receiver to use the standard ligatures available for the fonts and languages used when setting text, for the glyphs in the selection if the receiver is a rich text view, or for all glyphs if it’s a plain text view.

- turnOffLigatures:

Sets the receiver to use only required ligatures when setting text, for the glyphs in the selection if the receiver is a rich text view, or for all glyphs if it’s a plain text view.

- useAllLigatures:

Sets the receiver to use all ligatures available for the fonts and languages used when setting text, for the glyphs in the selection if the receiver is a rich text view, or for all glyphs if it’s a plain text view.

- toggleTraditionalCharacterShape:

Toggles the NSCharacterShapeAttributeName attribute at the current selection.

Deprecated