开发者

How to use UIWebview inside UIAlertView in iphone

开发者 https://www.devze.com 2022-12-29 22:36 出处:网络
I am trying to insert UIWebview in UIAlertview as I this tutorial did http://codesofa.com/blog/archive/category/iphone with Table, i have tried webview in code but facing exception and my pr开发者_Sta

I am trying to insert UIWebview in UIAlertview as I this tutorial did http://codesofa.com/blog/archive/category/iphone with Table, i have tried webview in code but facing exception and my pr开发者_StackOverflow中文版ogram in terminationg due to it.


UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"WebView" delegate:nil cancelButtonTitle:nil otherButtonTitles:@"Ok", nil];
UIWebView *webView = [[UIWebView alloc] init];
[webViewn setFrame:CGRectMake(0,0,80,50)];
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"google.com"]]];
[alert addSubview:webView];
[webView release];
[alert show];
[alert release];

try like this.

0

精彩评论

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

关注公众号