如何在应用打开时显示提醒视图,加载...
就像每次用户打开应用程序一样,他会看到警报......
答案 0 :(得分:1)
在以下appDelegate方法中编写alert语句,
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UIAlertView *alert_View = [[[UIAlertView alloc] initWithTitle:@"Your Title" message:@"Your Message" delegate:self cancelButtonTitle:nil otherButtonTitles:@"YES",@"NO",nil] autorelease];
[alert_View show];
}
答案 1 :(得分:0)
在applicationDidFinishLaunching
:和applicationWillEnterForeground
中的应用程序委托类中显示alertview:
答案 2 :(得分:0)
@Rafeel将此UIAlertView
放入AppDelegate的didFinishLaunchingWithOptions
方法中,当您的应用启动时,您将始终获得UIAlertView
UIAlertView *confirmAlertView=[[UIAlertView alloc]initWithTitle:@"Saved" message:@"Want to save!!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Cancel",nil];
[confirmAlertView show];
[confirmAlertView release];
希望它会帮助你!