Simple URL connection

This is about as simple as it gets. I’d recommend using the asynchronous callback implementation, but if you want something small and simple, here is an option.

1. Let’s start with a UIWebView object named aboutWebView. We want to load that with the HTML contents of a web page somewhere.

2. Just load it up into the object. It’s that easy.

    NSString *urlAddress = @"http your url goes here";
    //Create a URL object.
    NSURL *url = [NSURL URLWithString:urlAddress];
    //URL Requst Object
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    //Load the request in the UIWebView.
    [_aboutWebView loadRequest:requestObj];
Leave a comment

1 Comment

  1. Complex URL connection « aboutss

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: