#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
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 新爱莲说Hélène, je m'appelle Hélène/Hélène Rollès 蓍草填词/江北客@伏羲...
- objc-runtime.h 中代码: #include <objc/runtime.h> #include<ob...