Guest User

Untitled

a guest
Aug 11th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. Unrecognized selector sent to instance error from Utility App navigation controller view
  2. - (IBAction)sendMail;
  3.  
  4. - (IBAction)sendMail
  5. {
  6. if ([MFMailComposeViewController canSendMail])
  7. {
  8. MFMailComposeViewController *mfViewController = [[MFMailComposeViewController alloc] init];
  9. mfViewController.mailComposeDelegate = self;
  10.  
  11. [self presentModalViewController:mfViewController animated:YES];
  12.  
  13. }
  14. else
  15. {
  16. UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Status:" message:@"Your phone is not currently configured to send mail." delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil];
  17.  
  18. [alert show];
  19. }
  20.  
  21. reason: '-[UIViewController sendMail]: unrecognized selector sent to instance
  22.  
  23. MyCustomViewController *controller = [[MyCustomViewController alloc] initWithNibName:@"ExMobSendFeedback" bundle:nil];
  24. controller.title = @"Feedback";
  25. [self.navigationController pushViewController:controller animated:YES];
  26. [controller release];
Add Comment
Please, Sign In to add comment