【发布时间】:2010-04-05 14:16:49
【问题描述】:
我正在使用UIAlertView 在应用启动后弹出一个弹出窗口。它工作正常,但我只希望弹出窗口出现在应用程序的第一次启动时。目前我在AppDelegate 类中得到了UIAlertView,在applicationDidFinishLaunching 方法中。这是我的代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
sleep(4);
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Welcome!" message:@"SAMPLE!!!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
我是应用程序开发的新手,如果这很简单,很抱歉。
【问题讨论】:
标签: iphone cocoa-touch xcode uialertview