修复分享闪退问题

This commit is contained in:
liyuhua
2023-09-22 20:23:33 +08:00
parent 4dfc17afa5
commit c4e6fae3e1
10 changed files with 85 additions and 18 deletions

View File

@@ -39,7 +39,19 @@
#pragma mark - Life Style
- (instancetype)initWithItems:(NSArray<XPShareItem *> *)items itemSize:(CGSize)itemSize shareInfo:(XPShareInfoModel *)shareInfo {
if (self = [super init]) {
self.items = items;
NSMutableArray *itemList = [NSMutableArray array];
for (XPShareItem * item in items) {
if (item.type == XPShareItemTagAppFriends || item.type == XPShareItemTagCopyLink) {
item.disable = YES;
} else {
item.disable = [self isInstallClient:[self getSharePlatformType:item.type]];
}
if(item.disable == YES){
[itemList addObject:item];
}
}
self.items = itemList;
self.itemSize =itemSize;
self.shareInfo = shareInfo;
[self initSubViews];