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

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -