In the app in the use of webview

First to build a view base app. And then open the viewcontroller.xib, put a webview, if not hidden away on the status bar, in the view in the settings.

Who put in viewcontroller.h
        IBOutlet UIWebView *webView;


@property (nonatomic, retain) UIWebView *webView;


In ib, the reference to uiwebview way or another file's owner, select webView, association of the variables.

viewcontroller.m in addition

@synthesize webView;


Loaded with url code.
- (void)viewDidLoad {
        NSString *urlAddress = @"http://www.google.com";
        
        //Create a URL object.
        NSURL *url = [NSURL URLWithString:urlAddress];
        
        //URL Requst Object
        NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
        
        //Load the request in the UIWebView.
        [webView loadRequest:requestObj];
}


Came running to the default load google. If you need to add full-screen in the plist
Status bar is initially hidden = true
If the horizontal screen to add
Initial interface orientation = Landscape (right home button)

Reference:
http://www.iphonesdkarticles.com/2008/08/uiwebview-tutorial.html
http://www.edumobile.org/iphone/ipad-development/webview-application-in-ipad/ #
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

Related Posts of In the app in the use of webview

  • AJAX Packaging Tools

    Writing a javascript procedure ajax package put in a js file for your reference, please exhibitions. First statement of a few variables: Create XmlHttpRequest object: Implementation of Get / Post requests in the incoming Ways: Get the request method: ...

  • Manual configuration in UBUNTU under ruby on rails environment

    Careless mistake for the day before yesterday, the sources, the results after 810 error after the upgrade, the loss of response button. On google found a lot of trouble really, lucky point modification under the / etc/X11/xorg.conf to restore both, b ...

  • Ruby Rails system calls the use of Ping

    Want to use call system commands under RoR, the general exec and system and the syscall Want to use in Rails, the call ping command The most common are ruby support Ping usage is as follows: Ping contains routines to test for the reachability of remote ho

  • Play flash page 3 (javascript script swfobject.js1)

    / ** * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * * SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License: * Http://www.opensource.org/licenses/mit-license.php * * / if (typeof deconc ...

  • Rails source code analysis (4): Request / Response

    1) Rails defines two abstract class: AbstractRequest and AbstractResponse code is not posted, first take a look at Response. 2) is mainly responsible for the specific ctgi_process.rb main interface is responsible for implementation methods of impleme ...

  • Object-oriented design principles 11

    What is object-oriented design? Contains what? The benefits of it are what? Required to pay what you do? In today's age, ask these questions seem to be foolish, because this year almost every software developer knows how to use some sort of objec ...

  • Use Ext JS to read the JsonReader complex object json

    Today was how to resolve the following complex json object to the difficult living over a long time .. did not find documentation how to read JsonReader Ways json object (possibly also because of their limited level of E the text did not correctly underst

  • NoClassDefFoundError: javax / servlet / Servlet

    In the project in order to achieve a listener in web.xml set up a listener, did start in Tomcat actually occurred after java.lang.NoClassDefFoundError: javax / servlet / ServletContextListener this anomaly google and found the reasons for the lack of serv

  • Dynamic loading JS script four kinds of methods

    To achieve dynamic loading JS script has four kinds of methods: 1, direct document.write <script language="javascript"> document.write ( "<script src='test.js'> <\ / script>"); </ script> 2, dynamic scri

  • Build flex + spring + blazeds + hibernate application

    Build flex + spring + blazeds + hibernate application First, set up the project blazeds 1, will blazeds.war extract to a directory, such as: myflex /; 2, set up java works were such as: MyFlex, in the orientation of selection create project from exis ...

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries