Possible Duplicate:
Proper way to exit iPhone application?
How can I Crash my app?
i want To crash the app if the user press close in this code
UIAlertView *alertView = [[UIAlertView alloc]
initWithTitle:@"Alert!"
message:@"What To Do To You App!"
delegate:self
cancelButtonTitle:@"Close"
otherButtonTitles:@"Open In Safari",nil];
- (void)alertView:(UIAlertView *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex {
// the user clicked one of the OK/Cancel buttons
if (buttonIndex == 1)
{
NSLog(@"Open in Safari");
}
else
{
NSLog(@"Close");
}
}