setAlignment(_:range:)
Sets the alignment characteristic of the paragraph style attribute for the specified range of text.
Declaration
func setAlignment(_ alignment: NSTextAlignment, range: NSRange)Parameters
- alignment:
The alignment to use.
- range:
The range of characters.
Discussion
When attribute fixing takes place, this change will affect only paragraphs whose first character was included in range. Raises an rangeException if any part of range lies beyond the end of the receiver’s characters.