/ Published in: Objective C
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// place this code in a UIViewController subclass - (void)debugButtonPressed:(id)sender { UIActionSheet* action = [[UIActionSheet alloc] initWithTitle:@"Menu" delegate:self cancelButtonTitle:@"Continue" destructiveButtonTitle:@"Quit" otherButtonTitles:@"Debug",nil ]; [action showInView:self.view]; [action release]; } - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { switch (buttonIndex) { case 0: // continue NSLog(@"Continue"); break; case 1: // Quit NSLog(@"Quit"); break; case 2: // Debug NSLog(@"Debug"); break; } }