Latest 0.6.0
Homepage https://github.com/SimonFairbairn/SwiftyMarkdown
License MIT
Platforms ios 8.0, tvos 9.0, requires ARC
Authors

SwiftyMarkdown converts Markdown files and strings into NSAttributedString using sensible defaults and a Swift-style syntax. It uses dynamic type to set the font size correctly with whatever font you’d like to use

Installation

CocoaPods:

pod 'SwiftyMarkdown'

Usage

Text string

let md = SwiftyMarkdown(string: "# HeadingnMy *Markdown* string")
md.attributedString()

URL

if let url = Bundle.main.url(forResource: "file", withExtension: "md"), md = SwiftyMarkdown(url: url ) {
    md.attributedString()
}

Supported Features

*italics* or _italics_
**bold** or __bold__

# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6

`code`
[Links](http://voyagetravelapps.com/)

Customisation

md.body.fontName = "AvenirNextCondensed-Medium"

md.h1.color = UIColor.redColor()
md.h1.fontName = "AvenirNextCondensed-Bold"
md.h1.fontSize = 16
md.italic.color = UIColor.blueColor()

Screenshot

Screenshot

Latest podspec

{
    "name": "SwiftyMarkdown",
    "version": "0.6.0",
    "summary": "Converts Markdown to NSAttributed String",
    "homepage": "https://github.com/SimonFairbairn/SwiftyMarkdown",
    "license": "MIT",
    "authors": {
        "Simon Fairbairn": "[email protected]"
    },
    "source": {
        "git": "https://github.com/SimonFairbairn/SwiftyMarkdown.git",
        "tag": "0.6.0"
    },
    "social_media_url": "https://twitter.com/SimonFairbairn",
    "platforms": {
        "ios": "8.0",
        "tvos": "9.0"
    },
    "requires_arc": true,
    "source_files": "SwiftyMarkdown/"
}

Pin It on Pinterest

Share This