修复分享闪退问题
This commit is contained in:
@@ -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];
|
||||
|
Reference in New Issue
Block a user