美文网首页
UILabel 如何设置按照字节换行

UILabel 如何设置按照字节换行

作者: Su_per_man | 来源:发表于2022-12-29 10:10 被阅读0次
    tipLabel.lineBreakMode = NSLineBreakByCharWrapping;
    
    typedef NS_ENUM(NSInteger, NSLineBreakMode) {
        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"
    } API_AVAILABLE(macos(10.0), ios(6.0), watchos(2.0), tvos(9.0));
    

    相关文章

      网友评论

          本文标题:UILabel 如何设置按照字节换行

          本文链接:https://www.haomeiwen.com/subject/adktcdtx.html