Inoperative Cancel button in UIActionSheet
Let's say you want to use UIActionSheet to show three buttons to the user with a cancel buttons in a UIView, which itself is managed by a UITabBarController:
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Action Title" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Option 1", @"Option 2", @"Option 3", nil];
actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
[actionSheet showInView:self.view];
[actionSheet release];
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Action Title" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Option 1", @"Option 2", @"Option 3", nil];
actionSheet.actionSheetStyle = UIActionSheetStyleDefault;
ApplicationDelegate *appDelegate = (ApplicationDelegate *)[[UIApplication sharedApplication] delegate];
UITabBarController *tabBarController = appDelegate.tabBarController_;
[actionSheet showInView:tabBarController.view];
[actionSheet release];