iphone - How to use an UIWebView to show small offline html documents? -



iphone - How to use an UIWebView to show small offline html documents? -

could ship app html document , display using uiwebview? how hard use?

is possible have little frame uiwebview inside, or take whole screen? , can rid of controls, uiwebview works advanced uilabel or uitextview?

yes; it's easy; can have little embedded webview; yes, naked web view has no controls.

in loadview or viewdidload method:

uiwebview *webview = [[uiwebview alloc] initwithframe:cgrectmake(...)]; [self.view addsubview:webview]; nsurl *url = [[nsbundle mainbundle] urlforresource:@"foo" withextension:@"html"]; nsurlrequest *request = [nsurlrequest requestwithurl:url]; [webview loadrequest:request]; [webview release];

this load foo.html file add together project resource. alternatively, can utilize loadhtmlstring:baseurl: if want build html in code.

iphone uiwebview

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -