app年龄,星座,寻爱飘屏优化
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPRoomAnimationView : XPRoomAnimationHitView <RoomGuestDelegate>
|
||||
-(void)resumeTimer;
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
@end
|
||||
|
||||
|
@@ -15,6 +15,7 @@
|
||||
#import "UIView+VAP.h"
|
||||
#import <YYText/YYText.h>
|
||||
#import <UIImageView+WebCache.h>
|
||||
#import <libpag/libpag-umbrella.h>
|
||||
///Tool
|
||||
#import "XPGiftStorage.h"
|
||||
#import "YUMIMacroUitls.h"
|
||||
@@ -77,6 +78,8 @@
|
||||
@property (nonatomic, strong) XPRoomGiftAnimationParser *vapParser;
|
||||
///送礼物的特效
|
||||
@property (nonatomic,strong) SVGAImageView *giftEffectView;
|
||||
///pag动效
|
||||
@property(nonatomic,strong) PAGView *giftPagView;
|
||||
///VAP特效
|
||||
@property (nonatomic, strong) VAPView *vapGiftEffectView;
|
||||
///福袋礼物送礼物的特效
|
||||
@@ -164,7 +167,17 @@
|
||||
self.giftTimer = nil;
|
||||
}
|
||||
}
|
||||
|
||||
-(void)resumeTimer{
|
||||
if(self.giftEffectTimer != nil){
|
||||
dispatch_resume(self.giftEffectTimer);
|
||||
self.giftEffectTimer = nil;
|
||||
}
|
||||
|
||||
if(self.giftTimer != nil){
|
||||
dispatch_resume(self.giftTimer);
|
||||
self.giftTimer = nil;
|
||||
}
|
||||
}
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate {
|
||||
self = [super init];
|
||||
if (self) {
|
||||
@@ -2593,5 +2606,11 @@
|
||||
}
|
||||
return _svgaQueue;
|
||||
}
|
||||
|
||||
- (PAGView *)giftPagView{
|
||||
if(!_giftPagView){
|
||||
_giftPagView = [[PAGView alloc]init];
|
||||
|
||||
}
|
||||
return _giftPagView;
|
||||
}
|
||||
@end
|
||||
|
@@ -54,7 +54,10 @@
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.backImageView);
|
||||
make.top.bottom.equalTo(self.backImageView);
|
||||
make.leading.mas_equalTo(kGetScaleWidth(84));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(70.5));
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
@@ -74,35 +77,36 @@
|
||||
if(giftInfo.nick.length > 5){
|
||||
giftInfo.nick = [NSString stringWithFormat:@"%@...",[giftInfo.nick substringToIndex:5]];
|
||||
}
|
||||
CGFloat fontSize = self.isMaxLargeGift ? 20 : 12;
|
||||
CGFloat fontSize = self.isMaxLargeGift ? 12 : 12;
|
||||
[attribute appendAttributedString:[self createAttribute:YMLocalizedString(@"XPRoomCandyGiftView0") color:[UIColor whiteColor] fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:giftInfo.nick color:UIColorFromRGB(0xFEF23E) fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:giftInfo.nick color:UIColorFromRGB(0xFFE44E) fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:YMLocalizedString(@"XPRoomCandyGiftView1") color:[UIColor whiteColor] fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:giftInfo.prizeName color:UIColorFromRGB(0x00EAFF) fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:giftInfo.prizeName color:UIColorFromRGB(0xFFE44E) fontSize:fontSize]];
|
||||
if (giftInfo.prizeNum > 1) {
|
||||
[attribute appendAttributedString:[self createAttribute:[NSString stringWithFormat:@" X%d", giftInfo.prizeNum] color:UIColorFromRGB(0x00EAFF) fontSize:fontSize]];
|
||||
[attribute appendAttributedString:[self createAttribute:[NSString stringWithFormat:@" X%d", giftInfo.prizeNum] color:[UIColor whiteColor] fontSize:fontSize]];
|
||||
}
|
||||
|
||||
self.titleLabel.attributedText = attribute;
|
||||
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
if (self.isMaxLargeGift) {
|
||||
self.backImageView.hidden = YES;
|
||||
self.candyTreeView.hidden = NO;
|
||||
@kWeakify(self);
|
||||
NSString * anatomiser1Name = [NSString stringWithFormat:@"%@/candyTree_banner.svga", API_Image_URL];
|
||||
[self.parser parseWithURL:[NSURL URLWithString:anatomiser1Name] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
|
||||
[self.parser parseWithNamed:@"pi_room_game_fine_love" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
self.candyTreeView.loops = 1;
|
||||
self.candyTreeView.loops = 2;
|
||||
self.candyTreeView.clearsAfterStop = NO;
|
||||
self.candyTreeView.videoItem = videoItem;
|
||||
[self.candyTreeView setAttributedText:attribute forKey:@"noble_text_tx"];
|
||||
[self.candyTreeView startAnimation];
|
||||
} failureBlock:^(NSError * _Nonnull error) {
|
||||
|
||||
} failureBlock:^(NSError * _Nonnull error) {
|
||||
|
||||
}];
|
||||
|
||||
} else {
|
||||
self.backImageView.hidden = NO;
|
||||
self.candyTreeView.hidden = YES;
|
||||
self.titleLabel.attributedText = attribute;
|
||||
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -136,6 +140,7 @@
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_titleLabel.numberOfLines = 2;
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
Reference in New Issue
Block a user