2014-02-18 52 views
0

我在使用iOS6上的UIWebView組件加載reCAPTCHA時遇到問題。reCAPTCHA不能在iOS6中工作UIWebView

第一次加載的頁面正常。查看http://www.google.com/recaptcha/learnmore的屏幕截圖。

enter image description here

但隨後的同一頁面的加載請求有驗證碼的圖像丟失。

enter image description here

我的控制器代碼很簡單:

- (void)viewDidLoad 
{ 
    [super viewDidLoad]; 
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com/recaptcha/learnmore"]]]; 
} 

並且該控制器被加載在第二次我已經打破驗證碼圖像。 用[[NSURLCache sharedURLCache] removeAllCachedResponses];清除緩存沒有幫助。指定這樣的NSURLRequest緩存策略也不起作用:

- (void)viewDidLoad 
{ 
    [super viewDidLoad]; 
    [self.webView loadRequest:[NSURLRequest requestWithURL:[self.reCaptchaURL] 
              cachePolicy:NSURLRequestReloadIgnoringLocalCacheData 
              timeoutInterval:60]]; 
} 

該問題特定於iOS 6.0和iOS 6.1。在iOS 7.0上,此代碼正常工作。

回答

0

看來Google已經修復了這個錯誤。現在,重新驗證碼可在iOS6上運行。

相關問題