MessageUI Changes for Swift
MessageUI
Removed MessageComposeResult.init(_: UInt32)
Removed MessageComposeResult.init(rawValue: UInt32)
Removed MessageComposeResult.rawValue
Removed MFMailComposeErrorCode.init(_: UInt32)
Removed MFMailComposeErrorCode.init(rawValue: UInt32)
Removed MFMailComposeErrorCode.rawValue
Removed MFMailComposeResult.init(_: UInt32)
Removed MFMailComposeResult.init(rawValue: UInt32)
Removed MFMailComposeResult.rawValue
Added MFMailComposeError.init(_nsError: NSError)
Modified MessageComposeResult [enum]
Declaration | Protocols | Introduction | Raw Value Type | |
---|---|---|---|---|
From | struct MessageComposeResult : RawRepresentable, Equatable { init(_ rawValue: UInt32) init(rawValue rawValue: UInt32) var rawValue: UInt32 } | Equatable, RawRepresentable | iOS 8.1 | -- |
To | enum MessageComposeResult : Int { case cancelled case sent case failed } | -- | iOS 4.0 | Int |
Modified MessageComposeResult.cancelled
Name | Declaration | Introduction | |
---|---|---|---|
From | MessageComposeResultCancelled | var MessageComposeResultCancelled: MessageComposeResult { get } | iOS 8.0 |
To | cancelled | case cancelled | iOS 10.0 |
Modified MessageComposeResult.failed
Name | Declaration | Introduction | |
---|---|---|---|
From | MessageComposeResultFailed | var MessageComposeResultFailed: MessageComposeResult { get } | iOS 8.0 |
To | failed | case failed | iOS 10.0 |
Modified MessageComposeResult.sent
Name | Declaration | Introduction | |
---|---|---|---|
From | MessageComposeResultSent | var MessageComposeResultSent: MessageComposeResult { get } | iOS 8.0 |
To | sent | case sent | iOS 10.0 |
Modified MFMailComposeError.Code [enum]
Name | Declaration | Protocols | Raw Value Type | |
---|---|---|---|---|
From | MFMailComposeError | struct MFMailComposeErrorCode : RawRepresentable, Equatable { init(_ rawValue: UInt32) init(rawValue rawValue: UInt32) var rawValue: UInt32 } | Equatable, RawRepresentable | -- |
To | MFMailComposeError.Code | enum Code : Int { typealias _ErrorType = MFMailComposeError case saveFailed case sendFailed } | -- | Int |
Modified MFMailComposeError.Code.saveFailed
Name | Declaration | Introduction | |
---|---|---|---|
From | MFMailComposeErrorCodeSaveFailed | var MFMailComposeErrorCodeSaveFailed: MFMailComposeErrorCode { get } | iOS 8.0 |
To | saveFailed | case saveFailed | iOS 10.0 |
Modified MFMailComposeError.Code.sendFailed
Name | Declaration | Introduction | |
---|---|---|---|
From | MFMailComposeErrorCodeSendFailed | var MFMailComposeErrorCodeSendFailed: MFMailComposeErrorCode { get } | iOS 8.0 |
To | sendFailed | case sendFailed | iOS 10.0 |
Modified MFMailComposeResult [enum]
Declaration | Protocols | Introduction | Raw Value Type | |
---|---|---|---|---|
From | struct MFMailComposeResult : RawRepresentable, Equatable { init(_ rawValue: UInt32) init(rawValue rawValue: UInt32) var rawValue: UInt32 } | Equatable, RawRepresentable | iOS 8.1 | -- |
To | enum MFMailComposeResult : Int { case cancelled case saved case sent case failed } | -- | iOS 3.0 | Int |
Modified MFMailComposeResult.cancelled
Name | Declaration | Introduction | |
---|---|---|---|
From | MFMailComposeResultCancelled | var MFMailComposeResultCancelled: MFMailComposeResult { get } | iOS 8.0 |
To | cancelled | case cancelled | iOS 10.0 |
Modified MFMailComposeResult.failed
Name | Declaration | Introduction | |
---|---|---|---|
From | MFMailComposeResultFailed | var MFMailComposeResultFailed: MFMailComposeResult { get } | iOS 8.0 |
To | failed | case failed | iOS 10.0 |
Modified MFMailComposeResult.saved
Name | Declaration | Introduction | |
---|---|---|---|
From | MFMailComposeResultSaved | var MFMailComposeResultSaved: MFMailComposeResult { get } | iOS 8.0 |
To | saved | case saved | iOS 10.0 |
Modified MFMailComposeResult.sent
Name | Declaration | Introduction | |
---|---|---|---|
From | MFMailComposeResultSent | var MFMailComposeResultSent: MFMailComposeResult { get } | iOS 8.0 |
To | sent | case sent | iOS 10.0 |
Modified MFMailComposeViewController
Declaration | |
---|---|
From | class MFMailComposeViewController : UINavigationController { class func canSendMail() -> Bool unowned(unsafe) var mailComposeDelegate: MFMailComposeViewControllerDelegate? func setSubject(_ subject: String) func setToRecipients(_ toRecipients: [String]?) func setCcRecipients(_ ccRecipients: [String]?) func setBccRecipients(_ bccRecipients: [String]?) func setMessageBody(_ body: String, isHTML isHTML: Bool) func addAttachmentData(_ attachment: NSData, mimeType mimeType: String, fileName filename: String) } |
To | class MFMailComposeViewController : UINavigationController { class func canSendMail() -> Bool unowned(unsafe) var mailComposeDelegate: MFMailComposeViewControllerDelegate? func setSubject(_ subject: String) func setToRecipients(_ toRecipients: [String]?) func setCcRecipients(_ ccRecipients: [String]?) func setBccRecipients(_ bccRecipients: [String]?) func setMessageBody(_ body: String, isHTML isHTML: Bool) func addAttachmentData(_ attachment: Data, mimeType mimeType: String, fileName filename: String) } |
Declaration | |
---|---|
From | func addAttachmentData(_ attachment: NSData, mimeType mimeType: String, fileName filename: String) |
To | func addAttachmentData(_ attachment: Data, mimeType mimeType: String, fileName filename: String) |
Modified MFMailComposeViewControllerDelegate
Declaration | |
---|---|
From | protocol MFMailComposeViewControllerDelegate : NSObjectProtocol { optional func mailComposeController(_ controller: MFMailComposeViewController, didFinishWithResult result: MFMailComposeResult, error error: NSError?) } |
To | protocol MFMailComposeViewControllerDelegate : NSObjectProtocol { optional func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error error: Error?) } |
Declaration | |
---|---|
From | optional func mailComposeController(_ controller: MFMailComposeViewController, didFinishWithResult result: MFMailComposeResult, error error: NSError?) |
To | optional func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith result: MFMailComposeResult, error error: Error?) |
Modified MFMessageComposeViewController
Declaration | |
---|---|
From | class MFMessageComposeViewController : UINavigationController { class func canSendText() -> Bool class func canSendSubject() -> Bool class func canSendAttachments() -> Bool class func isSupportedAttachmentUTI(_ uti: String) -> Bool unowned(unsafe) var messageComposeDelegate: MFMessageComposeViewControllerDelegate? func disableUserAttachments() var recipients: [String]? var body: String? var subject: String? var attachments: [[NSObject : AnyObject]]? { get } func addAttachmentURL(_ attachmentURL: NSURL, withAlternateFilename alternateFilename: String?) -> Bool func addAttachmentData(_ attachmentData: NSData, typeIdentifier uti: String, filename filename: String) -> Bool } |
To | class MFMessageComposeViewController : UINavigationController { class func canSendText() -> Bool class func canSendSubject() -> Bool class func canSendAttachments() -> Bool class func isSupportedAttachmentUTI(_ uti: String) -> Bool unowned(unsafe) var messageComposeDelegate: MFMessageComposeViewControllerDelegate? func disableUserAttachments() var recipients: [String]? var body: String? var subject: String? var attachments: [[AnyHashable : Any]]? { get } @NSCopying var message: MSMessage? func addAttachmentURL(_ attachmentURL: URL, withAlternateFilename alternateFilename: String?) -> Bool func addAttachmentData(_ attachmentData: Data, typeIdentifier uti: String, filename filename: String) -> Bool } |
Declaration | |
---|---|
From | func addAttachmentData(_ attachmentData: NSData, typeIdentifier uti: String, filename filename: String) -> Bool |
To | func addAttachmentData(_ attachmentData: Data, typeIdentifier uti: String, filename filename: String) -> Bool |
Modified MFMessageComposeViewController.addAttachmentURL(_: URL, withAlternateFilename: String?) -> Bool
Declaration | |
---|---|
From | func addAttachmentURL(_ attachmentURL: NSURL, withAlternateFilename alternateFilename: String?) -> Bool |
To | func addAttachmentURL(_ attachmentURL: URL, withAlternateFilename alternateFilename: String?) -> Bool |
Declaration | |
---|---|
From | var attachments: [[NSObject : AnyObject]]? { get } |
To | var attachments: [[AnyHashable : Any]]? { get } |
Declaration | |
---|---|
From | protocol MFMessageComposeViewControllerDelegate : NSObjectProtocol { func messageComposeViewController(_ controller: MFMessageComposeViewController, didFinishWithResult result: MessageComposeResult) } |
To | protocol MFMessageComposeViewControllerDelegate : NSObjectProtocol { func messageComposeViewController(_ controller: MFMessageComposeViewController, didFinishWith result: MessageComposeResult) } |
Declaration | |
---|---|
From | func messageComposeViewController(_ controller: MFMessageComposeViewController, didFinishWithResult result: MessageComposeResult) |
To | func messageComposeViewController(_ controller: MFMessageComposeViewController, didFinishWith result: MessageComposeResult) |
Name | Declaration | |
---|---|---|
From | MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification | let MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification: String |
To | MFMessageComposeViewControllerTextMessageAvailabilityDidChange | static let MFMessageComposeViewControllerTextMessageAvailabilityDidChange: NSNotification.Name |