2011-01-19 46 views

回答

0

展在alertview在應用程序委託類,在applicationDidFinishLaunching:和applicationWillEnterForeground

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]; 

希望它能幫助你!

1

寫在以下的appDelegate方法警報statment,

- (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]; 
} 
相關問題