开发者

Query on UIWebView [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. 开发者_如何学Python

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 question

Can 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜