// 点击胶囊按钮后的默认分享渠道-MAShareTarget 中的 MAShareTargetQQ、MAShareTargetQzone、MAShareTargetWXFriends、MAShareTargetWXMoment(小程序配置的必须是 superapp 的子集)- (NSArray<NSNumber *> *)defaultSharingChannels;
- (NSArray<NSNumber *> *)defaultSharingChannels{return @[@(MAShareTargetQQ),@(MAShareTargetWXFriends),@(MAShareTargetWXMoment)];}
- (NSArray<TMASheetItemInfo *> *)customizedConfigForShare;
- (NSArray<TMASheetItemInfo *> *)customizedConfigForShare {NSMutableArray *arrays = [[NSMutableArray alloc] init];TMASheetItemInfo *item1 = [[TMASheetItemInfo alloc] initWithTitle:@"More sharing" type:MAUIDelegateShareViewTypeCustomizedShare shareTarget:100 shareKey:@"my"];item1.icon = [UIImage imageNamed:@"icon_moreOperation_shareChat"];item1.shareTarget = 10001;[arrays addObject:item1];TMASheetItemInfo *item2 = [[TMASheetItemInfo alloc] initWithTitle:@"click" type:MAUIDelegateShareViewTypeCustomizedAction action:^(TMASheetActionParams * _Nullable params) {NSLog(@"click 点击");}];item2.icon = [UIImage imageNamed:@"icon_moreOperation_collect"];[arrays addObject:item2];return arrays;}


/*** @brief 分享的接口 - shared interface* @param shareModel 分享model - share model* @param appInfo 小程序appinfo - Mini program appinfo* @param completionBlock 回调 - callback*/- (void)shareMessageWithModel:(TMAShareModel *_Nonnull)shareModelappInfo:(TMFMiniAppInfo *_Nonnull)appInfocompletionBlock:(nullable void(^)(NSError * _Nullable error))completionBlock;
- (NSArray<TMASheetItemInfo *> *)customizedConfigForImageShare {TMASheetItemInfo *item = [[TMASheetItemInfo alloc] initWithTitle:@"Send to friend" type:MAUIDelegateShareViewTypeCustomizedShare shareTarget:200 shareKey:@"my"];TMASheetItemInfo *item2 = [[TMASheetItemInfo alloc] initWithTitle:@"test" type:MAUIDelegateShareViewTypeCustomizedAction shareTarget:201];item2.action = ^(TMASheetActionParams * _Nullable params0) {NSLog(@"");};return @[item,item2];}

文档反馈