【问题标题】:UIWebView not opening the secured urlUIWebView 没有打开安全的 url
【发布时间】:2012-01-14 10:03:51
【问题描述】:
在一个 iPhone 应用程序中,我创建了一个 UIWebView,它成功加载了 http://www.google.com。
但是相同的 web 视图没有加载https://xxxseal.xxxxbank.com/mpi/Ssl.jsp?transactionId=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX(支付网关 URL),但是在 Safari 和其他浏览器中成功打开了相同的 URL。任何人都可以解释并帮助我吗?
【问题讨论】:
标签:
ios
iphone
objective-c
uiwebview
payment-gateway
【解决方案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]]];