NSError *error;
NSString *markdown = [NSString stringWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Example" ofType:@"md"] encoding:NSUTF8StringEncoding error:&error];
if (error == nil) {
NSString *html = [MMMarkdown HTMLStringWithMarkdown:markdown error:&error];
if (error == nil) {
html = [NSString stringWithFormat:@"<style>img {max-width: 100%%;max-height: 100%%;}</style> \n%@",html];
[self.webView loadHTMLString:html baseURL:nil];
}
}
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
List of users who liked
00