通用h5飘屏优化

This commit is contained in:
liyuhua
2023-09-20 18:38:51 +08:00
parent 2435a11e85
commit 0188a148b2
8 changed files with 17 additions and 24 deletions

View File

@@ -20,7 +20,7 @@ target 'YuMi' do
pod 'SDWebImageFLPlugin' # 对FLAnimatedImage和SDWebImage的桥接
pod 'AFNetworking'
#文字自动滚动
pod 'MarqueeLabel-ObjC'
pod 'MarqueeLabel'
pod 'YYText'
pod 'Masonry'
#输入

View File

@@ -8,7 +8,7 @@
#import "SVGA.h"
#import "XPRoomTarrowBannerView.h"
#import "XPSVGAPlayer.h"
#import "MarqueeLabel.h"
@interface XPRoomTarrowBannerView()<SVGAPlayerDelegate>
///
@property (strong, nonatomic) SVGAParser *parser;
@@ -38,8 +38,6 @@
[self addSubview:self.bgImageView];
[self addSubview:self.giftImageView];
[self addSubview:self.titleView];
self.titleView.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular];
self.titleView.textColor = [UIColor whiteColor];
self.bgImageView.image = kImage(@"room_tarrow_banner_h5_bg");
self.titleView.fadeLength = 50.0f;
@@ -52,11 +50,11 @@
make.edges.equalTo(self);
}];
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(54.5));
make.leading.mas_equalTo(kGetScaleWidth(28));
make.trailing.mas_equalTo(-kGetScaleWidth(28.5));
make.height.mas_equalTo(kGetScaleWidth(12));
make.centerY.equalTo(self);
}];
self.titleView.backgroundColor = [UIColor redColor];
}
-(void)installUI{
[self addSubview:self.bgImageView];
@@ -75,6 +73,7 @@
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(kGetScaleWidth(54.5));
make.trailing.mas_equalTo(-kGetScaleWidth(29.5));
make.height.mas_equalTo(kGetScaleWidth(12));
make.centerY.equalTo(self);
}];
}
@@ -88,7 +87,7 @@
[self.parser parseWithNamed:@"pi_room_tarrow_h5_banner" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
self.giftImageView.hidden = NO;
self.giftImageView.videoItem = videoItem;
self.giftImageView.loops = 1;
self.giftImageView.loops = 3;
self.giftImageView.clearsAfterStop = NO;
[self.giftImageView startAnimation];
} failureBlock:^(NSError * _Nonnull error) {
@@ -148,10 +147,10 @@
}
- (MarqueeLabel *)titleView{
if(!_titleView){
_titleView = [MarqueeLabel new];
_titleView = [[MarqueeLabel alloc] init];
_titleView.scrollDuration = 5.0;
_titleView.fadeLength = 6.0f;
_titleView.scrollDuration = 6.0;
_titleView.fadeLength = 8.0f;
_titleView.textAlignment = NSTextAlignmentCenter;
}
return _titleView;
}

View File

@@ -14,7 +14,7 @@
///Third
#import <Masonry/Masonry.h>
#import <MarqueeLabel.h>
@interface XPRoomTrumpetView()

View File

@@ -9,7 +9,7 @@
///Third
#import <NIMSDK/NIMSDK.h>
#import <Masonry/Masonry.h>
#import <MarqueeLabel.h>
#import <YYText/YYLabel.h>
#import "TTPopup.h"
#import <FFPopup/FFPopup.h>

View File

@@ -12,7 +12,7 @@
#import "DJDKMIMOMColor.h"
#import "RoomSailingPrizeModel.h"
#import "NSObject+MJExtension.h"
#import <MarqueeLabel.h>
@interface XPSailingAnimationView ()

View File

@@ -233,10 +233,13 @@
CGFloat kscale = (CGFloat)55 / (CGFloat)375;
self.isPlayOfB = YES;
CGFloat top = self.isPlayOfA == YES ? (190 + statusbarHeight) : (kNavigationHeight + 15);
XPRoomTarrowBannerView *tarrowVeiw = [[XPRoomTarrowBannerView alloc]initWithFrame:CGRectMake(KScreenWidth, top, KScreenWidth , KScreenWidth * kscale)isH5:YES];
tarrowVeiw.isBig = attatchment.second == Custom_Message_Sub_Common_H5_Advanced;
tarrowVeiw.giftH5Info = attatchment;
[kWindow addSubview:tarrowVeiw];
POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter];
springAnimation.springSpeed = 12;

View File

@@ -159,17 +159,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showNewUserRecharge) name:kNewUserRechargeKey object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(showAnchorCardKey:) name:kTabShowAnchorCardKey object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(teenagerStatusChange:) name:kTeenagerStatusChange object:nil];
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
//
// dispatch_async(dispatch_get_main_queue(), ^{
// AttachmentModel *attachment = [[AttachmentModel alloc]init];
// attachment.first = 100;
// attachment.second = 1102;
// attachment.data = @{@"content":@"我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机我潮光明村水果老虎机"};
// [self.roomAnimation receiveCommonH5Banner:attachment];
// });
//
// });
}

View File

@@ -50,4 +50,5 @@ isEnterprise = [bundleID isEqualToString:@"com.hflighting.yumi"];\
#import "YUMIConstant.h"
#import "YUMINNNN.h"
#import "NSObject+MJExtension.h"
#import <MarqueeLabel-Swift.h>
#endif /* PrefixHeader_pch */