Is there any easy way to convert Markdown Syntax
to NSAttributedString
?
I had a look at a third-party libraries, but they don't work well with Swift and outdated to iOS 6, as well as Cocoa Pods install is still in beta and failed on install:
Native Markdown Parsing on iOS
Although I need to present the Markdown String on the ViewController
, I have a CustomCollectionViewLayout
which I need to calculate the height of the string with a specific font and width, the Markdown string I download from the API gives a wrong height.
This is a sample of the Markdown text:
This is what I am about to do and present to the user. My list of things are: Eating Today __ Shake __ * 150 ml milk * 150 ml water * 40 g nuts , Vanille * 1 sugar