2012-10-22 34 views
1

我有一個Cordova 2.1.0項目,其中包含ChildBrowser插件。現在,當關閉ChildBrowser時,我的鍵盤和選擇菜單在屏幕下方,只顯示下一個/上一個/完成按鈕。有誰知道如何解決這個問題?我看到有人說要ChildBrowser調整主視圖

self.view.frame = [[UIScreen mainScreen] applicationFrame]; 

添加到viewWillAppearmainviewController然而這並沒有這樣做。

已見到https://github.com/phonegap/phonegap-plugins/issues/815但是沒有解決方案出現在那裏。在webVieDidFinishLoad

[theWebView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat: 
    @"document.querySelector('meta[name=viewport]').setAttribute('content', 'width=%d;', false); ", (int)theWebView.frame.size.width]]; 
[theWebView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat: 
    @"document.querySelector('meta[name=viewport]').setAttribute('content', 'height=%d;', false); ", (int)theWebView.frame.size.height]]; 

+0

您是否發現此問題的任何解決方案? – wakeup

回答