首页优化
This commit is contained in:
@@ -313,6 +313,7 @@
|
||||
23E9EB252A84E98300B792F2 /* pi_new_mine_info_online.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EB232A84E98300B792F2 /* pi_new_mine_info_online.svga */; };
|
||||
23E9EB312A85E5D100B792F2 /* pi_app_logo_new_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EB302A85E5D100B792F2 /* pi_app_logo_new_bg.png */; };
|
||||
23E9EB332A85E97C00B792F2 /* pi_login_new_logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EB322A85E97B00B792F2 /* pi_login_new_logo.png */; };
|
||||
23FF255B2AB956D50064E904 /* pi_home_new_pk.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23FF255A2AB956D50064E904 /* pi_home_new_pk.svga */; };
|
||||
23FF42632AA5861E0055733C /* XPNewHomePartyCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FF42622AA5861E0055733C /* XPNewHomePartyCollectionViewCell.m */; };
|
||||
23FF42652AA5AC040055733C /* home_heat.gif in Resources */ = {isa = PBXBuildFile; fileRef = 23FF42642AA5AC040055733C /* home_heat.gif */; };
|
||||
23FF42672AA5CFBB0055733C /* home_sound_wave.gif in Resources */ = {isa = PBXBuildFile; fileRef = 23FF42662AA5CFBB0055733C /* home_sound_wave.gif */; };
|
||||
@@ -2005,6 +2006,7 @@
|
||||
23E9EB232A84E98300B792F2 /* pi_new_mine_info_online.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_new_mine_info_online.svga; sourceTree = "<group>"; };
|
||||
23E9EB302A85E5D100B792F2 /* pi_app_logo_new_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pi_app_logo_new_bg.png; sourceTree = "<group>"; };
|
||||
23E9EB322A85E97B00B792F2 /* pi_login_new_logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = pi_login_new_logo.png; sourceTree = "<group>"; };
|
||||
23FF255A2AB956D50064E904 /* pi_home_new_pk.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_home_new_pk.svga; sourceTree = "<group>"; };
|
||||
23FF42612AA5861E0055733C /* XPNewHomePartyCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNewHomePartyCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
23FF42622AA5861E0055733C /* XPNewHomePartyCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNewHomePartyCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
23FF42642AA5AC040055733C /* home_heat.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = home_heat.gif; sourceTree = "<group>"; };
|
||||
@@ -8781,6 +8783,7 @@
|
||||
23FF42642AA5AC040055733C /* home_heat.gif */,
|
||||
23FF42662AA5CFBB0055733C /* home_sound_wave.gif */,
|
||||
23E9EB232A84E98300B792F2 /* pi_new_mine_info_online.svga */,
|
||||
23FF255A2AB956D50064E904 /* pi_home_new_pk.svga */,
|
||||
232C43EB2AB169EB00D4B2ED /* pi_room_tarrow_banner.svga */,
|
||||
23E9EB222A84E98300B792F2 /* pi_new_mine_info_sound_play.svga */,
|
||||
23E9EAA22A84C80300B792F2 /* pi_new_loading.svga */,
|
||||
@@ -10066,6 +10069,7 @@
|
||||
E80EC8A528ACD84100D133C5 /* emoji_40@2x.png in Resources */,
|
||||
E80EC83F28ACD84000D133C5 /* emoji_08@2x.png in Resources */,
|
||||
E80EC84A28ACD84000D133C5 /* emoji_94@2x.png in Resources */,
|
||||
23FF255B2AB956D50064E904 /* pi_home_new_pk.svga in Resources */,
|
||||
E80EC84F28ACD84000D133C5 /* emoji_151@2x.png in Resources */,
|
||||
E80EC88428ACD84000D133C5 /* emoji_01@2x.png in Resources */,
|
||||
E80EC8B628ACD84100D133C5 /* emoji_107@2x.png in Resources */,
|
||||
|
@@ -7,11 +7,13 @@
|
||||
|
||||
#import "XPNewHomePartyCollectionViewCell.h"
|
||||
#import <SDWebImageFLPlugin/SDWebImageFLPlugin.h>
|
||||
#import <SVGA.h>
|
||||
@interface XPNewHomePartyCollectionViewCell()
|
||||
///背景
|
||||
@property(nonatomic,strong) NetImageView *bgImageView;
|
||||
///阴影
|
||||
@property(nonatomic,strong) UIImageView *shadowBgView;
|
||||
|
||||
///榜单
|
||||
@property(nonatomic,strong) UIImageView *rankImageView;
|
||||
///类型
|
||||
@@ -23,6 +25,9 @@
|
||||
@property(nonatomic,strong) UILabel *heatView;
|
||||
///热度波浪
|
||||
@property(nonatomic,strong) FLAnimatedImageView *heatGifView;
|
||||
///pk
|
||||
@property(nonatomic,strong) SVGAParser *parser;
|
||||
@property(nonatomic,strong) SVGAImageView *pkImageView;
|
||||
@end
|
||||
@implementation XPNewHomePartyCollectionViewCell
|
||||
-(instancetype)initWithFrame:(CGRect)frame{
|
||||
@@ -56,9 +61,20 @@
|
||||
[self.bgImageView addSubview:self.shadowBgView];
|
||||
[self.contentView addSubview:self.rankImageView];
|
||||
[self.bgImageView addSubview:self.tagBgImageView];
|
||||
[self.bgImageView addSubview:self.pkImageView];
|
||||
[self.bgImageView addSubview:self.nameView];
|
||||
[self.bgImageView addSubview:self.heatGifView];
|
||||
[self.bgImageView addSubview:self.heatView];
|
||||
|
||||
@kWeakify(self);
|
||||
[self.parser parseWithNamed:@"pi_home_new_pk" inBundle:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
|
||||
@kStrongify(self);
|
||||
self.pkImageView.loops = INT_MAX;
|
||||
self.pkImageView.clearsAfterStop = NO;
|
||||
self.pkImageView.videoItem = videoItem;
|
||||
[self.pkImageView startAnimation];
|
||||
} failureBlock:^(NSError * _Nullable error) {
|
||||
}];
|
||||
}
|
||||
-(void)installConstraints{
|
||||
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
@@ -101,6 +117,12 @@
|
||||
make.height.mas_equalTo(kGetScaleWidth(20));
|
||||
|
||||
}];
|
||||
[self.pkImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(kGetScaleWidth(23));
|
||||
make.height.mas_equalTo(kGetScaleWidth(22));
|
||||
make.trailing.mas_equalTo(-kGetScaleWidth(12));
|
||||
make.bottom.equalTo(self.bgImageView.mas_top).mas_offset(-kGetScaleWidth(30));
|
||||
}];
|
||||
}
|
||||
- (void)setRoomInfo:(HomePlayRoomModel *)roomInfo{
|
||||
_roomInfo = roomInfo;
|
||||
@@ -109,6 +131,7 @@
|
||||
_tagBgImageView.imageUrl = _roomInfo.tagPict;
|
||||
_heatView.text = @(_roomInfo.onlineNum).stringValue;
|
||||
_rankImageView.image = nil;
|
||||
_pkImageView.hidden = !_roomInfo.crossPking;
|
||||
if(_roomInfo.isHourTop1 == YES){
|
||||
_rankImageView.image = kImage(@"home_hour_no_1");
|
||||
}else{
|
||||
@@ -184,5 +207,19 @@
|
||||
}
|
||||
return _shadowBgView;
|
||||
}
|
||||
|
||||
- (SVGAParser *)parser{
|
||||
if(!_parser){
|
||||
_parser = [SVGAParser new];
|
||||
}
|
||||
return _parser;
|
||||
}
|
||||
- (SVGAImageView *)pkImageView {
|
||||
if (_pkImageView == nil) {
|
||||
_pkImageView = [[SVGAImageView alloc]init];
|
||||
_pkImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
_pkImageView.hidden = YES;
|
||||
_pkImageView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _pkImageView;
|
||||
}
|
||||
@end
|
||||
|
@@ -159,17 +159,17 @@ 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];
|
||||
});
|
||||
|
||||
});
|
||||
// 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];
|
||||
// });
|
||||
//
|
||||
// });
|
||||
|
||||
|
||||
}
|
||||
|
BIN
YuMi/Resources/pi_home_new_pk.svga
Normal file
BIN
YuMi/Resources/pi_home_new_pk.svga
Normal file
Binary file not shown.
Reference in New Issue
Block a user