Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot show the markdown format #3

Open
NancyZY opened this issue Aug 11, 2016 · 0 comments
Open

Cannot show the markdown format #3

NancyZY opened this issue Aug 11, 2016 · 0 comments

Comments

@NancyZY
Copy link

NancyZY commented Aug 11, 2016

I import the library correctly, then I use it in simple case, but not show markdown format, there is some code:` override func viewDidLoad() {
super.viewDidLoad()

    let label2 = UILabel(frame:CGRectMake(10,20, 300, 100))
    let str = "# Header1 \n plain text \n \n##Header2 \n\n ###Header3\n \n ####Header4 \n \n#####Header5  \n\n######Header6 \n\n\n\n\n \n#######Header7 > Test \n\n> Test2 \n > Test3, okay, this is a quote format test. Sure it can be `**nested**`, like [that](yahoo.com) \n\n ########Header8  \n\n#########Header9  \n\n\n\n##########Header10 \n\n \n  Regular text. `inline code block` and some **bold**, *[italics links](yahoo.com)* \n \n  this is a [hyperlinks](http://www.yahoo.com)"

    let m = MarkdownParser()

    label2.textAlignment=NSTextAlignment.Left //文字右对齐
    label2.textColor=UIColor.whiteColor()  //白色文字
    label2.backgroundColor=UIColor.blackColor() //黑色背景
    label2.attributedText = m.convert(str)
}

` Hope your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant