Skip to content

Simplify the process of creating NSMutableAttributeString with block. 使用block实现链式调用,从而简化Objective-c富文本创建过程。

Notifications You must be signed in to change notification settings

penoty/NSMutableAttributedString-Simple

Repository files navigation

NSMutableAttributedString-Simple

Simplify the process of creating NSMutableAttributedString with block. 使用链式调用简化Objective-c富文本创建过程。

NSMutableAttributedString *attributedStr = [NSMutableAttributedString stringWithFormat:@"%@\r\n%@\r\n%@" strings:@[
    @"Test1".setBackgroundColor([UIColor redColor]).setSystemFontSize(20.f).setColor([UIColor blueColor]),
    @"Test2".setUnderlineColor([UIColor yellowColor]).setUnderlineStyle(@(NSUnderlineStyleThick))
            .setSystemFontSize(30.f).setColorWithRGB(0xfb8800),
    @"Test3".setStrikelineStyle(@(NSUnderlineStyleThick)).setStrikelineColor([UIColor blueColor])
]];

image

About

Simplify the process of creating NSMutableAttributeString with block. 使用block实现链式调用,从而简化Objective-c富文本创建过程。

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy