ios - Objective C - show a html page without using UIWebview within application -
how can show html page without using uiwebview within application? means should open within app , not external link safari browser.
display html nsattributedstring
using webviews in apps can frustrating @ times; if you’re displaying small amount of html content, webviews can consume lot of memory. ios 7 makes lot easier, can create nsattributedstring html few lines of code, such:
nsstring *html = @"<bold>wow!</bold> <em>ios</em> can create <h3>nsattributedstring</h3> htmls!"; nsdictionary *options = @{nsdocumenttypedocumentattribute: nshtmltextdocumenttype}; nsattributedstring *attrstring = [[nsattributedstring alloc] initwithdata:[html datausingencoding:nsutf8stringencoding] options:options documentattributes:nil error:nil];
Comments
Post a Comment