我需要彈出警報,當我的應用程序加載的......我把它叫做didfinished後單擊確定按鈕需要顯示另一個警報消息我使用clickedButtonAtIndex發射後.. ...檢測其UIAlertView中被點擊
現在當我點擊確定按鈕時,它的呼叫一次又一次.. alertview ..
我只需要撥打一次...該怎麼辦?
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
// Add the tab bar controller's view to the window and display.
[window addSubview:tabBarController.view];
[window makeKeyAndVisible];
viewControllersList = [[NSMutableArray alloc] init];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"Alow this app to use your GPS location"
delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
[alert show];
[alert release];
}
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex{
if (buttonIndex==0) {
NSLog(@"NO");
}
else {
NSLog(@"Yes");
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Alert" message:@"Do you want's to receive Push messages."
delegate:self cancelButtonTitle:@"No" otherButtonTitles:@"Yes", nil];
[alert show];
[alert release];
}
}
@提前感謝。
組代表:無在第二alertView – Saawan 2010-12-16 04:35:34
@感謝ranjeet.sajwan – 2010-12-16 04:36:44
k總是歡迎........ – Saawan 2010-12-16 04:38:18