2011-12-06 79 views
1

在iPhone应用程序中,我创建了一个成功加载http://www.google.comUIWebView。 但同样的网络视图没有加载https://xxxseal.xxxxbank.com/mpi/Ssl.jsp?transactionId=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX(支付网关URL),但是这个相同的URL在Safari和其他浏览器中成功打开。任何人都可以解释和帮助我吗?UIWebView无法打开安全网址

回答

2

试试这个:

NSString *postString; 
postString = [NSString stringWithFormat:@"https://xxxseal.xxxxbank.com/mpi/Ssl.jsp?transactionId=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"]; 
postString = [postString stringByAddingPercentEscapesUsingEncoding:(NSStringEncoding)NSUTF8StringEncoding]; 
[WebViewObj loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:postString]]];