About Paragraph Styles
NSParagraphStyle 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, as paragraph styles.
A paragraph style object represents a complex attribute value in an attributed string, storing a number of subattributes that affect paragraph layout for the characters of the string. Among these subattributes are alignment, tab stops, and indents. Figure 1 illustrates these and other paragraph style attributes.
These are the paragraph style attributes the text system uses:
NSLineBreakByWordWrappingwraps at word boundaries.
NSLineBreakByCharWrappingwraps at character boundaries.
NSLineBreakByClippingclips lines past the edge of the text container.
NSLineBreakByTruncatingHeaddisplays each line so that the end fits in the container and the missing text at the beginning is indicated by an ellipsis glyph.
NSLineBreakByTruncatingTaildisplays each line so that the beginning fits in the container and the missing text at the end is indicated by an ellipsis glyph.
NSLineBreakByTruncatingMiddledisplays each line so that the beginning and end both fit in the container and the missing text in the middle is indicated by an ellipsis glyph.
© 1997, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-09-04)