Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this questionCan anyone point me some good examples on how to use UIWebView in iPhone.
here is the code for using UIWebview
Hope this gives you an idea for using it
CGRect webFrame = CGRectMake(0.0, 0.0, 320.0, 460.0);
UIWebView *webView = [[UIWebView alloc] initWithFrame:webFrame];
[webView setBackgroundColor:[UIColor whiteColor]];
NSString *urlAddress = @"http://www.google.com";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
[self addSubview:webView];
[webView release];
hAPPY cODING...
Apple has a couple of sample code projects:
UICatalog
Web - Shows how to properly use a UIWebView and target websites using NSURL class.
and
TransWeb
Demonstrates how to implement UIWebView with a transparent background.
精彩评论