Contents

setAlignment(_:range:)

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

Declaration

func setAlignment(_ alignment: NSTextAlignment, range: NSRange)

Parameters

  • alignment:

    The new alignment.

  • range:

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

Discussion

This method does not include undo support by default. Clients must invoke shouldChangeText(inRanges:replacementStrings:) or shouldChangeText(in:replacementString:) to include this method in an undoable action.

See Also

Related Documentation

Setting text attributes