今回はSenchaTouchとの組み合わせですが、jQueryでも応用可能だと思います。(要確認ですが、、)
情報元はこちらです。最新版で回避されている可能性はありますが、
2011/12/07現在ソースが修正されていないようなので、ここに残しておきます。
現象
PhoneGapのChildBrowserプラグインを使用した際、iOS5環境で子ウィンドウが閉じない
原因
ChildBrowserプラグインファイルの一つ
ChildBrowserViewController.m のバグと思われます
解決方法
1.XCodeの左側にあるプロジェクトナビゲーターから
[project name]/Plugins/ChildBrowserViewController.m を探し出しクリックしてソースを表示
2.ソース中あたりにあるこちらの内容を修正。
/*
//修正前
-(void)closeBrowser
{
if(delegate != NULL)
{
[delegate onClose];
}
[ [super parentViewController] dismissModalViewControllerAnimated:YES];
}
*/
// 修正後
-(void)closeBrowser
{
if(delegate != NULL)
{
[delegate onClose];
}
if ([self respondsToSelector:@selector(presentingViewController)])
{
[ [super presentingViewController]
dismissModalViewControllerAnimated:YES];
} else {
[ [super parentViewController]
dismissModalViewControllerAnimated:YES];
}
}

Comments
Powered by Facebook Comments