美文网首页
MFMessageComposeViewController.h

MFMessageComposeViewController.h

作者: ShenYj | 来源:发表于2016-09-25 13:12 被阅读237次
    
    
    #import <UIKit/UIKit.h>
    
    
    
    enum MessageComposeResult {
        MessageComposeResultCancelled,
        MessageComposeResultSent,
        MessageComposeResultFailed
    };
    typedef enum MessageComposeResult MessageComposeResult;
    
    
    
    extern NSString *const MFMessageComposeViewControllerAttachmentURL;
    
    extern NSString *const MFMessageComposeViewControllerAttachmentAlternateFilename;
    
    
    extern NSString *const MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0);
    
    
    
    extern NSString *const MFMessageComposeViewControllerTextMessageAvailabilityKey __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0);
    
    @protocol MFMessageComposeViewControllerDelegate;
    
    
    NS_CLASS_AVAILABLE(NA, 4_0)
    @interface MFMessageComposeViewController : UINavigationController {
    }
    
    #pragma - mark 能否发送信息
    + (BOOL)canSendText  __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0);
    
    #pragma - mark 能否在信息中发送主题
    + (BOOL)canSendSubject __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
    
    #pragma - mark 能否发送附件
    + (BOOL)canSendAttachments __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
    
    
    + (BOOL)isSupportedAttachmentUTI:(NSString *)uti __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
    
    #pragma - mark 代理
    @property(nonatomic,assign) id<MFMessageComposeViewControllerDelegate> messageComposeDelegate;
    
    - (void)disableUserAttachments __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
    
    
    #pragma - mark 收件人列表
    @property(nonatomic,copy) NSArray *recipients /*__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0)*/;
    
    #pragma - mark 信息内容
    @property(nonatomic,copy) NSString *body /*__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0)*/;
    
    
    @property(nonatomic,copy) NSString *subject /*__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0)*/;
    
    #pragma - mark 附件数组
    @property(nonatomic,copy, readonly) NSArray *attachments /*__OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0)*/;
    
    #pragma - mark 增加附件URL
    - (BOOL)addAttachmentURL:(NSURL *)attachmentURL withAlternateFilename:(NSString *)alternateFilename __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
    
    #pragma - mark 增加附件Data
    - (BOOL)addAttachmentData:(NSData *)attachmentData typeIdentifier:(NSString *)uti filename:(NSString *)filename __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_7_0);
    
    @end
    
    
    @protocol MFMessageComposeViewControllerDelegate <NSObject>
    @required
    #pragma - mark 发送信息的代理
    - (void)messageComposeViewController:(MFMessageComposeViewController *)controller didFinishWithResult:(MessageComposeResult)result;
    
    @end
    
    

    相关文章

      网友评论

          本文标题:MFMessageComposeViewController.h

          本文链接:https://www.haomeiwen.com/subject/audfyttx.html