动态分享举报点击查看图片

This commit is contained in:
fengshuo
2022-06-27 20:04:54 +08:00
parent 1a13c09723
commit 37d4f2a4e2
29 changed files with 559 additions and 47 deletions

View File

@@ -34,6 +34,13 @@ typedef NS_ENUM(NSUInteger, ShareType) {
@property (nonatomic,assign) NSInteger shareType;
///分享房间的uid
@property (nonatomic,assign) NSInteger roomUid;
#pragma mark - 动态分享
///被分享动态的那个人
@property (nonatomic,copy) NSString *uid;
///动态分享
@property (nonatomic,copy) NSString *dynamicId;
///话题id
@property (nonatomic,copy) NSString *worldId;
@end

View File

@@ -14,8 +14,11 @@
///Tool
#import "XPMacro.h"
#import "ThemeColor.h"
#import "XCCurrentVCStackManager.h"
#import "TTPopup.h"
///View
#import "XPShareItemCell.h"
#import "XPMineShareViewController.h"
@interface XPShareView()<UICollectionViewDataSource,UICollectionViewDelegate>
///
@@ -110,13 +113,25 @@
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
XPShareItemCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPShareItemCell class]) forIndexPath:indexPath];
XPShareItem * item = [self.items objectAtIndex:indexPath.item];
item.disable = [self isInstallClient:[self getSharePlatformType:item.type]];
if (item.type == XPShareItemTagAppFriends) {
item.disable = YES;
} else {
item.disable = [self isInstallClient:[self getSharePlatformType:item.type]];
}
cell.shareItem = item;
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
[collectionView deselectItemAtIndexPath:indexPath animated:YES];
XPShareItem * item = [self.items objectAtIndex:indexPath.item];
if (item.type == XPShareItemTagAppFriends) {
[TTPopup dismiss];
XPMineShareViewController * shareVC = [[XPMineShareViewController alloc] init];
shareVC.shareType = MineShareType_Monents;
shareVC.shareInfo = self.shareInfo;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:shareVC animated:YES];
return;
}
self.shareInfo.shareType = item.type;
NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];
NSString * title = [self.shareInfo shareTitle].length > 0 ? self.shareInfo.shareTitle : @"";