O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSParagraphStyle — Mac OS X 10.0

Synopsis

Instances of this class are used in attributed strings to encapsulate paragraph and ruler characteristics to be applied to a range of text. Paragraph style attributes included such characteristics as paragraph alignment, line height and spacing, paragraph spacing, and more. NSParagraphStyle is an immutable class. If you require mutability, use its subclass, NSMutableParagraphStyle.

image with no caption

@interface NSParagraphStyle : NSObject <NSCoding, NSCopying, NSMutableCopying>
                                  // Class Methods
   + (NSParagraphStyle *)defaultParagraphStyle;
   + (NSWritingDirection)defaultWritingDirectionForLanguage:(NSString *)languageName;
                                  // Instance Methods
   - (NSTextAlignment)alignment;
   - (NSWritingDirection)baseWritingDirection;
   - (float)firstLineHeadIndent;
   - (float)headIndent;
   - (NSLineBreakMode)lineBreakMode;
   - (float)lineSpacing;
   - (float)maximumLineHeight;
   - (float)minimumLineHeight;
   - (float)paragraphSpacing;
   - (NSArray *)tabStops;
   - (float)tailIndent;
                                  // Methods Implementing NSCoding
   - (void)encodeWithCoder:(NSCoder *)aCoder;
   - (id)initWithCoder:(NSCoder *)aDecoder;
                                  // Methods Implementing NSCopying
   - (id)copyWithZone:(NSZone *)zone;
                                  // Methods Implementing NSMutableCopying
   - (id)mutableCopyWithZone:(NSZone *)zone;

Subclasses

NSMutableParagraphStyle

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required