首页 > 代码库 > ios uilable折行后文字怎么都是左对齐

ios uilable折行后文字怎么都是左对齐

typedef NS_ENUM(NSInteger, NSLineBreakMode) {        /* What to do with long lines */
    NSLineBreakByWordWrapping = 0,         /* Wrap at word boundaries, default */
    NSLineBreakByCharWrapping,        /* Wrap at character boundaries */
    NSLineBreakByClipping,        /* Simply clip */
    NSLineBreakByTruncatingHead,    /* Truncate at head of line: "...wxyz" */
    NSLineBreakByTruncatingTail,    /* Truncate at tail of line: "abcd..." */
    NSLineBreakByTruncatingMiddle    /* Truncate middle of line:  "ab...yz" */

} NS_ENUM_AVAILABLE_IOS(6_0);

其实就是这几个枚举的应用,我只选择了NSLineBreakByCharWrapping这个就可以左对齐了

ios uilable折行后文字怎么都是左对齐