PhoneGapを使用してクライアント用のモバイルアプリケーションを作成しており、PhoneGapを初期化する前にWebViewの変更を確認するUIViewControllerを表示する必要があります。このアプリはPhoneGap 1.4.1で行われており、PhoneGapプロジェクトを拡張してPhoneGapプロジェクトを拡張することでこれを達成しようとしています。ここで私はapplication:didFinishLaunchingWithOptions:
Show ViewController PhoneGapを初期化する前に
hostReach = [[Reachability reachabilityWithHostName: @"google.com"] retain];
internetReach = [[Reachability reachabilityForInternetConnection] retain];
//wifiReach = [[Reachability reachabilityForLocalWiFi] retain];
if (internetReach && hostReach) {
self.app = application;
self.options = launchOptions;
[[NSNotificationCenter defaultCenter] addObserver: self selector: @selector(updateFinished:) name: @"applicationUpdatingFinished" object: nil];
NSLog(@"Windows:%i",[[UIApplication sharedApplication].windows count]);
//[super application:app didFinishLaunchingWithOptions:options];
CGRect screenBounds = [ [ UIScreen mainScreen ] bounds ];
self.window = [ [ [ UIWindow alloc ] initWithFrame:screenBounds ] autorelease ];
UpdateViewController *updateVC = [[UpdateViewController alloc]init];
[updateVC.view setFrame:screenBounds];
[self.window makeKeyAndVisible];
return YES;
}
/////////////////////
// END Check for updates
/////////////////////
return [super application:application didFinishLaunchingWithOptions:launchOptions];
でやっているものですそして、ここで私はUpdateViewControllerが終了した後、焼成していますものです。
-(void)updateFinished:(NSNotification*)n {
[super application:app didFinishLaunchingWithOptions:options];
}
更新ビューコントローラは、どのようなそのになって、チェックやダウンロード、新しいWebファイルを行います。問題は、Default.pngイメージが表示され続けているように見え、UpdateViewControllerのビューを追加するとDefault.pngイメージの下に配置されるということです。 PhoneGapのapplication:didFinishLaunchingWithOptions:
が呼び出されるまで、この画像は消えません。
もっと良いアイデアや、UpdateViewControllerがDefault.pngの下に表示されている理由はありますか?
残念ながら、この問題は 'UIWindow'を作成し、PhoneGapDelegate.mこのウィンドウを再作成されたことによるものと思われます。 UIWindowを再作成すると、向きが正しくありません。 – MobileOverlord