cdts/xdts-ios 3/TreeHole/Code/Utility/Share/MTShareService.h
2023-07-27 09:20:00 +08:00

51 lines
1.2 KiB
Objective-C
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// MTShareService.h
// Meet
//
// Created by ko1o on 2018/10/3.
// Copyright © 2018年 ko1o. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "TPServiceProtocol.h"
typedef NS_ENUM(NSInteger, MTShareType){
MTShareTypeWeChat = 0,
MTShareTypeWXZone,
MTShareTypeQQ,
MTShareTypeQZone
};
@class MTShareMedia;
@interface MTShareMedia : NSObject
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *content;
@property (nonatomic, strong) NSURL *url;
@property (nonatomic, strong) NSURL *previewImageURL;
@property (nonatomic, strong) UIImage *previewImage;
@property (nonatomic, strong) NSData *imageData;
/// 针对微信朋友圈的特殊标题
@property (nonatomic, strong) NSString *weChatZoneSpicalTitle;
@end
@protocol MTShareService <TPServiceProtocol>
@required
// 设置分享平台eg: @[@(MTShareTypeQQ), @(MTShareTypeWeChat)]
- (void)setShareTypes:(NSArray *)shareTypes;
// 显示分享工具栏
- (void)showShareToolBarWithMedia:(MTShareMedia *)media;
// 隐藏分享工具栏
- (void)hiddenShareToolBar;
// 处理回调
- (void)handleUrl:(NSURL *)url shareType:(MTShareType)type;
@end