FIX: 修复加载图片类型通用飘屏时不显示并会卡住所有后续数据的问题
This commit is contained in:
@@ -111,9 +111,6 @@
|
||||
///可见池
|
||||
@property (nonatomic,strong) NSMutableSet<NetImageView *> * giftVisibleArray;
|
||||
|
||||
|
||||
|
||||
|
||||
///大礼物是否正在播放
|
||||
@property (nonatomic,assign) BOOL isLargeGiftAnimating;
|
||||
#pragma mark - 进房座驾动画的
|
||||
@@ -140,9 +137,6 @@
|
||||
#pragma mark - 心愿礼物
|
||||
@property (nonatomic,strong) SVGAImageView *wishGiftEffectView;
|
||||
|
||||
|
||||
|
||||
|
||||
///礼物飘屏 PresentAchieveAbstractMatrix
|
||||
@property(nonatomic,strong) NSMutableArray<GiftReceiveInfoModel *> *animationListA;
|
||||
///玩法飘屏 YUMIPresentBigCaptureMatrix
|
||||
@@ -155,6 +149,8 @@
|
||||
//@property(nonatomic,assign) BOOL isAnimationListAFinish;
|
||||
@property(nonatomic,strong) NSMutableArray *svgaQueue;
|
||||
@property(nonatomic,assign) CGFloat broadCastHieght;
|
||||
|
||||
@property (nonatomic, strong) NetImageView *imageLoader;
|
||||
@end
|
||||
|
||||
@implementation XPRoomAnimationView
|
||||
@@ -393,12 +389,13 @@
|
||||
CGFloat top = self.isPlayOfA == YES ? (self.broadCastHieght + statusbarHeight) : (kNavigationHeight + 15);
|
||||
|
||||
PIUniversalBannerModel *model = [PIUniversalBannerModel modelWithDictionary:attacment.data];
|
||||
BOOL isSvga = [model.resourceType isEqualToString:@"SVGA"];
|
||||
BOOL isSvga = [model.resourceType.uppercaseString isEqualToString:@"SVGA"];
|
||||
__block PIUniversalBannerView *bannerView;
|
||||
@kWeakify(self);
|
||||
if (isSvga == YES) {
|
||||
|
||||
SVGAParser *parser = [SVGAParser new];
|
||||
[parser parseWithURL:[NSURL URLWithString:model.resourceContent] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
model.videoItem = videoItem;
|
||||
CGFloat height = kGetScaleWidth(60);
|
||||
if(videoItem.videoSize.width > 0){
|
||||
@@ -407,6 +404,7 @@
|
||||
bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth, height)];
|
||||
[self showGeneralFloatingScreenView:bannerView model:model];
|
||||
} failureBlock:^(NSError * _Nonnull error) {
|
||||
@kStrongify(self);
|
||||
[bannerView removeFromSuperview];
|
||||
self.isPlayOfB = NO;
|
||||
if(self.animationListB.count > 0){
|
||||
@@ -415,9 +413,12 @@
|
||||
[self playAnimationWithModel];
|
||||
}];
|
||||
}else{
|
||||
NetImageView *imageView = [NetImageView new];
|
||||
[imageView loadImageWithUrl:model.resourceContent completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
|
||||
|
||||
if (!_imageLoader) {
|
||||
_imageLoader = [[NetImageView alloc] init];
|
||||
}
|
||||
[self.imageLoader loadImageWithUrl:model.resourceContent
|
||||
completion:^(UIImage * _Nonnull image, NSURL * _Nonnull url) {
|
||||
@kStrongify(self);
|
||||
model.image = image;
|
||||
CGFloat width = image.size.width <= 0 ? kGetScaleWidth(60) : image.size.width;
|
||||
CGFloat height = image.size.height ;
|
||||
@@ -427,8 +428,10 @@
|
||||
}
|
||||
bannerView = [[PIUniversalBannerView alloc]initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth, getHeight) ];
|
||||
[self showGeneralFloatingScreenView:bannerView model:model];
|
||||
|
||||
}fail:^(NSError * _Nonnull error) {
|
||||
|
||||
}
|
||||
fail:^(NSError * _Nonnull error) {
|
||||
@kStrongify(self);
|
||||
[bannerView removeFromSuperview];
|
||||
self.isPlayOfB = NO;
|
||||
if(self.animationListB.count > 0){
|
||||
@@ -436,9 +439,7 @@
|
||||
}
|
||||
[self playAnimationWithModel];
|
||||
}];
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
-(void)showGeneralFloatingScreenView:(PIUniversalBannerView *)bannerView model:(PIUniversalBannerModel *)model{
|
||||
BOOL isSvga = [model.resourceType isEqualToString:@"SVGA"];
|
||||
|
Reference in New Issue
Block a user