The following code worked in Swift 1.2. Now I get the error message:
"A value of type MessageComposeResult has no member value '"
func messageComposeViewController(controller: MFMessageComposeViewController, didFinishWithResult result: MessageComposeResult) { switch (result.value) { case MessageComposeResultCancelled.value: print("Message was cancelled") self.dismissViewControllerAnimated(true, completion: nil) case MessageComposeResultFailed.value: print("Message failed") self.dismissViewControllerAnimated(true, completion: nil) case MessageComposeResultSent.value: print("Message was sent") self.dismissViewControllerAnimated(true, completion: nil) default: break; } }
Which member of the result should I check to find the message status in Swift 2?
source share