Thursday, June 9, 2011


UIWebView  *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, 320, 290)]; 

//init and create the UIWebView
   
webView.autoresizesSubviews = YES;
  webView.autoresizingMask=(UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth);
   
[webView setDelegate:self];
   
NSString *urlAddress = @"http://www.kamleshwar.com"
   
// Web view is working with url to webpage
   
NSURL *url = [NSURL URLWithString:urlAddress];
   
   
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
   
[webView loadRequest:requestObj];
 

[[self view] addSubview: webView];  



// Upload HTML contents to Web view


NSString *html = @"iPhone Application Development Is Easy with Kamleshwar";
[webView loadHTMLString:html baseURL:nil];

No comments:

Post a Comment

Kamleshwar