I'm trying to implement a UIActionSheet which will have some sharing buttons on it for sharing to twitter, facebook, email and print.

Here is my share view controller.h

```
@interface ShareViewController : UITableViewController <UIActionSheetDelegate, MFMailComposeViewControllerDelegate>
@property (nonatomic, strong) NSMutableDictionary *services;
@property (strong, nonatomic) UIActionSheet *actionSheet;
@property (strong, nonatomic) id <ShareViewControllerDelegate> delegate;
@property (nonatomic, strong) UIPopoverController *popCon;
@property (nonatomic, strong) NSString *serviceTitle;

-(IBAction)loadActionSheet:(id)sender;
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex;
- (void)tweetThis;
- (void)printThis;
- (void)openMail;
- (void)mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error;

@end

```

Here is my share view controller.m

```
-(IBAction)loadActionSheet:(id)sender{
if (self.actionSheet) {
            // do nothing
} 
else {
UIActionSheet *sharing = [[UIActionSheet alloc] 
                          initWithTitle:nil 
                          delegate:self 
                          cancelButtonTitle:nil 
                          destructiveButtonTitle:nil 
                          otherButtonTitles:@"Twitter", @"Facebook", @"Email", @"Print", nil];

[sharing showFromBarButtonItem:sender animated:YES];
}
}

- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{

     NSLog(@"Button index: %d",buttonIndex);
switch (buttonIndex) {
    case 0:
        [self tweetThis];
        break;
    case 1:
        [self sendToFacebook];
        break;
    case 2:
        NSLog(@"email");
        [self openMail];
        break;
    case 3:
        NSLog(@"Print");
        [self printThis];
        break;
    default:
        NSLog(@"Error");
        break;
}
}

```

I ma initiaalising my share view controller in main view controller.m as follows:

```
- (IBAction)shareButtonTapped:(id)sender {

ShareViewController *svc = [[ShareViewController alloc] initWithStyle:UIActionSheetStyleDefault];
[svc loadActionSheet:(id)sender];

}

```

I can open the action sheet fine, but when I click on any of the buttons, it crashes the app. Any ideas as to why?