Latest0.1.3.6
Homepagehttps://github.com/mrjlovetian/MRJAttributedMarkup
LicenseMIT
Platformsios 8.0
Authors

CI Status
Version
License
Platform

Example

    NSDictionary *style = @{@"body":[UIFont fontWithName:@"HelveticaNeue" size:18.0],
                             @"bold":[UIFont fontWithName:@"HelveticaNeue-Bold" size:18.0],
                             @"red": [UIColor redColor]};

    NSDictionary *style1 = @{@"body" :
                                 @[[UIFont fontWithName:@"HelveticaNeue-Bold" size:18.0],
                                   [UIColor darkGrayColor]],
                             @"u": @[[UIColor blueColor],
                                     @{NSUnderlineStyleAttributeName : @(kCTUnderlineStyleSingle|kCTUnderlinePatternSolid)}
                                     ],
                             @"thumb":[UIImage imageNamed:@"thumbIcon"]};

    NSDictionary *style2 = @{@"body":[UIFont fontWithName:@"HelveticaNeue" size:22.0],
                             @"help":[MRJAttributedStyleAction styledActionWithAction:^{
                                 NSLog(@"Help action");
                             }],
                             @"settings":[MRJAttributedStyleAction styledActionWithAction:^{
                                 NSLog(@"Settings action");
                             }],
                             @"link": [UIColor orangeColor]};

    self.label.attributedText = [@"属性 <bold>粗体</bold> <red>红色</red> 文本" attributedStringWithStyleBook:style];
    self.label1.attributedText = [@"<thumb> </thumb> 图标 <u>下划线</u> 文本 <thumb> </thumb>" attributedStringWithStyleBook:style1];
    self.label2.attributedText = [@"点击 <help>这里</help> 显示帮助或者 <settings>这里</settings> 显示设置" attributedStringWithStyleBook:style2];

show

MRJAttributedMarkup

Installation

MRJAttributedMarkup is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'MRJAttributedMarkup'

Author

[email protected], [email protected]

License

MRJAttributedMarkup is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MRJAttributedMarkup",
    "version": "0.1.3.6",
    "summary": "u6587u5b57u591au6837u5f0fu6807u7b7e.",
    "description": "TODO: Add long description of the pod here.",
    "homepage": "https://github.com/mrjlovetian/MRJAttributedMarkup",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "[email protected]": "[email protected]"
    },
    "source": {
        "git": "https://github.com/mrjlovetian/MRJAttributedMarkup.git",
        "tag": "0.1.3.6"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MRJAttributedMarkup/Classes/**/*"
}

Pin It on Pinterest

Share This