diff --git a/YuMi.xcodeproj/project.pbxproj b/YuMi.xcodeproj/project.pbxproj index 3c9d1188..38b7df63 100644 --- a/YuMi.xcodeproj/project.pbxproj +++ b/YuMi.xcodeproj/project.pbxproj @@ -1009,7 +1009,6 @@ E86A16BF2856D4D5004228B8 /* XPSessionFindNewGreetListView.m in Sources */ = {isa = PBXBuildFile; fileRef = E86A16BE2856D4D5004228B8 /* XPSessionFindNewGreetListView.m */; }; E86A16C22856D635004228B8 /* XPSessionFindNewGreetTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E86A16C12856D635004228B8 /* XPSessionFindNewGreetTableViewCell.m */; }; E86A16C52856DBEC004228B8 /* FindNewGreetListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E86A16C42856DBEC004228B8 /* FindNewGreetListModel.m */; }; - E86A16CE28574844004228B8 /* XPRoomLicneseHourRankView.m in Sources */ = {isa = PBXBuildFile; fileRef = E86A16CD28574844004228B8 /* XPRoomLicneseHourRankView.m */; }; E86E79CD28A4E045006DAF48 /* MessageContentRiskAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = E86E79CC28A4E045006DAF48 /* MessageContentRiskAlertView.m */; }; E86E79D028A4E0B2006DAF48 /* ContentRistAlertModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E86E79CF28A4E0B2006DAF48 /* ContentRistAlertModel.m */; }; E86E79D328A4E94E006DAF48 /* SessionRiskView.m in Sources */ = {isa = PBXBuildFile; fileRef = E86E79D228A4E94E006DAF48 /* SessionRiskView.m */; }; @@ -3267,8 +3266,6 @@ E86A16C12856D635004228B8 /* XPSessionFindNewGreetTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPSessionFindNewGreetTableViewCell.m; sourceTree = ""; }; E86A16C32856DBEC004228B8 /* FindNewGreetListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FindNewGreetListModel.h; sourceTree = ""; }; E86A16C42856DBEC004228B8 /* FindNewGreetListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FindNewGreetListModel.m; sourceTree = ""; }; - E86A16CC28574844004228B8 /* XPRoomLicneseHourRankView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomLicneseHourRankView.h; sourceTree = ""; }; - E86A16CD28574844004228B8 /* XPRoomLicneseHourRankView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomLicneseHourRankView.m; sourceTree = ""; }; E86E79CB28A4E045006DAF48 /* MessageContentRiskAlertView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageContentRiskAlertView.h; sourceTree = ""; }; E86E79CC28A4E045006DAF48 /* MessageContentRiskAlertView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageContentRiskAlertView.m; sourceTree = ""; }; E86E79CE28A4E0B2006DAF48 /* ContentRistAlertModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentRistAlertModel.h; sourceTree = ""; }; @@ -6976,8 +6973,6 @@ 9B6B3AAA278C2EA7005551EC /* XPRoomNobleLevelUpView.m */, 9BC8C82E28090C9200C24F85 /* XPRoomAnchorRankBannerView.h */, 9BC8C82F28090C9200C24F85 /* XPRoomAnchorRankBannerView.m */, - E86A16CC28574844004228B8 /* XPRoomLicneseHourRankView.h */, - E86A16CD28574844004228B8 /* XPRoomLicneseHourRankView.m */, 9B86D8782817DD8400494FCD /* XPRoomEnterHideTipView.h */, 9B86D8792817DD8400494FCD /* XPRoomEnterHideTipView.m */, E8998D7E28597B0300C68558 /* XPRoomLuckyBigPrizeView.h */, @@ -11265,7 +11260,6 @@ E841ED61280FB0BD00904808 /* ContentLevelUpgradeModel.m in Sources */, 236B2E542AA08757003967A8 /* LittleGameScrollStageView.m in Sources */, 189DD74026E21C3F00AB55B1 /* YYUtility+App.m in Sources */, - E86A16CE28574844004228B8 /* XPRoomLicneseHourRankView.m in Sources */, E85E7B182A4EB0D200B6D00A /* ClanDetailInfoModel.m in Sources */, 236B2E452AA07D06003967A8 /* NSData+RW.m in Sources */, 23E9EA352A837BE400B792F2 /* TreasureFailyKeyInfoModel.m in Sources */, @@ -11609,7 +11603,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 10.13.4; + MARKETING_VERSION = 20.00.0; PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -11644,7 +11638,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 10.13.4; + MARKETING_VERSION = 20.00.0; PRODUCT_BUNDLE_IDENTIFIER = com.peko.enterprise.ios; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/YuMi/Assets.xcassets/middle/gift_tag_effect.imageset/gift_tag_effect@2x.png b/YuMi/Assets.xcassets/middle/gift_tag_effect.imageset/gift_tag_effect@2x.png index b29993fd..e58695ee 100644 Binary files a/YuMi/Assets.xcassets/middle/gift_tag_effect.imageset/gift_tag_effect@2x.png and b/YuMi/Assets.xcassets/middle/gift_tag_effect.imageset/gift_tag_effect@2x.png differ diff --git a/YuMi/Assets.xcassets/middle/gift_tag_effect.imageset/gift_tag_effect@3x.png b/YuMi/Assets.xcassets/middle/gift_tag_effect.imageset/gift_tag_effect@3x.png index 230a7361..917df518 100644 Binary files a/YuMi/Assets.xcassets/middle/gift_tag_effect.imageset/gift_tag_effect@3x.png and b/YuMi/Assets.xcassets/middle/gift_tag_effect.imageset/gift_tag_effect@3x.png differ diff --git a/YuMi/Assets.xcassets/middle/gift_tag_exclude.imageset/gift_tag_exclude@2x.png b/YuMi/Assets.xcassets/middle/gift_tag_exclude.imageset/gift_tag_exclude@2x.png index 0a83697e..46edbc6e 100644 Binary files a/YuMi/Assets.xcassets/middle/gift_tag_exclude.imageset/gift_tag_exclude@2x.png and b/YuMi/Assets.xcassets/middle/gift_tag_exclude.imageset/gift_tag_exclude@2x.png differ diff --git a/YuMi/Assets.xcassets/middle/gift_tag_exclude.imageset/gift_tag_exclude@3x.png b/YuMi/Assets.xcassets/middle/gift_tag_exclude.imageset/gift_tag_exclude@3x.png index 5bb6b8e2..f6844369 100644 Binary files a/YuMi/Assets.xcassets/middle/gift_tag_exclude.imageset/gift_tag_exclude@3x.png and b/YuMi/Assets.xcassets/middle/gift_tag_exclude.imageset/gift_tag_exclude@3x.png differ diff --git a/YuMi/Assets.xcassets/middle/gift_tag_latest.imageset/gift_tag_latest@2x.png b/YuMi/Assets.xcassets/middle/gift_tag_latest.imageset/gift_tag_latest@2x.png index 8d24e759..0a630c4a 100644 Binary files a/YuMi/Assets.xcassets/middle/gift_tag_latest.imageset/gift_tag_latest@2x.png and b/YuMi/Assets.xcassets/middle/gift_tag_latest.imageset/gift_tag_latest@2x.png differ diff --git a/YuMi/Assets.xcassets/middle/gift_tag_latest.imageset/gift_tag_latest@3x.png b/YuMi/Assets.xcassets/middle/gift_tag_latest.imageset/gift_tag_latest@3x.png index a47bb4ac..0a2e6fda 100644 Binary files a/YuMi/Assets.xcassets/middle/gift_tag_latest.imageset/gift_tag_latest@3x.png and b/YuMi/Assets.xcassets/middle/gift_tag_latest.imageset/gift_tag_latest@3x.png differ diff --git a/YuMi/Assets.xcassets/middle/gift_tag_time_limit.imageset/gift_tag_time_limit@2x.png b/YuMi/Assets.xcassets/middle/gift_tag_time_limit.imageset/gift_tag_time_limit@2x.png index 21a341e0..4af08fbb 100644 Binary files a/YuMi/Assets.xcassets/middle/gift_tag_time_limit.imageset/gift_tag_time_limit@2x.png and b/YuMi/Assets.xcassets/middle/gift_tag_time_limit.imageset/gift_tag_time_limit@2x.png differ diff --git a/YuMi/Assets.xcassets/middle/gift_tag_time_limit.imageset/gift_tag_time_limit@3x.png b/YuMi/Assets.xcassets/middle/gift_tag_time_limit.imageset/gift_tag_time_limit@3x.png index 792e138e..2805d0b7 100644 Binary files a/YuMi/Assets.xcassets/middle/gift_tag_time_limit.imageset/gift_tag_time_limit@3x.png and b/YuMi/Assets.xcassets/middle/gift_tag_time_limit.imageset/gift_tag_time_limit@3x.png differ diff --git a/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_bg.imageset/anchor_hour_rank_bg@2x.png b/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_bg.imageset/anchor_hour_rank_bg@2x.png index 69d90178..dbc580be 100644 Binary files a/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_bg.imageset/anchor_hour_rank_bg@2x.png and b/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_bg.imageset/anchor_hour_rank_bg@2x.png differ diff --git a/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_bg.imageset/anchor_hour_rank_bg@3x.png b/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_bg.imageset/anchor_hour_rank_bg@3x.png index 9f84ecb2..d84d3cb2 100644 Binary files a/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_bg.imageset/anchor_hour_rank_bg@3x.png and b/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_bg.imageset/anchor_hour_rank_bg@3x.png differ diff --git a/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_icon.imageset/anchor_hour_rank_icon@2x.png b/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_icon.imageset/anchor_hour_rank_icon@2x.png index 1d816c66..ef003b12 100644 Binary files a/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_icon.imageset/anchor_hour_rank_icon@2x.png and b/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_icon.imageset/anchor_hour_rank_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_icon.imageset/anchor_hour_rank_icon@3x.png b/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_icon.imageset/anchor_hour_rank_icon@3x.png index c9483d89..8ae90d9d 100644 Binary files a/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_icon.imageset/anchor_hour_rank_icon@3x.png and b/YuMi/Assets.xcassets/yna/Anchor/anchor_hour_rank_icon.imageset/anchor_hour_rank_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/yna/room_licnese_hour_rank_bg.imageset/Contents.json b/YuMi/Assets.xcassets/yna/room_licnese_hour_rank_bg.imageset/Contents.json deleted file mode 100644 index 6d5ba252..00000000 --- a/YuMi/Assets.xcassets/yna/room_licnese_hour_rank_bg.imageset/Contents.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, - { - "filename" : "room_licnese_hour_rank_bg@2x.png", - "idiom" : "universal", - "scale" : "2x" - }, - { - "filename" : "room_licnese_hour_rank_bg@3x.png", - "idiom" : "universal", - "scale" : "3x" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/YuMi/Assets.xcassets/yna/room_licnese_hour_rank_bg.imageset/room_licnese_hour_rank_bg@2x.png b/YuMi/Assets.xcassets/yna/room_licnese_hour_rank_bg.imageset/room_licnese_hour_rank_bg@2x.png deleted file mode 100644 index b10102d1..00000000 Binary files a/YuMi/Assets.xcassets/yna/room_licnese_hour_rank_bg.imageset/room_licnese_hour_rank_bg@2x.png and /dev/null differ diff --git a/YuMi/Assets.xcassets/yna/room_licnese_hour_rank_bg.imageset/room_licnese_hour_rank_bg@3x.png b/YuMi/Assets.xcassets/yna/room_licnese_hour_rank_bg.imageset/room_licnese_hour_rank_bg@3x.png deleted file mode 100644 index f6c5ea79..00000000 Binary files a/YuMi/Assets.xcassets/yna/room_licnese_hour_rank_bg.imageset/room_licnese_hour_rank_bg@3x.png and /dev/null differ diff --git a/YuMi/Modules/YMMine/View/Recharge/XPIAPRechargeViewController.m b/YuMi/Modules/YMMine/View/Recharge/XPIAPRechargeViewController.m index fa6fc5b0..76156ac1 100644 --- a/YuMi/Modules/YMMine/View/Recharge/XPIAPRechargeViewController.m +++ b/YuMi/Modules/YMMine/View/Recharge/XPIAPRechargeViewController.m @@ -471,13 +471,14 @@ } XPIAPRechargeCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(XPIAPRechargeCollectionViewCell.self) forIndexPath:indexPath]; - cell.rechargeModel = [self.dataSource safeObjectAtIndex1:indexPath.item - 1]; + NSInteger count = self.bannerList.count > 0 ? indexPath.item - 1 : indexPath.item; + cell.rechargeModel = [self.dataSource safeObjectAtIndex1:count]; cell.selectedStyle = self.selectedIndex == indexPath.item; return cell; } - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { - if(indexPath.row == 0)return; + if(indexPath.row == 0 && self.bannerList.count > 0)return; self.selectedIndex = indexPath.item; [collectionView reloadData]; } diff --git a/YuMi/Modules/YMMine/View/SubViews/XPMineHeadView.m b/YuMi/Modules/YMMine/View/SubViews/XPMineHeadView.m index ad776ea0..cc244395 100644 --- a/YuMi/Modules/YMMine/View/SubViews/XPMineHeadView.m +++ b/YuMi/Modules/YMMine/View/SubViews/XPMineHeadView.m @@ -115,7 +115,7 @@ [self.idStackView mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.nobleImageView); make.top.mas_equalTo(self.nameStackView.mas_bottom).offset(13); - make.height.mas_equalTo(16); + make.height.mas_equalTo(18); }]; [self.starVeiw mas_makeConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(46); diff --git a/YuMi/Modules/YMNewHome/View/PIHoemCategoryTitleView.h b/YuMi/Modules/YMNewHome/View/PIHoemCategoryTitleView.h index 378207bd..b6cfe34d 100644 --- a/YuMi/Modules/YMNewHome/View/PIHoemCategoryTitleView.h +++ b/YuMi/Modules/YMNewHome/View/PIHoemCategoryTitleView.h @@ -10,10 +10,11 @@ NS_ASSUME_NONNULL_BEGIN - +typedef void(^ScrolledHandle)(NSInteger type); @interface PIHoemCategoryTitleView : JXCategoryTitleView -@property(nonatomic,assign) int index; +@property(nonatomic,assign) NSInteger index; +@property(nonatomic,copy) ScrolledHandle scrolledHandle; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMNewHome/View/PIHoemCategoryTitleView.m b/YuMi/Modules/YMNewHome/View/PIHoemCategoryTitleView.m index 12455c07..3d0130ce 100644 --- a/YuMi/Modules/YMNewHome/View/PIHoemCategoryTitleView.m +++ b/YuMi/Modules/YMNewHome/View/PIHoemCategoryTitleView.m @@ -56,8 +56,9 @@ self.fristBnt.selected = sender == self.fristBnt; self.secondBnt.selected = sender != self.fristBnt; if(self.fristBnt == sender){ - if(self.delegate && [self.delegate respondsToSelector:@selector(categoryView:didSelectedItemAtIndex:)]){ - [self.delegate categoryView:self didSelectedItemAtIndex:0]; + + if(self.scrolledHandle){ + self.scrolledHandle(0); } [self.lineImage mas_remakeConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(kGetScaleWidth(36)); @@ -67,8 +68,9 @@ }]; return; } - if(self.delegate && [self.delegate respondsToSelector:@selector(categoryView:didSelectedItemAtIndex:)]){ - [self.delegate categoryView:self didSelectedItemAtIndex:1]; + + if(self.scrolledHandle){ + self.scrolledHandle(1); } [self.lineImage mas_remakeConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(kGetScaleWidth(36)); @@ -78,7 +80,7 @@ }]; } -- (void)setIndex:(int)index{ +- (void)setIndex:(NSInteger)index{ _index = index; self.fristBnt.titleLabel.font = _index == 0 ? kFontSemibold(16):kFontRegular(14); self.secondBnt.titleLabel.font = _index == 1 ? kFontSemibold(16):kFontRegular(14); diff --git a/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.h b/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.h index c8928a5d..aff9a8dd 100644 --- a/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.h +++ b/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.h @@ -9,8 +9,15 @@ #import NS_ASSUME_NONNULL_BEGIN +@protocol XPHomeRecommendViewControllerDelegate + +-(void)openRoom; + +@end + @interface XPHomeRecommendViewController : MvpViewController @property (nonatomic, copy) void(^scrollCallback)(UIScrollView *scrollView); +@property(nonatomic,weak) iddelegate; @property(nonatomic,copy) HeaderRefreshComplete refreshComplete; - (void)headerRefresh; @end diff --git a/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.m b/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.m index c40fb854..e966ffeb 100644 --- a/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.m +++ b/YuMi/Modules/YMNewHome/View/XPHomeRecommendViewController.m @@ -306,6 +306,9 @@ UIKIT_EXTERN NSString * const kShieldingNotification; // gameView.playGameList = self.littleGameArray; // gameView.delegate = self; // [kWindow addSubview:gameView]; + if(self.delegate && [self.delegate respondsToSelector:@selector(openRoom)]){ + [self.delegate openRoom]; + } } #pragma mark - XPHomeGameViewDelegate - (void)xpHomeGameViewChooseGameWithGameModel:(LittleGameInfoModel *)gameModel{ diff --git a/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m b/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m index 93ef8d04..1c57000a 100644 --- a/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m +++ b/YuMi/Modules/YMNewHome/View/XPNewHomeViewController.m @@ -52,7 +52,7 @@ UIKIT_EXTERN NSString * kHomeMoreScrollPageKey; UIKIT_EXTERN NSString * const kOpenRoomNotification; -@interface XPNewHomeViewController () +@interface XPNewHomeViewController () { NSTimer * timer; } @@ -173,6 +173,15 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification; [self.pagingView.mainTableView.mj_header endRefreshing]; } }; + self.titleView.scrolledHandle = ^(NSInteger type) { + @kStrongify(self); + [self.titleView.listContainer didClickSelectedItemAtIndex:type]; + [UIView animateWithDuration:0.3 animations:^{ + self.pagingView.listContainerView.scrollView.contentOffset = CGPointMake(type * KScreenWidth, 0); + } ]; + }; + + } -(void)headerRefresh{ if(self.type == 0){ @@ -271,7 +280,11 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification; searchVC.modalPresentationStyle = UIModalPresentationFullScreen; [self.navigationController presentViewController:searchVC animated:YES completion:nil]; } - +#pragma mark - XPHomeRecommendViewControllerDelegate +-(void)openRoom{ + NSString* roomUid = [AccountInfoStorage instance].getUid; + [self opRoom:roomUid]; +} #pragma mark - JXCategoryViewDelegate - (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView { if(self.headView.bannerList.count == 0)return kGetScaleWidth(80); @@ -353,13 +366,13 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification; - (void)homeChatPickFail:(NSString *)msg { } + - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index{ self.type = index; - self.titleView.index = (int)index; - self.titleView.defaultSelectedIndex = index; - [self.titleView reloadData]; + self.titleView.index = index; } + #pragma mark - XPNewHomeHeadViewDelegate ///选择 -(void)selectItemWithModel:(PIHomeItemModel *)model{ @@ -418,6 +431,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification; [XPRoomViewController openRoom:model.uid fromNick:nil fromType:UserEnterRoomFromType_Home_Recommend fromUid:nil viewController:self]; } } + #pragma mark - Getters And Setters - (PIHoemCategoryTitleView *)titleView { if (!_titleView) { @@ -511,6 +525,7 @@ UIKIT_EXTERN NSString * const kOpenRoomNotification; - (XPHomeRecommendViewController *)recommendVC{ if(!_recommendVC){ _recommendVC = [[XPHomeRecommendViewController alloc] init]; + _recommendVC.delegate = self; } return _recommendVC; } diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnchorRankBannerView.h b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnchorRankBannerView.h index 02ff17a9..a4abe954 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnchorRankBannerView.h +++ b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnchorRankBannerView.h @@ -6,11 +6,18 @@ // 个播小时榜飘屏 #import - +#import "RoomHalfHourRankModel.h" NS_ASSUME_NONNULL_BEGIN +@class XPRoomAnchorRankBannerView; +@protocol XPRoomAnchorRankBannerViewDelegate + +- (void)xPRoomAnchorRankBannerView:(XPRoomAnchorRankBannerView *)view rankInfo:(RoomHalfHourRankModel *)rankInfo; + +@end + @class RoomHalfHourRankModel; @interface XPRoomAnchorRankBannerView : UIView - +@property(nonatomic,weak) iddelegate; ///个播小时榜信息 @property (nonatomic,copy) RoomHalfHourRankModel * anchorRankInfo; @end diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnchorRankBannerView.m b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnchorRankBannerView.m index af126faf..6c2fcbbd 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnchorRankBannerView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnchorRankBannerView.m @@ -20,19 +20,10 @@ ///背景 @property (nonatomic,strong) UIImageView *bgImageView; -///icon -@property (nonatomic,strong) UIImageView *iconImageView; -///头像 -@property (nonatomic,strong) NetImageView *avatImageView; ///恭喜 @property (nonatomic,strong) UILabel *titleLabel; -///昵称 -@property (nonatomic,strong) UILabel *nickLabel; -///描述 -@property (nonatomic, strong) UILabel *descLabel; -///排行 -@property (nonatomic, strong) UILabel *rankLabel; - +///围观 +@property(nonatomic,strong) UIButton *lookUpBtn; @end @implementation XPRoomAnchorRankBannerView @@ -52,59 +43,45 @@ #pragma mark - Private Method - (void)initSubViews { [self addSubview:self.bgImageView]; - [self addSubview:self.iconImageView]; - [self addSubview:self.titleLabel]; - [self addSubview:self.avatImageView]; - [self addSubview:self.nickLabel]; - [self addSubview:self.descLabel]; - [self addSubview:self.rankLabel]; + [self.bgImageView addSubview:self.titleLabel]; + [self.bgImageView addSubview:self.lookUpBtn]; } - (void)initSubViewConstraints { [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.centerX.centerY.mas_equalTo(self); - make.width.mas_equalTo(360); - make.height.mas_equalTo(50); + make.edges.equalTo(self); }]; - [self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.bgImageView).mas_offset(-14); - make.centerY.mas_equalTo(self); - make.width.mas_equalTo(61); - make.height.mas_equalTo(60); + [self.lookUpBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.trailing.mas_equalTo(-kGetScaleWidth(12)); + make.width.mas_equalTo(kGetScaleWidth(60)); + make.height.mas_equalTo(kGetScaleWidth(28)); + make.centerY.equalTo(self.bgImageView); }]; + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.iconImageView.mas_right).mas_offset(3); - make.centerY.mas_equalTo(self.bgImageView).mas_offset(2); - }]; - [self.avatImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.titleLabel.mas_right).mas_offset(3); - make.centerY.mas_equalTo(self.titleLabel); - make.width.height.mas_equalTo(22); - }]; - [self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.avatImageView.mas_right).mas_offset(3); - make.centerY.mas_equalTo(self.titleLabel); - }]; - [self.descLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.nickLabel.mas_right).mas_offset(3); - make.centerY.mas_equalTo(self.titleLabel); - }]; - [self.rankLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self.descLabel.mas_right); - make.centerY.mas_equalTo(self.titleLabel); + make.leading.mas_equalTo(kGetScaleWidth(65)); + make.trailing.equalTo(self.lookUpBtn.mas_leading).mas_offset(-kGetScaleWidth(7)); + make.centerY.equalTo(self.bgImageView); }]; } - (void)setAnchorRankInfo:(RoomHalfHourRankModel *)anchorRankInfo { _anchorRankInfo = anchorRankInfo; if (anchorRankInfo) { - self.avatImageView.imageUrl = _anchorRankInfo.avatar; NSString *nick = _anchorRankInfo.nick; - if(nick.length > 4) { - nick = [NSString stringWithFormat:@"%@…", [nick substringToIndex:4]]; + if(nick.length > 5) { + nick = [NSString stringWithFormat:@"%@…", [nick substringToIndex:5]]; } - self.nickLabel.text = nick; - self.descLabel.text = _anchorRankInfo.desc; + NSString *title = [NSString stringWithFormat:YMLocalizedString(@"XPRoomAnchorRankBannerView0"),nick]; + NSMutableAttributedString *titleAtt = [[NSMutableAttributedString alloc]initWithString:title attributes:@{NSFontAttributeName:kFontMedium(12),NSForegroundColorAttributeName:[UIColor whiteColor]}]; + [titleAtt addAttributes:@{NSFontAttributeName:kFontMedium(12),NSForegroundColorAttributeName:UIColorFromRGB(0xF4FF48)} range:[title rangeOfString:nick]]; + [titleAtt addAttributes:@{NSFontAttributeName:kFontMedium(12),NSForegroundColorAttributeName:UIColorFromRGB(0xF4FF48)} range:[title rangeOfString:YMLocalizedString(@"XPRoomAnchorRankBannerView1")]]; + _titleLabel.attributedText = titleAtt; + } +} +-(void)lookUpAction{ + if(self.delegate && [self.delegate respondsToSelector:@selector(xPRoomAnchorRankBannerView:rankInfo:)]){ + [self.delegate xPRoomAnchorRankBannerView:self rankInfo:self.anchorRankInfo]; } } #pragma mark - Getters And Setters @@ -116,65 +93,24 @@ return _bgImageView; } -- (UIImageView *)iconImageView { - if (!_iconImageView) { - _iconImageView = [[UIImageView alloc] init]; - _iconImageView.image = [UIImage imageNamed:@"anchor_hour_rank_icon"]; - } - return _iconImageView; -} + - (UILabel *)titleLabel { if (!_titleLabel) { UILabel *label = [[UILabel alloc] init]; - label.font = [UIFont systemFontOfSize:13 weight:UIFontWeightBold]; - label.textColor = [UIColor whiteColor]; - label.text = YMLocalizedString(@"XPRoomAnchorRankBannerView0"); + _titleLabel = label; } return _titleLabel; } -- (NetImageView *)avatImageView { - if (!_avatImageView) { - NetImageConfig * config = [[NetImageConfig alloc]init]; - config.imageType = ImageTypeUserIcon; - _avatImageView = [[NetImageView alloc] initWithConfig:config]; - _avatImageView.layer.masksToBounds = YES; - _avatImageView.layer.cornerRadius = 11; - } - return _avatImageView; -} -- (UILabel *)nickLabel { - if (!_nickLabel) { - UILabel *label = [[UILabel alloc] init]; - label.font = [UIFont systemFontOfSize:13 weight:UIFontWeightBold]; - label.textColor = UIColorFromRGB(0xFFFC2C); - _nickLabel = label; +- (UIButton *)lookUpBtn{ + if(!_lookUpBtn){ + _lookUpBtn = [UIButton new]; + [_lookUpBtn setBackgroundImage:kImage(@"anchor_hour_rank_icon") forState:UIControlStateNormal]; + [_lookUpBtn addTarget:self action:@selector(lookUpAction) forControlEvents:UIControlEventTouchUpInside]; } - return _nickLabel; + return _lookUpBtn; } - -- (UILabel *)descLabel { - if (!_descLabel) { - UILabel *label = [[UILabel alloc] init]; - label.font = [UIFont systemFontOfSize:13 weight:UIFontWeightHeavy]; - label.textColor = [UIColor whiteColor]; - _descLabel = label; - } - return _descLabel; -} - -- (UILabel *)rankLabel { - if (!_rankLabel) { - UILabel *label = [[UILabel alloc] init]; - label.font = [UIFont systemFontOfSize:13 weight:UIFontWeightHeavy]; - label.textColor = UIColorFromRGB(0xFFFC2C); - label.text = @"TOP1"; - _rankLabel = label; - } - return _rankLabel; -} - @end diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m index b2c57042..a049a2f1 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationView.m @@ -52,7 +52,6 @@ #import "XPRoomViewController.h" #import "XPRoomAnchorRankBannerView.h" #import "XPRoomEnterHideTipView.h" -#import "XPRoomLicneseHourRankView.h" #import "XPRoomLuckyBigPrizeView.h" #import "XPRoomGiftCompoundView.h" #import "XPSailingAnimationView.h" @@ -63,7 +62,7 @@ #import "PIFullScreenBannerAnimation.h" #import "XPTreasureFairyGiftView.h" #import "XPRoomTarrowBannerView.h" -@interface XPRoomAnimationView () +@interface XPRoomAnimationView () ///展示的不同层级 ///最底层的 @property (nonatomic,strong) XPRoomAnimationHitView * lowLevelView; @@ -180,6 +179,9 @@ self.delegate = delegate; [self initSubViews]; [self initSubViewConstraints]; + + + } return self; } @@ -340,7 +342,7 @@ } else if (attachment.first == CustomMessageType_Anchor_Hour_Rank && attachment.second == Custom_Message_Sub_Anchor_Hour_Rank) {///个播小时榜 [self receiveAnchorHourRank:attachment]; } else if (attachment.first == CustomMessageType_Licnese_Hour_Rank && attachment.second == Custom_Message_Sub_Licnese_Hour_Rank) {///牌照房小时榜 - [self receiveLicneseHourRank:attachment]; + [self receiveAnchorHourRank:attachment]; } else if (attachment.first == CustomMessageType_Gift_Compound && attachment.second == Custom_Message_Sub_Gift_Compound) {///魔法小屋合成礼物 [self receiveGiftCompound:attachment]; } else if(attachment.first == CustomMessageType_Room_Sailing && (attachment.second == Custom_Message_Sub_Sailing_AllRoom_Notify || attachment.second == Custom_Message_Sub_Sailing_InRoom_NeedAllMicSend)) { @@ -1190,57 +1192,8 @@ [compoundGiftView pop_addAnimation:springAnimation forKey:@"compoundGiftSpingOutAnimation"]; } -#pragma mark - 牌照房小时榜飘屏 -- (void)receiveLicneseHourRank:(AttachmentModel *)attachment { - PIBaseAnimationViewModel *licneseModel =[PIBaseAnimationViewModel new]; - licneseModel.data = attachment.data; - licneseModel.type = GiftBannerType_AnchorHour; - if(self.animationListB.count == 0 && self.isPlayOfB == NO){ - [self createLicneseHourRankAnimation:licneseModel]; - } - [self.animationListB addObject:licneseModel]; -} -- (void)createLicneseHourRankAnimation:(PIBaseAnimationViewModel *)attachment { - self.isPlayOfB = YES; - CGFloat top = self.isPlayOfA == YES ? (190 + statusbarHeight) : (kNavigationHeight + 15); - XPRoomLicneseHourRankView *anchorRankView = [[XPRoomLicneseHourRankView alloc] initWithFrame:CGRectMake(KScreenWidth, top, 375, 60)]; - anchorRankView.delegate = self; - anchorRankView.licneseRankInfo = [RoomHalfHourRankModel modelWithDictionary:attachment.data]; - [self.highLevleView addSubview:anchorRankView]; - POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter]; - springAnimation.springSpeed = 12; - springAnimation.springBounciness = 10.f; - springAnimation.fromValue = [NSValue valueWithCGPoint:anchorRankView.center]; - springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(KScreenWidth / 2, anchorRankView.center.y)]; - [springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) { - if (finished) { - POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter]; - moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(KScreenWidth / 2, anchorRankView.center.y)]; - moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth, anchorRankView.center.y)]; - moveAnimation.beginTime = CACurrentMediaTime() + 3; - moveAnimation.duration = 0.5; - moveAnimation.repeatCount = 1; - moveAnimation.removedOnCompletion = YES; - [moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) { - [anchorRankView removeFromSuperview]; - self.isPlayOfB = NO; - - if(self.animationListB.count > 0){ - [self.animationListB removeObjectAtIndex:0]; - } - // if(self.isAnimationListAFinish == YES){ - // self.isAnimationListAFinish = NO; - // [self playAnimationWithModel]; - // return; - // } - [self playAnimationWithModel]; - }]; - [anchorRankView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"]; - } - }]; - [anchorRankView pop_addAnimation:springAnimation forKey:@"nobleLevelUpspingOutAnimation"]; -} -- (void)xPRoomLicneseHourRankView:(XPRoomLicneseHourRankView *)view rankInfo:(RoomHalfHourRankModel *)rankInfo { +#pragma mark - XPRoomAnchorRankBannerViewDelegate +- (void)xPRoomAnchorRankBannerView:(XPRoomAnchorRankBannerView *)view rankInfo:(RoomHalfHourRankModel *)rankInfo{ if (rankInfo.uid.integerValue > 0 && self.delegate.getRoomInfo.uid != rankInfo.uid.integerValue) { [self.delegate exitRoom]; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ @@ -1248,8 +1201,7 @@ }); } } - -#pragma mark - 个播小时榜飘屏 +#pragma mark - 个播小时榜飘屏或牌照房小时榜飘屏 - (void)receiveAnchorHourRank:(AttachmentModel *)attachment { PIBaseAnimationViewModel *anchorModel =[PIBaseAnimationViewModel new]; anchorModel.data = attachment.data; @@ -1262,8 +1214,9 @@ - (void)createAnchorHourRankAnimation:(PIBaseAnimationViewModel *)attachment { self.isPlayOfB = YES; CGFloat top = self.isPlayOfA == YES ? (190 + statusbarHeight) : (kNavigationHeight + 15); - XPRoomAnchorRankBannerView *anchorRankView = [[XPRoomAnchorRankBannerView alloc] initWithFrame:CGRectMake(KScreenWidth,top, KScreenWidth, 60)]; + XPRoomAnchorRankBannerView *anchorRankView = [[XPRoomAnchorRankBannerView alloc] initWithFrame:CGRectMake(KScreenWidth,top, KScreenWidth, kGetScaleWidth(55))]; anchorRankView.anchorRankInfo = [RoomHalfHourRankModel modelWithDictionary:attachment.data]; + anchorRankView.delegate = self; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gotoTopRankAnchorRoom:)]; [anchorRankView addGestureRecognizer:tap]; [self.highLevleView addSubview:anchorRankView]; @@ -1666,7 +1619,7 @@ }else if(model.type == GiftBannerType_AnchorHour){ [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_LicneseHour){ - [self createLicneseHourRankAnimation:model]; + [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_Fairy){ [self createTreasureFairyBannerAnimation:model]; }else if(model.type == GiftBannerType_Tarrow){ @@ -1700,7 +1653,7 @@ }else if(model.type == GiftBannerType_AnchorHour){ [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_LicneseHour){ - [self createLicneseHourRankAnimation:model]; + [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_Fairy){ [self createTreasureFairyBannerAnimation:model]; }else if(model.type == GiftBannerType_Tarrow){ diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomLicneseHourRankView.h b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomLicneseHourRankView.h deleted file mode 100644 index 0370189e..00000000 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomLicneseHourRankView.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// YMRoomLicneseHourRankView.h -// YUMI -// -// Created by YUMI on 2022/6/13. -// - -#import - -NS_ASSUME_NONNULL_BEGIN -@class RoomHalfHourRankModel, XPRoomLicneseHourRankView; -@protocol XPRoomLicneseHourRankViewDelegate - -- (void)xPRoomLicneseHourRankView:(XPRoomLicneseHourRankView *)view rankInfo:(RoomHalfHourRankModel *)rankInfo; - -@end -@interface XPRoomLicneseHourRankView : UIView -///牌照房小时榜信息 -@property (nonatomic,copy) RoomHalfHourRankModel * licneseRankInfo; -///代理 -@property (nonatomic,weak) id delegate; -@end - -NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomLicneseHourRankView.m b/YuMi/Modules/YMRoom/View/AnimationView/XPRoomLicneseHourRankView.m deleted file mode 100644 index 7f1d87c8..00000000 --- a/YuMi/Modules/YMRoom/View/AnimationView/XPRoomLicneseHourRankView.m +++ /dev/null @@ -1,132 +0,0 @@ -// -// YMRoomLicneseHourRankView.m -// YUMI -// -// Created by YUMI on 2022/6/13. -// - -#import "XPRoomLicneseHourRankView.h" -///Third -#import -///Tool -#import "DJDKMIMOMColor.h" -#import "UIImage+Utils.h" -///Model -#import "RoomHalfHourRankModel.h" - -@interface XPRoomLicneseHourRankView () - -///背景 -@property (nonatomic,strong) UIImageView *backImageView; -///标题 -@property (nonatomic,strong) UILabel *titleLabel; -///围观 -@property (nonatomic,strong) UIButton *enterButton; - -@end - -@implementation XPRoomLicneseHourRankView - -- (instancetype)initWithFrame:(CGRect)frame { - self = [super initWithFrame:frame]; - if (self) { - [self initSubViews]; - [self initSubViewConstraints]; - } - return self; -} - -#pragma mark - Private Method -- (void)initSubViews { - [self addSubview:self.backImageView]; - [self addSubview:self.titleLabel]; - [self addSubview:self.enterButton]; -} - -- (void)initSubViewConstraints { - [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.mas_equalTo(self); - }]; - - [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(self).offset(64); - make.right.mas_equalTo(self.enterButton.mas_left).offset(-5); - make.centerY.mas_equalTo(self); - }]; - - [self.enterButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.size.mas_equalTo(CGSizeMake(44, 20)); - make.centerY.mas_equalTo(self); - make.right.mas_equalTo(self).offset(-6); - }]; -} - -#pragma mark - Event Response -- (void)backTapRecognizer { - if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomLicneseHourRankView:rankInfo:)]) { - [self.delegate xPRoomLicneseHourRankView:self rankInfo:self.licneseRankInfo]; - } -} - -#pragma mark - Getters And Setters -- (void)setLicneseRankInfo:(RoomHalfHourRankModel *)licneseRankInfo { - _licneseRankInfo = licneseRankInfo; - if (_licneseRankInfo) { - NSString *nick = _licneseRankInfo.title; - if(nick.length > 6) { - nick = [NSString stringWithFormat:@"%@", [nick substringToIndex:6]]; - } - NSDictionary * dic = @{NSFontAttributeName:[UIFont systemFontOfSize:12], NSForegroundColorAttributeName:[UIColor whiteColor]}; - NSDictionary * hightDic = @{NSFontAttributeName:[UIFont systemFontOfSize:12], NSForegroundColorAttributeName:[DJDKMIMOMColor appMainColor]}; - NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init]; - [attribute appendAttributedString:[[NSMutableAttributedString alloc] initWithString:YMLocalizedString(@"XPRoomLicneseHourRankView0") attributes:dic]]; - if (nick.length > 0) { - [attribute appendAttributedString:[[NSMutableAttributedString alloc] initWithString:nick attributes:hightDic]]; - } - - if (licneseRankInfo.desc.length > 0) { - [attribute appendAttributedString:[[NSMutableAttributedString alloc] initWithString:licneseRankInfo.desc attributes:dic]]; - } - [attribute appendAttributedString:[[NSMutableAttributedString alloc] initWithString:@"TOP1" attributes:hightDic]]; - self.titleLabel.attributedText = attribute; - self.titleLabel.textAlignment = NSTextAlignmentCenter; - } -} - -- (UIImageView *)backImageView { - if (!_backImageView) { - _backImageView = [[UIImageView alloc] init]; - _backImageView.userInteractionEnabled = YES; - _backImageView.image = [UIImage imageNamed:@"room_licnese_hour_rank_bg"]; - UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(backTapRecognizer)]; - [_backImageView addGestureRecognizer:tap]; - } - return _backImageView; -} - -- (UILabel *)titleLabel { - if (!_titleLabel) { - _titleLabel = [[UILabel alloc] init]; - _titleLabel.numberOfLines = 2; - } - return _titleLabel; -} - -- (UIButton *)enterButton { - if (!_enterButton) { - _enterButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [_enterButton setTitle:YMLocalizedString(@"XPRoomLicneseHourRankView1") forState:UIControlStateNormal]; - [_enterButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; - _enterButton.titleLabel.font = [UIFont systemFontOfSize:10]; - [_enterButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xd93d5f), UIColorFromRGB(0xfff494)] gradientType:GradientTypeTopToBottom imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal]; - _enterButton.layer.masksToBounds = YES; - _enterButton.layer.cornerRadius = 10; - _enterButton.layer.borderColor = [UIColor whiteColor].CGColor; - _enterButton.layer.borderWidth = 0.5; - _enterButton.userInteractionEnabled = NO; - } - return _enterButton; -} - - -@end diff --git a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeConfirmBuyNumView.m b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeConfirmBuyNumView.m index bd86f9d9..c6a7871e 100644 --- a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeConfirmBuyNumView.m +++ b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeConfirmBuyNumView.m @@ -39,17 +39,18 @@ [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.equalTo(self); }]; + [self.subtractBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(kGetScaleWidth(40)); - make.height.mas_equalTo(kGetScaleWidth(21)); - make.centerY.equalTo(self.bgView); - make.leading.mas_equalTo(kGetScaleWidth(5)); + make.height.mas_equalTo(21); + make.top.mas_equalTo(1.2); + make.leading.mas_equalTo(kGetScaleWidth(6)); }]; [self.addBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.width.mas_equalTo(kGetScaleWidth(40)); - make.height.mas_equalTo(kGetScaleWidth(21)); - make.centerY.equalTo(self.bgView); - make.trailing.mas_equalTo(-kGetScaleWidth(5)); + make.height.mas_equalTo(21); + make.centerY.equalTo(self.subtractBtn); + make.trailing.mas_equalTo(-kGetScaleWidth(6)); }]; [self.textFiled mas_makeConstraints:^(MASConstraintMaker *make) { @@ -125,7 +126,7 @@ -(void)subtractAction{ NSInteger num = self.textFiled.text.integerValue - 10; if(num < 0){ - self.textFiled.text = @"0"; + self.textFiled.text = @"1"; if(self.delegate && [self.delegate respondsToSelector:@selector(inputLoveNum:)]){ [self.delegate inputLoveNum:self.textFiled.text]; } @@ -146,6 +147,7 @@ _bgView = [UIImageView new]; _bgView.image = kImage(@"room_candy_tree_confirm_buy_num_bg"); _bgView.userInteractionEnabled = YES; + _bgView.contentMode = UIViewContentModeScaleAspectFill; } return _bgView; } diff --git a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeConfirmBuyView.m b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeConfirmBuyView.m index 13e9d845..fb9ab74b 100644 --- a/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeConfirmBuyView.m +++ b/YuMi/Modules/YMRoom/View/CandyTree/View/XPCandyTreeConfirmBuyView.m @@ -200,8 +200,8 @@ }]; [self.inputNumView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.equalTo(self.numView.mas_bottom).mas_offset(kGetScaleWidth(5)); - make.height.mas_equalTo(kGetScaleWidth(33)); - make.width.mas_equalTo(kGetScaleWidth(154)); + make.height.mas_equalTo(25); + make.width.mas_equalTo(kGetScaleWidth(146)); make.centerX.equalTo(self.bgImageView); }]; [self.buyBtn mas_makeConstraints:^(MASConstraintMaker *make) { diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/Cell/XPGiftItemCollectionViewCell.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/Cell/XPGiftItemCollectionViewCell.m index 49e69a0d..f4e84756 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/Cell/XPGiftItemCollectionViewCell.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/Cell/XPGiftItemCollectionViewCell.m @@ -81,24 +81,24 @@ - (void)initSubViewConstraints { [self.tagStackView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.top.mas_equalTo(self.contentView).inset(3); - make.height.mas_equalTo(18); + make.right.top.mas_equalTo(self.contentView).inset(3); + make.height.mas_equalTo(14); }]; [self.giftNewImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(28); - make.height.mas_equalTo(18); + make.width.mas_equalTo(14); + make.height.mas_equalTo(14); }]; [self.limitImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(28); - make.height.mas_equalTo(18); + make.width.mas_equalTo(14); + make.height.mas_equalTo(14); }]; [self.specialImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(28); - make.height.mas_equalTo(18); + make.width.mas_equalTo(14); + make.height.mas_equalTo(14); }]; [self.exclusiveImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.mas_equalTo(28); - make.height.mas_equalTo(18); + make.width.mas_equalTo(14); + make.height.mas_equalTo(14); }]; [self.coverView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.mas_equalTo(self); @@ -128,7 +128,7 @@ }]; [self.nobleIconImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.height.mas_equalTo(16); + make.width.height.mas_equalTo(14); }]; [self.lockImageView mas_makeConstraints:^(MASConstraintMaker *make) { diff --git a/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.h b/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.h index 7f71c416..e324db6f 100644 --- a/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.h +++ b/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.h @@ -17,6 +17,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)receiveTreasureFairyGiftHighLevel:(AttachmentModel *)attatchment ; -(void)receiveTarotBanner:(AttachmentModel *)attachment; -(void)receiveCommonH5Banner:(AttachmentModel *)attachment; +- (void)receiveAnchorHourRank:(AttachmentModel *)attachment; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m b/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m index 5e2e08d5..9f49ada5 100644 --- a/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m +++ b/YuMi/Modules/YMTabbar/View/PIFullScreenBannerAnimation.m @@ -50,7 +50,6 @@ #import "XPRoomViewController.h" #import "XPRoomAnchorRankBannerView.h" #import "XPRoomEnterHideTipView.h" -#import "XPRoomLicneseHourRankView.h" #import "XPRoomLuckyBigPrizeView.h" #import "XPRoomGiftCompoundView.h" #import "XPSailingAnimationView.h" @@ -62,7 +61,7 @@ #import "XPSkillCardPlayerManager.h" #import "XPTreasureFairyGiftView.h" #import "XPRoomTarrowBannerView.h" -@interface PIFullScreenBannerAnimation() +@interface PIFullScreenBannerAnimation() ///礼物飘屏 PresentAchieveAbstractMatrix @property(nonatomic,strong) NSMutableArray *animationListA; ///玩法飘屏 YUMIPresentBigCaptureMatrix @@ -177,7 +176,7 @@ }else if(model.type == GiftBannerType_AnchorHour){ [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_LicneseHour){ - [self createLicneseHourRankAnimation:model]; + [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_Fairy){ [self createTreasureFairyBannerAnimation:model]; }else if(model.type == GiftBannerType_Tarrow){ @@ -208,7 +207,7 @@ }else if(model.type == GiftBannerType_AnchorHour){ [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_LicneseHour){ - [self createLicneseHourRankAnimation:model]; + [self createAnchorHourRankAnimation:model]; }else if(model.type == GiftBannerType_Fairy){ [self createTreasureFairyBannerAnimation:model]; }else if(model.type == GiftBannerType_Tarrow){ @@ -654,66 +653,13 @@ webVC.url = starModel.skipUrl; [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webVC animated:YES]; -} -#pragma mark - 牌照房小时榜飘屏 -- (void)receiveLicneseHourRank:(AttachmentModel *)attachment { - PIBaseAnimationViewModel *licneseModel =[PIBaseAnimationViewModel new]; - licneseModel.data = attachment.data; - licneseModel.type = GiftBannerType_AnchorHour; - if(self.animationListB.count == 0 && self.isPlayOfB == NO){ - [self createLicneseHourRankAnimation:licneseModel]; - } - [self.animationListB addObject:licneseModel]; -} -- (void)createLicneseHourRankAnimation:(PIBaseAnimationViewModel *)attachment { - self.isPlayOfB = YES; - CGFloat top = self.isPlayOfA == YES ? (190 + statusbarHeight) : (kNavigationHeight + 15); - XPRoomLicneseHourRankView *anchorRankView = [[XPRoomLicneseHourRankView alloc] initWithFrame:CGRectMake(KScreenWidth, top, 375, 60)]; - anchorRankView.delegate = self; - anchorRankView.licneseRankInfo = [RoomHalfHourRankModel modelWithDictionary:attachment.data]; - [kWindow addSubview:anchorRankView]; - POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter]; - springAnimation.springSpeed = 12; - springAnimation.springBounciness = 10.f; - springAnimation.fromValue = [NSValue valueWithCGPoint:anchorRankView.center]; - springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(KScreenWidth / 2, anchorRankView.center.y)]; - [springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) { - if (finished) { - POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter]; - moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(KScreenWidth / 2, anchorRankView.center.y)]; - moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth, anchorRankView.center.y)]; - moveAnimation.beginTime = CACurrentMediaTime() + 3; - moveAnimation.duration = 0.5; - moveAnimation.repeatCount = 1; - moveAnimation.removedOnCompletion = YES; - [moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) { - [anchorRankView removeFromSuperview]; - self.isPlayOfB = NO; - - if(self.animationListB.count > 0){ - [self.animationListB removeObjectAtIndex:0]; - } -// if(self.isAnimationListAFinish == YES){ -// self.isAnimationListAFinish = NO; -// [self playAnimationWithModel]; -// return; -// } - [self playAnimationWithModel]; - }]; - [anchorRankView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"]; - } - }]; - [anchorRankView pop_addAnimation:springAnimation forKey:@"nobleLevelUpspingOutAnimation"]; -} -- (void)xPRoomLicneseHourRankView:(XPRoomLicneseHourRankView *)view rankInfo:(RoomHalfHourRankModel *)rankInfo { - - - [XPRoomViewController openRoom:rankInfo.uid viewController:[XCCurrentVCStackManager shareManager].getCurrentVC]; - - } -#pragma mark - 个播小时榜飘屏 +#pragma mark - XPRoomAnchorRankBannerViewDelegate +- (void)xPRoomAnchorRankBannerView:(XPRoomAnchorRankBannerView *)view rankInfo:(RoomHalfHourRankModel *)rankInfo{ + [XPRoomViewController openRoom:rankInfo.uid viewController:[XCCurrentVCStackManager shareManager].getCurrentVC]; +} +#pragma mark - 个播小时榜飘屏或牌照房小时榜飘屏 - (void)receiveAnchorHourRank:(AttachmentModel *)attachment { PIBaseAnimationViewModel *anchorModel =[PIBaseAnimationViewModel new]; anchorModel.data = attachment.data; @@ -726,8 +672,9 @@ - (void)createAnchorHourRankAnimation:(PIBaseAnimationViewModel *)attachment { self.isPlayOfB = YES; CGFloat top = self.isPlayOfA == YES ? (190 + statusbarHeight) : (kNavigationHeight + 15); - XPRoomAnchorRankBannerView *anchorRankView = [[XPRoomAnchorRankBannerView alloc] initWithFrame:CGRectMake(KScreenWidth,top, KScreenWidth, 60)]; + XPRoomAnchorRankBannerView *anchorRankView = [[XPRoomAnchorRankBannerView alloc] initWithFrame:CGRectMake(KScreenWidth,top, KScreenWidth, kGetScaleWidth(55))]; anchorRankView.anchorRankInfo = [RoomHalfHourRankModel modelWithDictionary:attachment.data]; + anchorRankView.delegate = self; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(gotoTopRankAnchorRoom:)]; [anchorRankView addGestureRecognizer:tap]; [kWindow addSubview:anchorRankView]; diff --git a/YuMi/Modules/YMTabbar/View/TabbarViewController.m b/YuMi/Modules/YMTabbar/View/TabbarViewController.m index d1080e37..a5a09e22 100644 --- a/YuMi/Modules/YMTabbar/View/TabbarViewController.m +++ b/YuMi/Modules/YMTabbar/View/TabbarViewController.m @@ -623,6 +623,12 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; }else if(attachment.first == CustomMessageType_Common_H5 && (attachment.second == Custom_Message_Sub_Common_H5_Novice || attachment.second == Custom_Message_Sub_Common_H5_Advanced)){ if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return; [self.roomAnimation receiveCommonH5Banner:attachment]; + }else if (attachment.first == CustomMessageType_Anchor_Hour_Rank && attachment.second == Custom_Message_Sub_Anchor_Hour_Rank) {///个播小时榜 + if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return; + [self.roomAnimation receiveAnchorHourRank:attachment]; + } else if (attachment.first == CustomMessageType_Licnese_Hour_Rank && attachment.second == Custom_Message_Sub_Licnese_Hour_Rank) {///牌照房小时榜 + if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return; + [self.roomAnimation receiveAnchorHourRank:attachment]; } } } diff --git a/YuMi/Modules/YMWeb/XPWebViewController.m b/YuMi/Modules/YMWeb/XPWebViewController.m index 034c6877..0de361c7 100644 --- a/YuMi/Modules/YMWeb/XPWebViewController.m +++ b/YuMi/Modules/YMWeb/XPWebViewController.m @@ -29,6 +29,7 @@ #import "XPWebViewNavView.h" #import "XPIAPRechargeViewController.h" #import "SessionViewController.h" +#import "XPMonentTopicContainerViewController.h" typedef NS_ENUM(NSUInteger, RightNavigationPushType){ ///跳转h5页面 RightNavigationPushType_Web = 1, @@ -461,6 +462,15 @@ NSString * const kJSOpenAppConcernedChat = @"openAppConcernedChat"; [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:vc animated:YES]; } break; + case 75: + {//跳转对应的话题 + bodyDict = [bodyDict toJSONObject]; + NSString *topicId = bodyDict[@"routerVal"]; + XPMonentTopicContainerViewController * topicVC = [[XPMonentTopicContainerViewController alloc] init]; + topicVC.worldId = topicId; + [[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:topicVC animated:YES]; + } + break; default: break; } diff --git a/YuMi/zh-Hans.lproj/Localizable.strings b/YuMi/zh-Hans.lproj/Localizable.strings index 893a5e12..321d540d 100644 --- a/YuMi/zh-Hans.lproj/Localizable.strings +++ b/YuMi/zh-Hans.lproj/Localizable.strings @@ -1599,8 +1599,7 @@ "XPRoomCandyGiftView0" = "厉害了! "; "XPRoomCandyGiftView1" = "通过寻爱之旅获取 "; -"XPRoomLicneseHourRankView0" = "恭喜"; -"XPRoomLicneseHourRankView1" = "去围观"; + "XPRoomEnterHideTipView0" = "你已隐身进入房间~"; @@ -1616,7 +1615,8 @@ "XPRoomYearActivityView0" = "送给"; -"XPRoomAnchorRankBannerView0" = "恭喜"; +"XPRoomAnchorRankBannerView0" = "恭喜 %@ 成为上时段 小时榜TOP1"; +"XPRoomAnchorRankBannerView1" = "小时榜TOP1"; "XPRoomLuckyBigPrizeView0" = "恭喜"; "XPRoomLuckyBigPrizeView1" = "在%@幸运礼物中欧气爆棚开出了价值"; diff --git a/YuMi/zh-Hant.lproj/Localizable.strings b/YuMi/zh-Hant.lproj/Localizable.strings index 25ba2ed7..3918b290 100644 --- a/YuMi/zh-Hant.lproj/Localizable.strings +++ b/YuMi/zh-Hant.lproj/Localizable.strings @@ -1605,8 +1605,7 @@ "XPRoomCandyGiftView0" = "厲害了! "; "XPRoomCandyGiftView1" = "通過尋愛之旅獲取 "; -"XPRoomLicneseHourRankView0" = "恭喜"; -"XPRoomLicneseHourRankView1" = "去圍觀"; + "XPRoomEnterHideTipView0" = "你已隱身進入房間~"; @@ -1622,8 +1621,8 @@ "XPRoomYearActivityView0" = "送給"; -"XPRoomAnchorRankBannerView0" = "恭喜"; - +"XPRoomAnchorRankBannerView0" = "恭喜 %@ 成為上時段 小時榜TOP1"; +"XPRoomAnchorRankBannerView1" = "小時榜TOP1"; "XPRoomLuckyBigPrizeView0" = "恭喜"; "XPRoomLuckyBigPrizeView1" = "在%@幸運禮物中歐氣爆棚開出了價值";