iOS NSMutableParagraphStyle

//行间距        84行
@property (NS_NONATOMIC_IOSONLY) CGFloat lineSpacing;

1: 父类

继承于: NSParagraphStyle

2: 属性



//这一段的底部和下一段的顶部之间的距离(或下一段的"页眉", 如果有的话);  类似于页脚;
@property (NS_NONATOMIC_IOSONLY) CGFloat paragraphSpacing;

//段落的位置样式
@property (NS_NONATOMIC_IOSONLY) NSTextAlignment alignment;

typedef NS_ENUM(NSInteger, NSTextAlignment) {
        NSTextAlignmentLeft      = 0,//居左
        NSTextAlignmentCenter    = 1,//居中
        NSTextAlignmentRight     = 2,//居右
        NSTextAlignmentJustified = 3,//两端对齐
        NSTextAlignmentNatural   = 4 //默认对齐方式
};

//首行缩进距离
@property (NS_NONATOMIC_IOSONLY) CGFloat firstLineHeadIndent;

//左侧缩进距离
@property (NS_NONATOMIC_IOSONLY) CGFloat headIndent;

//
@property (NS_NONATOMIC_IOSONLY) CGFloat tailIndent;

//换行模式
@property (NS_NONATOMIC_IOSONLY) NSLineBreakMode lineBreakMode;

typedef NS_ENUM(NSInteger, NSLineBreakMode) {
    NSLineBreakByWordWrapping = 0,  //按照单词来换行
    NSLineBreakByCharWrapping,      //按照字符来换行  
    NSLineBreakByClipping,          //按照单词来换行, 直接剪切(不是按照字符切割, 可能会切割半个字符)
    NSLineBreakByTruncatingHead,    //单行: 开头是省略号; 多行: 最后一行的开头是省略号
    NSLineBreakByTruncatingTail,    //单行: 结尾是省略号; 多行: 最后一行的结尾是省略号
    NSLineBreakByTruncatingMiddle   //单行:中间是省略号; 多行: 最后一行的中间是省略号
} NS_ENUM_AVAILABLE(10_0, 6_0);

//最小行高
@property (NS_NONATOMIC_IOSONLY) CGFloat minimumLineHeight;

//最大行高
@property (NS_NONATOMIC_IOSONLY) CGFloat maximumLineHeight;

//书写方向
@property (NS_NONATOMIC_IOSONLY) NSWritingDirection baseWritingDirection;

typedef NS_ENUM(NSInteger, NSWritingDirection) {
    NSWritingDirectionNatural       = -1,  //默认书写方向(和从左向右一样)
    NSWritingDirectionLeftToRight   =  0,  //从左向右
    NSWritingDirectionRightToLeft   =  1   //从右向左  
} NS_ENUM_AVAILABLE_IOS(6_0);

@property (NS_NONATOMIC_IOSONLY) CGFloat lineHeightMultiple;

//前一段的底部(或前一段的"页脚", 如果有的话)和这段顶部之间的距离;  类似于页眉;
@property (NS_NONATOMIC_IOSONLY) CGFloat paragraphSpacingBefore;

@property (NS_NONATOMIC_IOSONLY) float hyphenationFactor;

@property (null_resettable, copy, NS_NONATOMIC_IOSONLY) NSArray *tabStops;

@property (NS_NONATOMIC_IOSONLY) CGFloat defaultTabInterval;

@property (NS_NONATOMIC_IOSONLY) BOOL allowsDefaultTighteningForTruncation;

3:方法

//
- (void)addTabStop:(NSTextTab *)anObject;

- (void)removeTabStop:(NSTextTab *)anObject;

- (void)setParagraphStyle:(NSParagraphStyle *)obj;

你可能感兴趣的:(iOS NSMutableParagraphStyle)