我想在我的iOS应用程序(应用程序是PhoneGap应用程序)中创建一个对话框。iOS对话框不工作
我使用这个职位代码:how to implement a pop up dialog box in 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];
}
警告框没有显示出来更新的代码如下
下面的代码是。我究竟做错了什么?
从哪个应用程序显示AlertView?显示您的完整代码。 – nsgulliver 2013-04-24 22:10:15
@nsgulliver是不是应用程序的方法? – aagarwal 2013-04-24 22:21:51
AppDelegate正在实现一个名为[UIApplicationDelegate](http://developer.apple)的协议。com/library/ios/#documentation/uikit/reference/UIApplicationDelegate_Protocol/Reference/Reference.html),这个委托有很多方法可以在委托中看到。他们开始**应用程序** – nsgulliver 2013-04-24 22:24:59