Krishan G Krishan G - 5 months ago 25
Objective-C Question

Navigation based iphone application

How would I go about creating a navigation based application that for each item in the list goes to a different website.
Item 1 --->google.
Item 2 --->stackoverflow.
Item 3 --->facebook.

I am tried many things but cannot seem to get it working. I've looked at UICatalog but cannot think of how to implement what i need.
A quick walkthrough would be great.

Answer Source

First you can take an array in that enter url list of arrays as follows:

NSArray *arr = [[NSArray alloc] initWithArray:@"Google",@"Stackoverflow",@"facebook",nil];

Then display these items first in tableviewcell.

After that add viewcontrollers, in that you can write the code what you want to show in that view using UIWebview.

UIWebView *web = [[UIWebView alloc] initwithFrame:CGRectMake(0,0,320,460)];
NSString *str = @"";
NSURL *url = [NSURL urlWithString:str];
NSURLRequest *req = [NSURLRequest requestWithURL:url];
[web loadRequest:req];
[self.view addSubView:web];
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download