iOS アプリでダイアログ ボックスを作成しようとしています (アプリは PhoneGap アプリケーションです)。
この投稿のコードを使用しています: iOS でポップアップ ダイアログ ボックスを実装する方法
以下はリンクにあるコードです
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No network connection"
message:@"You must be connected to the internet to use this app."
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
このコードをAppDelegate.m
メソッドに入れました
- (BOOL)application:(UIApplication)...
アプリは実行されますが、ダイアログ ボックスが表示されません。
何が問題ですか?
以下のようにコードを更新しました
以下のコードは私の appdelegate.m にあります
//reachability code
if (networkStatus == ReachableViaWifi)
{
while (true)
//show progress bar
}
else
{
UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"title" message:@"message" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:@"cancel", nil];
[alert show];
}
アラート ボックスが表示されません。私は何を間違っていますか?