Latest 1.0.0
Homepage https://github.com/Meniny/MXMarkdownLabel-in-Objective-C
License MIT
Platforms ios 8.0, requires ARC
Frameworks Foundation, UIKit, CoreText

MXMarkdownLabel-in-Objective-C

MXMarkdownLabel is a basic Markdown syntax supported label for iOS.

Screenshot

Installation with CocoaPods

pod 'MXMarkdownLabel'

Usage

#import "MXMarkdownLabel.h"
@interface ViewController () <MXMarkdownLabelDelegate>

@end
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    MXMarkdownLabel *mdLabel = [[MXMarkdownLabel alloc] initWithFrame:[[self view] bounds]];
    [mdLabel setTextColor:[UIColor purpleColor]];
    [mdLabel setCustomLinkPattern:@"(?<=:\s?)Elias"];
    [mdLabel setDelegate:self];
    [mdLabel setText:@" Normal Textn **Strong**n _Italic_n __Underlining__n ~~StrikeThrough~~n `InlineCode`n 82183021n +86 131-1111-1111n http://www.baidu.comn [f#E64E64ForegroundColor]n [B#E64E64BackgroundColor]n [f#ffffffb#000000Colorful]n Author: Elias"];
    [[self view] addSubview:mdLabel];
}

- (void)markdownLabel:(MXMarkdownLabel *)label didSelectLink:(NSString *)link {
    NSLog(@"link: %@", link);
}

Latest podspec

{
    "name": "MXMarkdownLabel",
    "version": "1.0.0",
    "summary": "Basic Markdown syntax supported label for iOS.",
    "description": "The first stable version of MXMarkdownLabel, is a basic Markdown syntax supported label for iOS.",
    "homepage": "https://github.com/Meniny/MXMarkdownLabel-in-Objective-C",
    "license": "MIT",
    "authors": "Elias Abel",
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/Meniny/MXMarkdownLabel-in-Objective-C.git",
        "tag": "1.0.0"
    },
    "source_files": "MXMarkdownLabel-OC/*",
    "frameworks": [
        "Foundation",
        "UIKit",
        "CoreText"
    ],
    "requires_arc": true
}

Pin It on Pinterest

Share This