1.0.19 feat:基本完成所有需求 & bug fix

This commit is contained in:
eggmanQQQ
2024-11-11 19:35:21 +08:00
parent efefa94d3c
commit 00014f0327
63 changed files with 1239 additions and 367 deletions

View File

@@ -177,7 +177,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
[self.pkMenuButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(0);
make.size.mas_equalTo(itemSize);
make.size.mas_equalTo(itemSize_game_rocket);
}];
[self.gambleMenuButton mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -192,7 +192,7 @@ UIKIT_EXTERN NSString *kShowFirstRechargeView;
[self.configEntranceMenuButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(0);
make.size.mas_equalTo(itemSize);
make.size.mas_equalTo(itemSize_game_rocket);
}];
[self.joinDatingView mas_makeConstraints:^(MASConstraintMaker *make) {

View File

@@ -7,13 +7,13 @@
#import <UIKit/UIKit.h>
@class AttachmentModel;
NS_ASSUME_NONNULL_BEGIN
@interface RoomHighValueGiftBannerAnimation : UIView
+ (void)display:(UIView *)superView
with:(id)attachment
tapToRoom:(BOOL)handleTapToRoom
with:(AttachmentModel *)attachment
complete:(void(^)(void))complete;
@end

View File

@@ -7,6 +7,13 @@
#import "RoomHighValueGiftBannerAnimation.h"
#import "SVGA.h"
#import "AttachmentModel.h"
#import "GiftReceiveInfoModel.h"
#import "XCCurrentVCStackManager.h"
#import "XPRoomViewController.h"
#import "RoomHostDelegate.h"
#import "RoomInfoModel.h"
#import "XPSkillCardPlayerManager.h"
@interface RoomHighValueGiftBannerAnimation ()
@@ -26,6 +33,8 @@
@property (nonatomic,strong) UILabel *giftCountLabel;
///
@property(nonatomic,strong) UIButton *goButton;
@property (nonatomic, assign) NSInteger roomUid;
@property (nonatomic, copy) NSString *bgSourceName;
@property (nonatomic, copy) void(^animationComplete)(void);
@@ -34,20 +43,48 @@
@implementation RoomHighValueGiftBannerAnimation
+ (void)display:(UIView *)superView
with:(id)attachment
tapToRoom:(BOOL)handleTapToRoom
with:(AttachmentModel *)attachment
complete:(void(^)(void))complete {
NSInteger height = kGetScaleWidth(110);
NSInteger y = kStatusBarHeight;
GiftReceiveInfoModel *giftNotifyInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
__block RoomHighValueGiftBannerAnimation *banner = [[RoomHighValueGiftBannerAnimation alloc] initWithFrame:CGRectMake(KScreenWidth, y, KScreenWidth, height)];
banner.animationComplete = complete;
banner.senderAvatarView.imageUrl = giftNotifyInfo.sendUserAvatar;
banner.giftImageView.imageUrl = giftNotifyInfo.giftUrl;
banner.roomNameScrollLabel.text = giftNotifyInfo.roomTitle;
banner.senderScrollLabel.text = [NSString stringWithFormat:@"%@ %@ %@", giftNotifyInfo.sendUserNick, YMLocalizedString(@"XPSessionFindNewGreetListView3"), giftNotifyInfo.recvUserNick];
banner.giftNameLabel.text = giftNotifyInfo.giftName;
banner.giftCountLabel.text = [NSString stringWithFormat:@"x %ld", (long)giftNotifyInfo.giftNum];
banner.roomUid = giftNotifyInfo.roomUid;
banner.senderScrollLabel.text = @"roomUidinteger($int64) (query)";
banner.roomNameScrollLabel.text = @"roomUidinteger($int64) (query)";
banner.giftNameLabel.text = @"yijgish";
banner.giftCountLabel.text = @"x!0";
switch (giftNotifyInfo.bgLevel) {
case 1:
banner.bgSourceName = @"gift_normal_1";
break;
case 2:
banner.bgSourceName = @"gift_normal_2";
break;
case 3:
banner.bgSourceName = @"gift_normal_3";
break;
case 4:
banner.bgSourceName = @"gift_vip_1";
break;
case 5:
banner.bgSourceName = @"gift_vip_2";
break;
case 6:
banner.bgSourceName = @"gift_vip_3";
break;
default:
banner.bgSourceName = @"gift_normal_1";
break;
}
[superView addSubview:banner];
@@ -55,7 +92,7 @@
[UIView animateWithDuration:0.25 animations:^{
banner.frame = CGRectMake(0, y, KScreenWidth, height);
} completion:^(BOOL finished) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(112.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[UIView animateWithDuration:0.25 delay:0 options:UIViewAnimationOptionCurveEaseInOut animations:^{
banner.frame = CGRectMake(-KScreenWidth, y, KScreenWidth, height);
} completion:^(BOOL finished) {
@@ -69,23 +106,61 @@
}];
}
- (void)handleTapGo {
//
UIViewController * controllerView = [XCCurrentVCStackManager shareManager].getCurrentVC;
__block XPRoomViewController<RoomHostDelegate> *roomVC = nil;
[controllerView.navigationController.viewControllers enumerateObjectsUsingBlock:^(__kindof UIViewController * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if ([obj isKindOfClass:[XPRoomViewController class]]) {
[controllerView.navigationController popToRootViewControllerAnimated:NO];
roomVC = obj;
*stop = YES;
}
}];
if (roomVC) {
//
if ([roomVC getRoomInfo].uid == self.roomUid) {
return;
}
__block NSString *targetRoomUid = @(self.roomUid).stringValue;
[TTPopup alertWithMessage:YMLocalizedString(@"Combo_10") confirmHandler:^{
[roomVC exitRoom];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[XPRoomViewController openRoom:targetRoomUid
viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
});
} cancelHandler:^{}];
} else {
[XPRoomViewController openRoom:@(self.roomUid).stringValue
viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
}
}
- (instancetype)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
[self setupUI];
@kWeakify(self);
SVGAParser *parser = [[SVGAParser alloc] init];
[parser parseWithNamed:@"gift_VIP_1" inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
@kStrongify(self);
self.svgaImageView.videoItem = videoItem;
[self.svgaImageView startAnimation];
} failureBlock:^(NSError * _Nonnull error) {
// TODO:
}];
}
return self;
}
- (void)setBgSourceName:(NSString *)bgSourceName {
_bgSourceName = bgSourceName;
@kWeakify(self);
SVGAParser *parser = [[SVGAParser alloc] init];
[parser parseWithNamed:self.bgSourceName
inBundle:[NSBundle mainBundle]
completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
@kStrongify(self);
self.svgaImageView.videoItem = videoItem;
[self.svgaImageView startAnimation];
} failureBlock:^(NSError * _Nonnull error) {
// TODO:
}];
}
- (void)setupUI {
[self addSubview:self.backImageView];
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -113,7 +188,7 @@
[self addSubview:self.senderScrollLabel];
[self.senderScrollLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(38);
make.top.mas_equalTo(40);
make.leading.mas_equalTo(self.senderAvatarView.mas_trailing).offset(4);
make.trailing.mas_equalTo(self.giftImageView.mas_leading).offset(-4);
make.height.mas_equalTo(16);
@@ -121,7 +196,7 @@
[self addSubview:self.giftNameLabel];
[self.giftNameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.senderScrollLabel.mas_bottom).offset(4);
make.top.mas_equalTo(self.senderScrollLabel.mas_bottom).offset(8);
make.leading.mas_equalTo(self.senderAvatarView.mas_trailing).offset(4);
make.height.mas_equalTo(16);
}];
@@ -138,7 +213,7 @@
[room mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(self.giftImageView.mas_trailing).offset(2);
make.top.mas_equalTo(self.giftImageView);
make.width.height.mas_equalTo(11);
make.width.height.mas_equalTo(16);
}];
[self addSubview:self.roomNameScrollLabel];
@@ -191,7 +266,8 @@
_senderScrollLabel.scrollDuration = 6.0;
_senderScrollLabel.textColor = [UIColor whiteColor];
_senderScrollLabel.fadeLength = 8.0f;
_senderScrollLabel.textAlignment = NSTextAlignmentCenter;
_senderScrollLabel.font = kFontMedium(11);
_senderScrollLabel.textAlignment = NSTextAlignmentLeft;
}
return _senderScrollLabel;
}
@@ -202,7 +278,8 @@
_roomNameScrollLabel.textColor = [UIColor whiteColor];
_roomNameScrollLabel.scrollDuration = 6.0;
_roomNameScrollLabel.fadeLength = 8.0f;
_roomNameScrollLabel.textAlignment = NSTextAlignmentCenter;
_roomNameScrollLabel.font = kFontMedium(11);
_roomNameScrollLabel.textAlignment = NSTextAlignmentLeft;
}
return _roomNameScrollLabel;
}
@@ -242,10 +319,23 @@
if(!_goButton){
_goButton = [UIButton new];
[_goButton setTitle:YMLocalizedString(@"XPAcrossRoomPKPanelView3") forState:UIControlStateNormal];
[_goButton setTitleColor:UIColorFromRGB(0x442a00) forState:UIControlStateNormal];
_goButton.titleLabel.font = kFontRegular(10);
_goButton.layer.cornerRadius = kGetScaleWidth(20)/2;
_goButton.layer.borderWidth = 1;
_goButton.layer.masksToBounds = YES;
//
CAGradientLayer *gradientLayer = [CAGradientLayer layer];
gradientLayer.colors = @[(__bridge id)UIColorFromRGB(0xFFFADE).CGColor,
(__bridge id)UIColorFromRGB(0xFFE184).CGColor];
gradientLayer.startPoint = CGPointMake(0.0, 0.5); //
gradientLayer.endPoint = CGPointMake(1.0, 0.5); //
gradientLayer.frame = CGRectMake(0, 0, 55, 20); //
//
[_goButton.layer insertSublayer:gradientLayer atIndex:0];
[_goButton addTarget:self
action:@selector(handleTapGo)
forControlEvents:UIControlEventTouchUpInside];
}
return _goButton;
}

View File

@@ -78,6 +78,7 @@
#import "MSRoomGameWebVC.h"
#import "GameUniversalBannerView.h"
#import "RoomHighValueGiftBannerAnimation.h"
@interface XPRoomAnimationView ()<
SVGAPlayerDelegate,
@@ -272,7 +273,8 @@ HWDMP4PlayDelegate>
return;
}
if (attachment.first == CustomMessageType_Gift && attachment.second == Custom_Message_Sub_Gift_ChannelNotify){///广
[self receiveBroadcastGift:attachment];
// [self receiveBroadcastGift:attachment];
[self receiveRoomGiftBanner:attachment];
} else if (attachment.first == CustomMessageType_Noble_VIP && attachment.second == Custom_Message_Sub_Room_Noble_LevelUp_Suspend) {///VIP
[self receiveNobleLevelUp:attachment];
}else if(attachment.first == CustomMessageType_LuckyBag && attachment.second == Custom_Message_Sub_Room_Gift_LuckBag_FullScree){
@@ -506,6 +508,9 @@ HWDMP4PlayDelegate>
case Custom_Message_Sub_CP_Binding:
[self playCPBinding:nextAttachment];
break;
case Custom_Message_Sub_Gift_ChannelNotify:
[self playRoomGiftBanner:nextAttachment];
break;
default:
break;
}
@@ -2641,6 +2646,24 @@ HWDMP4PlayDelegate>
}];
}
#pragma mark -
- (void)receiveRoomGiftBanner:(AttachmentModel *)obj {
[self.roomEffectModelsQueueV2 addObject:obj];
if (!self.isRoomEffectV2Displaying) {
[self processNextRoomEffectAttachment];
}
}
- (void)playRoomGiftBanner:(AttachmentModel *)obj {
@kWeakify(self);
[RoomHighValueGiftBannerAnimation display:self
with:obj
complete:^{
@kStrongify(self);
[self processNextRoomEffectAttachment];
}];
}
#pragma mark -
- (void)receiveRoomWishGiftCelebrate:(AttachmentModel *)attachment {
CGFloat x = random() % (int)(KScreenWidth - 200);

View File

@@ -14,7 +14,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface CustomRoomBGCell : UICollectionViewCell
@property (nonatomic, assign) BOOL isSelectedCell;
@property (nonatomic, copy) void(^handleTapPlayButton)(id obj);
@property (nonatomic, copy) void(^handleTapActionButton)(CustomRoomBGItemModel *obj);
@property (nonatomic, copy) void(^handleTapTrash)(CustomRoomBGItemModel *model);
+ (void)registerTo:(UICollectionView *)collectionView;
+ (CustomRoomBGCell *)reuseFrom:(UICollectionView *)collectionView

View File

@@ -29,6 +29,9 @@
@property (nonatomic, strong) SVGAImageView *svgaImageView;
@property (nonatomic, strong) SVGAParser *parser;
//@property (nonatomic, strong) SVGAVideoEntity *svgaEntity;
@property (nonatomic, strong) CAGradientLayer *actionButtonLayer;
@end
@implementation CustomRoomBGCell
@@ -113,7 +116,9 @@
}
- (void)updateActionButtonToRenew {
[self removeAllActionButtonSublayers];
[self.actionButton setTitle:YMLocalizedString(@"1.0.18_10") forState:UIControlStateNormal];
[self.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
self.actionButton.backgroundColor = [UIColor colorWithWhite:1 alpha:0.2];
[self.actionButton setCornerRadius:10
corners:(kCALayerMinXMinYCorner |
@@ -122,20 +127,63 @@
kCALayerMaxXMaxYCorner)
borderWidth:1
borderColor:[UIColor whiteColor]];
self.actionButton.userInteractionEnabled = YES;
}
- (void)updateActionButtonToInReview {
[self removeAllActionButtonSublayers];
[self.actionButton setTitle:YMLocalizedString(@"1.0.18_18") forState:UIControlStateNormal];
[self.actionButton setTitleColor:UIColorFromRGB(0xff9741) forState:UIControlStateNormal];
self.actionButton.backgroundColor = UIColorRGBAlpha(0xff9741, 0.2);
[self.actionButton setCornerRadius:10
corners:(kCALayerMinXMinYCorner |
kCALayerMaxXMinYCorner |
kCALayerMinXMaxYCorner |
kCALayerMaxXMaxYCorner)
borderWidth:1
borderColor:UIColorFromRGB(0xff9741)];
self.actionButton.userInteractionEnabled = YES;
}
- (void)updateActionButtonToInReject {
[self removeAllActionButtonSublayers];
[self.actionButton setTitle:YMLocalizedString(@"1.0.18_19") forState:UIControlStateNormal];
[self.actionButton setTitleColor:UIColorFromRGB(0xff5656) forState:UIControlStateNormal];
self.actionButton.backgroundColor = UIColorRGBAlpha(0xff5656, 0.2);
[self.actionButton setCornerRadius:10
corners:(kCALayerMinXMinYCorner |
kCALayerMaxXMinYCorner |
kCALayerMinXMaxYCorner |
kCALayerMaxXMaxYCorner)
borderWidth:1
borderColor:UIColorFromRGB(0xff5656)];
self.actionButton.userInteractionEnabled = YES;
}
- (void)updateActionButtonToBuy {
[self removeAllActionButtonSublayers];
[self.actionButton setTitle:YMLocalizedString(@"1.0.18_9") forState:UIControlStateNormal];
//
CAGradientLayer *gradientLayer = [CAGradientLayer layer];
gradientLayer.colors = @[(__bridge id)UIColorFromRGB(0xE29030).CGColor,
(__bridge id)UIColorFromRGB(0xFCC074).CGColor];
gradientLayer.startPoint = CGPointMake(0.0, 0.0); //
gradientLayer.endPoint = CGPointMake(0.0, 1.0); //
gradientLayer.frame = CGRectMake(0, 0, 72, 22); //
[self.actionButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
if (!_actionButtonLayer) {
//
CAGradientLayer *gradientLayer = [CAGradientLayer layer];
gradientLayer.colors = @[(__bridge id)UIColorFromRGB(0xE29030).CGColor,
(__bridge id)UIColorFromRGB(0xFCC074).CGColor];
gradientLayer.startPoint = CGPointMake(0.0, 0.0); //
gradientLayer.endPoint = CGPointMake(0.0, 1.0); //
gradientLayer.frame = CGRectMake(0, 0, 72, 22); //
_actionButtonLayer = gradientLayer;
//
[self.actionButton.layer insertSublayer:self.actionButtonLayer atIndex:0];
} else {
self.actionButtonLayer.hidden = NO;
}
//
[self.actionButton.layer insertSublayer:gradientLayer atIndex:0];
[self.actionButton setCornerRadius:10
corners:(kCALayerMinXMinYCorner |
kCALayerMaxXMinYCorner |
@@ -147,6 +195,12 @@
self.actionButton.userInteractionEnabled = NO;
}
- (void)removeAllActionButtonSublayers {
if (self.actionButtonLayer) {
self.actionButtonLayer.hidden = YES;
}
}
- (void)setIsSelectedCell:(BOOL)isSelectedCell {
_isSelectedCell = isSelectedCell;
self.selectedStateView.hidden = !isSelectedCell;
@@ -180,6 +234,9 @@
case RoomBGStatus_Pass:
self.remainingDaysLabel.text = [cellModel remainDays];
self.remainingDaysLabel.hidden = [NSString isEmpty:[cellModel remainDays]];
if (![NSString isEmpty:cellModel.remainHour]) {
[self updateActionButtonToRenew];
}
break;
case RoomBGStatus_Rejected:
self.remainingDaysLabel.text = @"";
@@ -191,6 +248,37 @@
case RoomBGType_Custom:
[self layoutCustomUI];
[self setupBottomArea];
self.pricePerDayLabel.text = [cellModel pricePerDays];
[self displayGIFTag:NO];
[self displayPayRemainTag:cellModel.status == RoomBGStatus_Expired || cellModel.status == RoomBGStatus_Pass];
self.trashButton.hidden = NO;
switch (cellModel.status) {
case RoomBGStatus_Expired:
self.remainingDaysLabel.text = YMLocalizedString(@"1.0.18_7");
self.remainingDaysLabel.hidden = NO;
[self updateRemainLabel:YES];
[self updateActionButtonToRenew];
break;
case RoomBGStatus_Reviewing:
self.remainingDaysLabel.text = @"";
self.remainingDaysLabel.hidden = YES;
self.trashButton.hidden = YES;
[self updateActionButtonToInReview];
break;
case RoomBGStatus_Pass:
self.remainingDaysLabel.text = [cellModel remainDays];
self.remainingDaysLabel.hidden = [NSString isEmpty:[cellModel remainDays]];
[self updateRemainLabel:NO];
[self updateActionButtonToRenew];
break;
case RoomBGStatus_Rejected:
self.remainingDaysLabel.hidden = YES;
[self updateActionButtonToInReject];
break;
default:
break;
}
break;
default:
break;
@@ -296,19 +384,42 @@
}];
}
#pragma mark -
- (void)didTapActionButton {
}
- (void)didTapPlayButton {
if (self.handleTapPlayButton) {
self.handleTapPlayButton(@"");
- (void)updateRemainLabel:(BOOL)isForExpired {
self.remainingDaysLabel.textColor = [UIColor whiteColor];
if (isForExpired) {
self.remainingDaysLabel.backgroundColor = UIColorFromRGB(0x696969);
} else {
self.remainingDaysLabel.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
}
}
- (void)didTapTrashButton {
#pragma mark -
- (void)didTapActionButton {
if (self.handleTapActionButton) {
self.handleTapActionButton(self.cellModel);
}
}
- (void)didTapPlayButton {
// if (self.handleTapPlayButton) {
// self.handleTapPlayButton(@"");
// }
}
- (void)didTapTrashButton {
TTAlertConfig *config = [[TTAlertConfig alloc]init];
config.title = YMLocalizedString(@"XPMineUserInfoAlbumViewController12");
config.message = YMLocalizedString(@"XPMineUserInfoAlbumViewController13");
@kWeakify(self);
[TTPopup alertWithConfig:config
showBorder:NO
confirmHandler:^{
@kStrongify(self);
if (self.handleTapTrash) {
self.handleTapTrash(self.cellModel);
}
}
cancelHandler:^{}];
}

View File

@@ -51,6 +51,9 @@
@property (nonatomic, assign) NSInteger customBGUsageHours;
@property (nonatomic, assign) NSInteger customBGUsageGolds;
@property (nonatomic, assign) NSInteger jumpToTab;
@property (nonatomic, assign) BOOL isCreating;
@end
@implementation CustomRoomBGContentViewController
@@ -62,6 +65,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.jumpToTab = -1;
self.currentSelectedTabIndex = 0;
self.currentSelectedItemIndex = 0;
@@ -76,7 +80,6 @@
self.freeBackgrounds = @[].mutableCopy;
self.customBackgrounds = @[].mutableCopy;
__block CustomRoomBGItemModel *currentModel = nil;
@kWeakify(self);
[self.presenter loadListOfRoomBG:self.roomUID
complete:^(CustomRoomBGModel *roomBGModel) {
@@ -85,9 +88,6 @@
self.customBGUsageGolds = roomBGModel.customGoldPrice;
for (CustomRoomBGItemModel *model in roomBGModel.itemList) {
if (model.isCur) {
currentModel = model;
}
switch (model.type) {
case RoomBGType_Free:
[self.freeBackgrounds addObject:model];
@@ -104,12 +104,24 @@
}
}
if (currentModel) {
[self updateTabButtonStatus:currentModel];
} else {
[self didSelectedButton:self.freeButton];
switch (self.jumpToTab) {
case 1:
[self didSelectedButton:self.freeButton];
break;
case 2:
[self didSelectedButton:self.payButton];
break;
case 3:
[self didSelectedButton:self.customButton];
break;
default:
[self didSelectedButton:self.freeButton];
break;
}
self.jumpToTab = -1;
[self.collectionView reloadData];
} failure:^{
@kStrongify(self);
@@ -118,6 +130,7 @@
}
- (void)updateTabButtonStatus:(CustomRoomBGItemModel *)model {
self.currentSelectedModel = nil;
self.currentSelectedTabIndex = model.type;
switch (model.type) {
case RoomBGType_Pay:
@@ -136,7 +149,7 @@
}
- (void)setupUI {
self.view.backgroundColor = [UIColor colorWithWhite:0 alpha:0.3];
self.view.backgroundColor = [UIColor clearColor];
[self setupBackgroundContent];
[self setupTopButtons];
@@ -342,6 +355,7 @@
}
- (void)updatePreviewWith:(UIImage *)image {
self.isCreating = YES;
self.previewBackImageView.image = image;
[self.previewActionButton setTitle:YMLocalizedString(@"1.0.18_16") forState:UIControlStateNormal];
}
@@ -392,10 +406,15 @@
}
- (void)didTapActionButton {
[self updateRoomBG];
if (self.isCreating) {
[self uploadBG];
} else {
[self updateRoomBG];
}
}
- (void)didTapCancelPreview {
self.isCreating = NO;
[self.previewArea removeFromSuperview];
}
@@ -406,18 +425,18 @@
}
switch (self.currentSelectedModel.type) {
case 0:
case RoomBGType_Free:
[self applyBG];
break;
case 1:
if (self.currentSelectedModel.status == 1 && [self.currentSelectedModel isAlreadyPay]) {
[self applyBG];
} else {
[self buyBG];
}
case RoomBGType_Pay:
[self buyBG];
break;
case 2:
[self uploadBG];
case RoomBGType_Custom:
if (self.currentSelectedModel.status == RoomBGStatus_Pass) {
[self buyBG];
} else {
[self uploadBG];
}
break;
default:
@@ -437,10 +456,14 @@
}
- (void)uploadBG {
[self showLoading];
@kWeakify(self);
[self.presenter uploadRoomBG:self.roomUID photo:self.customSelectedImage complete:^{
@kStrongify(self);
// TODO: custom tab
[self hideHUD];
[self didTapCancelPreview];
self.jumpToTab = 3;
[self setupData];
} failure:^{
[self hideHUD];
@@ -458,6 +481,15 @@
failure:^{}];
}
- (void)removeBG:(CustomRoomBGItemModel *)model {
@kWeakify(self);
[self.presenter deleteRoomBG:self.roomUID itemID:@(model.id).stringValue complete:^{
@kStrongify(self);
//TODO: custom
[self setupData];
} failure:^{ }];
}
#pragma mark - UIImagePickerControllerDelegate
- (void)showNotPhoto:(NSString *)title content:(NSString *)content{
TTAlertConfig *config = [[TTAlertConfig alloc] init];
@@ -491,7 +523,6 @@
}];
}
#pragma mark -
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
switch (self.currentSelectedTabIndex) {
@@ -531,9 +562,18 @@
model:model
atIndexPath:indexPath];
@kWeakify(self);
[cell setHandleTapPlayButton:^(id _Nonnull obj) {
// [cell setHandleTapPlayButton:^(id _Nonnull obj) {
// @kStrongify(self);
// [self displayPreviewArea];
// }];
[cell setHandleTapActionButton:^(CustomRoomBGItemModel * _Nonnull obj) {
@kStrongify(self);
[self displayPreviewArea];
[self handleCellModelAction:obj isFromButton:YES];
}];
[cell setHandleTapTrash:^(CustomRoomBGItemModel * _Nonnull model) {
@kStrongify(self);
[self removeBG:model];
}];
return cell;
}
@@ -556,29 +596,9 @@
default:
break;
}
if (model) {
self.currentSelectedModel = model;
if (model.isCur) {
[collectionView reloadData];
return;
}
// TODO: buy preview
if (model.status == RoomBGStatus_Pass) {
if ([model isAlreadyPay]) {
[self applyBG];
} else {
self.currentSelectedItemIndex = indexPath.row;
[self displayPreviewArea];
[self updatePreviewArea:model];
// [collectionView reloadData];
}
} else {
self.currentSelectedItemIndex = indexPath.row;
[self displayPreviewArea];
[self updatePreviewArea:model];
// [collectionView reloadData];
}
}
self.currentSelectedItemIndex = indexPath.row;
self.currentSelectedModel = model;
[self handleCellModelAction:model isFromButton:NO];
}
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath {
@@ -591,6 +611,62 @@
[bgCell pauseSVGA];
}
- (void)handleCellModelAction:(CustomRoomBGItemModel *)model isFromButton:(BOOL)isFromButton {
if (model) {
if (model.isCur && !isFromButton) {
return;
}
switch (model.type) {
case RoomBGType_Pay: {
if (model.status == RoomBGStatus_Pass) {
if ([model isAlreadyPay] && !isFromButton) {
[self applyBG];
} else {
[self displayPreviewArea];
[self updatePreviewArea:model];
}
} else {
[self displayPreviewArea];
[self updatePreviewArea:model];
}
}
break;
case RoomBGType_Free:
[self applyBG];
break;
case RoomBGType_Custom:
if (model.status == RoomBGStatus_Rejected) {
TTAlertConfig *config = [[TTAlertConfig alloc]init];
config.title = YMLocalizedString(@"1.0.18_20");
config.message = YMLocalizedString(@"1.0.18_23");
config.actionStyle = TTAlertActionConfirmStyle;
[TTPopup alertWithConfig:config
showBorder:NO
confirmHandler:^{}
cancelHandler:^{}];
} else if (model.status == RoomBGStatus_Reviewing) {
TTAlertConfig *config = [[TTAlertConfig alloc]init];
config.title = YMLocalizedString(@"1.0.18_20");
config.message = YMLocalizedString(@"1.0.18_21");
config.actionStyle = TTAlertActionConfirmStyle;
[TTPopup alertWithConfig:config
showBorder:NO
confirmHandler:^{}
cancelHandler:^{}];
} else if (model.status == RoomBGStatus_Pass) {
//
[self displayPreviewArea];
[self updatePreviewArea:model];
}
break;
default:
break;
}
}
}
#pragma mark -
- (UIButton *)dismissButton {
UIButton *b = [UIButton buttonWithType:UIButtonTypeCustom];
@@ -604,10 +680,26 @@
CGFloat height = kGetScaleWidth(323) + kSafeAreaBottomHeight;
UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, KScreenHeight - height, KScreenWidth, height)];
v.userInteractionEnabled = YES;
v.backgroundColor = [UIColor blackColor];
v.backgroundColor = [UIColor clearColor];
v.layer.cornerRadius = 16;
v.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
v.layer.masksToBounds = YES;
//
UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; // Light, Dark, ExtraLight
//
UIVisualEffectView *blurEffectView = [[UIVisualEffectView alloc] initWithEffect:blurEffect];
//
blurEffectView.frame = CGRectMake(0, 0, KScreenWidth, kGetScaleWidth(180 + 32 + 32));
blurEffectView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; // 使
[v addSubview:blurEffectView];
[blurEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(v);
}];
_bottomAreaBackGround = v;
}
return _bottomAreaBackGround;
@@ -831,7 +923,7 @@ forControlEvents:UIControlEventTouchUpInside];
_previewActionButton = [UIButton buttonWithType:UIButtonTypeCustom];
[_previewActionButton setTitle:YMLocalizedString(@"1.0.18_15")
forState:UIControlStateNormal];
_previewActionButton.layer.cornerRadius = 11;
_previewActionButton.layer.cornerRadius = 19;
_previewActionButton.layer.masksToBounds = YES;
[_previewActionButton addTarget:self
action:@selector(didTapActionButton)

View File

@@ -112,7 +112,7 @@
[Api listOfRoomBackground:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
if (complete) {
CustomRoomBGModel *model = [CustomRoomBGModel modelWithJSON:data.data];
NSArray *sortItems = [model.itemList sortedArrayUsingDescriptors:@[[NSSortDescriptor sortDescriptorWithKey:@"id" ascending:YES]]];
NSArray *sortItems = [self __sortedArrayByCustomCriteria:model.itemList];
model.itemList = sortItems.copy;
complete(model);
}
@@ -127,4 +127,39 @@
roomUid:roomUID];
}
- (NSArray *)__sortedArrayByCustomCriteria:(NSArray <CustomRoomBGItemModel*> *)datas {
NSArray *sortedById = [datas sortedArrayUsingComparator:^NSComparisonResult(CustomRoomBGItemModel *obj1, CustomRoomBGItemModel *obj2) {
NSNumber *id1 = @(obj1.id);
NSNumber *id2 = @(obj2.id);
return [id1 compare:id2];
}];
// 2.
NSMutableArray *priority1Array = [NSMutableArray array];
NSMutableArray *priority2Array = [NSMutableArray array];
NSMutableArray *priority3Array = [NSMutableArray array];
for (CustomRoomBGItemModel *obj in sortedById) {
BOOL type = obj.status == RoomBGStatus_Pass;
BOOL isBuy = [obj isAlreadyPay];
if (type && isBuy) {
[priority1Array addObject:obj]; // 1type == 1 && isBuy == YES
} else if (type && !isBuy) {
[priority2Array addObject:obj]; // 2type == 1 && isBuy == NO
} else {
[priority3Array addObject:obj]; // 3
}
}
// 3.
NSMutableArray *finalArray = [NSMutableArray array];
[finalArray addObjectsFromArray:priority1Array];
[finalArray addObjectsFromArray:priority2Array];
[finalArray addObjectsFromArray:priority3Array];
return [finalArray copy];
}
@end

View File

@@ -81,7 +81,7 @@
extModel.experLevelSeq = userInfo.userLevelVo.experLevelSeq;
extModel.experUrl = userInfo.userLevelVo.experUrl;
extModel.newUser = userInfo.newUser;
extModel.vipIcon = userInfo.userVipInfoVO.vipIcon;
extModel.vipIcon = userInfo.userVipInfoVO.nameplateUrl;
extModel.androidBubbleUrl = userInfo.androidBubbleUrl;
extModel.iosBubbleUrl = userInfo.iosBubbleUrl;
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;

View File

@@ -265,13 +265,19 @@
if ([self isCurrentRoomSuperAdmin:message.from]) {
[attribute appendAttributedString:[self createLanguageImageAttribute:@"common_super_admin"]];
}
if (model.vipIcon) {//VIPicon
[attribute appendAttributedString:[self createUrlImageAttribute:model.vipIcon size:CGSizeMake(20, 20)]];
if (![NSString isEmpty:model.experUrl]) {
[attribute appendAttributedString:[self createUrlImageAttribute:model.experUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (model.experUrl) {
[attribute appendAttributedString:[self createUrlImageAttribute:model.experUrl]];
if (![NSString isEmpty:model.charmUrl]) {//
[attribute appendAttributedString:[self createUrlImageAttribute:model.charmUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (![NSString isEmpty:model.vipIcon]) {
[attribute appendAttributedString:[self createUrlImageAttribute:model.vipIcon]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if(model.isCustomWord == YES){
@@ -373,16 +379,23 @@
[attribute appendAttributedString:[self createLanguageImageAttribute:@"common_super_admin"]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.vipIcon.length > 0) {//VIPicon
messageInfo.vipIcon = extModel.vipIcon;
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.vipIcon size:CGSizeMake(20, 20)]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.experUrl.length > 0) {//
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.experUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.charmUrl.length > 0) {//
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.charmUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.vipIcon.length > 0) {//VIPicon
messageInfo.vipIcon = extModel.vipIcon;
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.vipIcon]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if(extModel.isCustomWord == YES){
if (extModel.inRoomNameplatePic.length > 0) {
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.inRoomNameplatePic]];

View File

@@ -155,11 +155,6 @@
isCreator = member.type == NIMChatroomMemberTypeCreator;
isManager = member.type == NIMChatroomMemberTypeManager;
if (isCreator || isManager || isSuperAdmin) {
[array addObject:bgValue];
indexOfRoomAlbum += 1;
}
if ((isCreator || isManager || isSuperAdmin) && roomInfo.type != RoomType_MiniGame && roomInfo.type != RoomType_Anchor) {
[array addObject:roomPK];
indexOfRoomAlbum += 1;
@@ -188,6 +183,10 @@
}
[array addObject:trumpet];
[array addObject:giftEffect];
if (isCreator || isManager || isSuperAdmin) {
[array addObject:bgValue];
indexOfRoomAlbum += 1;
}
[array addObject:roomSetting];
[array addObject:clearScreen];

View File

@@ -120,7 +120,7 @@
extModel.experLevelSeq = userInfo.userLevelVo.experLevelSeq;
extModel.experUrl = userInfo.userLevelVo.experUrl;
extModel.newUser = userInfo.newUser;
extModel.vipIcon = userInfo.userVipInfoVO.vipIcon;
extModel.vipIcon = userInfo.userVipInfoVO.nameplateUrl;
extModel.androidBubbleUrl = userInfo.androidBubbleUrl;
extModel.iosBubbleUrl = userInfo.iosBubbleUrl;
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;

View File

@@ -100,7 +100,7 @@
extModel.experLevelSeq = userInfo.userLevelVo.experLevelSeq;
extModel.experUrl = userInfo.userLevelVo.experUrl;
extModel.newUser = userInfo.newUser;
extModel.vipIcon = userInfo.userVipInfoVO.vipIcon;
extModel.vipIcon = userInfo.userVipInfoVO.nameplateUrl;
extModel.fromUid = userInfo.fromUid;
extModel.fromType = userInfo.fromType;
extModel.fromNick = userInfo.fromNick;

View File

@@ -67,7 +67,7 @@
extModel.experLevelSeq = userInfo.userLevelVo.experLevelSeq;
extModel.experUrl = userInfo.userLevelVo.experUrl;
extModel.newUser = userInfo.newUser;
extModel.vipIcon = userInfo.userVipInfoVO.vipIcon;
extModel.vipIcon = userInfo.userVipInfoVO.nameplateUrl;
extModel.androidBubbleUrl = userInfo.androidBubbleUrl;
extModel.iosBubbleUrl = userInfo.iosBubbleUrl;
extModel.fromSayHelloChannel = userInfo.fromSayHelloChannel;

View File

@@ -17,6 +17,7 @@ typedef enum : NSUInteger {
ComboAction_RemovePanel,
ComboAction_Error,
ComboAction_Combo_Count_Update,
ComboAction_Update_After_Send_Success
} ComboActionType;
typedef enum : NSUInteger {
@@ -30,6 +31,8 @@ NS_ASSUME_NONNULL_BEGIN
@interface GiftComboManager : NSObject
@property (nonatomic, strong) GiftReceiveInfoModel *sendGiftReceiveInfo;
// 单例方法
+ (instancetype)sharedManager;
@@ -61,7 +64,7 @@ NS_ASSUME_NONNULL_BEGIN
- (NSString *)loadErrorMessage;
- (void)receiveGiftInfoForDisplayComboFlags:(GiftReceiveInfoModel *)receiveInfo
container:(UIView *)container;
container:(UIView *)container;
@end

View File

@@ -460,7 +460,9 @@
GiftReceiveInfoModel *receive = [GiftReceiveInfoModel modelWithJSON:data.data];
receive.sourceType = [[dic objectForKey:@"giftSource"] integerValue];
receive.roomSendGiftType = [[dic objectForKey:@"giftType"] integerValue];
[self handleSendGiftSuccess:data];
NSArray *array = [allUIDs componentsSeparatedByString:@","];
receive.receiveGiftNumberUser = array.count;
[self handleSendGiftSuccess:receive sourceData:data];
} else {
self.errorMessage = msg;
self.actionCallback(ComboAction_RemovePanel);
@@ -478,15 +480,16 @@
uid:[AccountInfoStorage instance].getUid];
}
- (void)handleSendGiftSuccess:(BaseModel *)response {
- (void)handleSendGiftSuccess:(GiftReceiveInfoModel *)receive
sourceData:(BaseModel *)response {
if (self.actionCallback) {
self.actionCallback(ComboAction_Combo_Count_Update);
}
GiftReceiveInfoModel *receive = [GiftReceiveInfoModel modelWithJSON:response.data];
if (!receive) {
return;
self.sendGiftReceiveInfo = receive;
if (self.actionCallback) {
self.actionCallback(ComboAction_Update_After_Send_Success);
}
NSDictionary *tempDic = response.data;

View File

@@ -133,6 +133,10 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, assign) NSInteger comboCount;
@property (nonatomic, assign) NSInteger receiveGiftNumberUser;
@property (nonatomic, assign) NSInteger bgLevel; /// 1,2,3 对应非 VIP 背景456 对应 VIP 背景
- (NSInteger)receiveUserCount;
@end

View File

@@ -185,6 +185,17 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
case ComboAction_Error: {
[self showErrorToast:[[GiftComboManager sharedManager] loadErrorMessage]];
}
break;
case ComboAction_Update_After_Send_Success: {
GiftReceiveInfoModel *receiveInfo = [GiftComboManager sharedManager].sendGiftReceiveInfo;
if (receiveInfo.sourceType == GiftSourceType_Pack) {
///
[self.giftInfoView updatePackSource:receiveInfo numberUser:receiveInfo.receiveGiftNumberUser];
} else {
self.giftBarView.walletInfoModel = receiveInfo.userPurse;
}
}
break;
default:
break;
}
@@ -667,6 +678,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
break;
case GiftSegmentType_SuperLucky: {
if (!self.superGiftView.superview) {
self.superGiftView.giftModel = self.giftInfoView.lastSelectGift;
[self.view addSubview:self.superGiftView];
[self.superGiftView mas_remakeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(self.contentView.mas_top);
@@ -721,8 +733,8 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView;
case GiftSegmentType_SuperLucky: {
[self.constellationBanner removeFromSuperview];
[self.luckyBroadcastView removeFromSuperview];
self.superGiftView.giftModel = info;
if (!self.superGiftView.superview) {
self.superGiftView.giftModel = info;
[self.view addSubview:self.superGiftView];
[self.superGiftView mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(self.contentView.mas_top);

View File

@@ -94,8 +94,13 @@
@property (nonatomic,strong) NetImageView *nameplateImageView;
///
@property (nonatomic,strong) UILabel *nameplateLabel;
///VIP
@property (nonatomic,strong) NetImageView *vipPlateImageView;
///ID
@property (nonatomic,strong) UILabel *idLabel;
@property (nonatomic, strong) UIButton *copyIDButton;
///
@property (nonatomic,strong) UIButton *reportButton;
@@ -175,6 +180,7 @@
[self.userInfoView addSubview:self.sexImageView];
[self.userInfoView addSubview:self.tagStackView];
[self.userInfoView addSubview:self.idLabel];
[self.userInfoView addSubview:self.copyIDButton];
[self.userInfoView addSubview:self.reportButton];
[self.userInfoView addSubview:self.closeButton];
///
@@ -182,6 +188,7 @@
[self.tagStackView addArrangedSubview:self.officialImageView];
[self.tagStackView addArrangedSubview:self.experImageView];
[self.tagStackView addArrangedSubview:self.charmImageView];
[self.tagStackView addArrangedSubview:self.vipPlateImageView];
[self.tagStackView addArrangedSubview:self.namePlateView];
///
[self.namePlateView addSubview:self.nameplateImageView];
@@ -301,7 +308,13 @@
make.leading.mas_equalTo(self.nobleIconImageView);
make.top.mas_equalTo(self.tagStackView.mas_bottom).offset(3);
}];
[self.copyIDButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.leading.mas_equalTo(self.idLabel.mas_trailing).offset(2);
make.centerY.mas_equalTo(self.idLabel);
make.size.mas_equalTo(CGSizeMake(14, 14));
}];
[self.closeButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(22, 22));
make.top.mas_equalTo(self.userInfoView).offset(5);
@@ -333,8 +346,12 @@
make.height.mas_equalTo(20);
make.width.mas_equalTo(self.nameplateImageView.mas_width);
}];
[self.vipPlateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(20);
make.width.mas_equalTo(60);
}];
[self.nameplateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.height.mas_equalTo(20);
make.width.mas_equalTo(60);
@@ -587,7 +604,14 @@
self.charmImageView.imageUrl = userInfo.userLevelVo.charmUrl;
}
self.charmImageView.hidden = userInfo.userLevelVo.charmUrl.length <= 0;
if (userInfo.userVipInfoVO.nameplateUrl.length > 0) {
self.vipPlateImageView.hidden = NO;
self.vipPlateImageView.imageUrl = userInfo.userVipInfoVO.nameplateUrl;
} else {
self.vipPlateImageView.hidden = YES;
}
if (userInfo.nameplateWord.length>0 && userInfo.nameplatePic.length>0) {
self.nameplateImageView.imageUrl = userInfo.nameplatePic;
self.nameplateLabel.text = userInfo.nameplateWord;
@@ -595,15 +619,10 @@
} else {
self.namePlateView.hidden = YES;
}
NSString *text = [NSString stringWithFormat:YMLocalizedString(@"XPUserCardViewController0"), userInfo.erbanNo];
NSMutableAttributedString *textAtt = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"%@ ",text] attributes:@{NSForegroundColorAttributeName:self.idLabel.textColor}];
NSTextAttachment * attachment = [[NSTextAttachment alloc] init];
UIImage *iconImage = [UIImage imageNamed:@"user_card_copy_id"];;
attachment.bounds = CGRectMake(0, roundf(self.idLabel.font.capHeight - iconImage.size.height)/2.f, iconImage.size.width, iconImage.size.height);
attachment.image = iconImage;
[textAtt insertAttributedString:[NSMutableAttributedString attributedStringWithAttachment:attachment] atIndex:textAtt.length];
self.idLabel.attributedText = textAtt;
self.idLabel.text = text;
NSString * headwearUrl= userInfo.headwearEffect.length > 0 ? userInfo.headwearEffect : userInfo.headwearPic;
self.headWearImageView.hidden = headwearUrl.length <= 0;
self.headWearSVGAImageView.hidden = headwearUrl.length <= 0;
@@ -1405,6 +1424,18 @@
return _nameplateImageView;
}
- (NetImageView *)vipPlateImageView {
if (!_vipPlateImageView) {
NetImageConfig * config = [[NetImageConfig alloc] init];
config.placeHolder = [UIImageConstant defaultAvatarPlaceholder];
config.imageType = ImageTypeUserCardLevel;
_vipPlateImageView = [[NetImageView alloc] initWithConfig:config];
_vipPlateImageView.userInteractionEnabled = YES;
_vipPlateImageView.contentMode = UIViewContentModeScaleAspectFit;
}
return _vipPlateImageView;
}
- (UILabel *)nameplateLabel {
if (!_nameplateLabel) {
_nameplateLabel = [[UILabel alloc] init];
@@ -1439,7 +1470,7 @@
if (!_idLabel) {
_idLabel = [[UILabel alloc] init];
_idLabel.font = [UIFont systemFontOfSize:10];
_idLabel.textColor = [DJDKMIMOMColor textThirdColor];
_idLabel.textColor = UIColorFromRGB(0x313131);
_idLabel.userInteractionEnabled = YES;
UITapGestureRecognizer *longPress = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(copyNameAction)];
@@ -1561,4 +1592,17 @@
return _vapParser;
}
- (UIButton *)copyIDButton {
if (!_copyIDButton) {
UIButton *b = [UIButton buttonWithType:UIButtonTypeCustom];
[b setImage:kImage(@"user_card_copy") forState:UIControlStateNormal];
[b addTarget:self
action:@selector(copyNameAction)
forControlEvents:UIControlEventTouchUpInside];
_copyIDButton = b;
}
return _copyIDButton;
}
@end

View File

@@ -92,8 +92,6 @@
#import "XPSendGiftView.h"
#import "RoomHighValueGiftBannerAnimation.h"
UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
UIKIT_EXTERN NSString * kNewUserRechargeKey;
@@ -355,17 +353,14 @@ XPCandyTreeInsufficientBalanceViewDelegate>
[self setupForBoom];
#if DEBUG
UIButton *b = [UIButton buttonWithType:UIButtonTypeInfoLight];
b.frame = CGRectMake(100, 100, 100, 100);
[self.view addSubview:b];
[b addTarget:self action:@selector(test) forControlEvents:UIControlEventTouchUpInside];
// UIButton *b = [UIButton buttonWithType:UIButtonTypeInfoLight];
// b.frame = CGRectMake(100, 100, 100, 100);
// [self.view addSubview:b];
// [b addTarget:self action:@selector(test) forControlEvents:UIControlEventTouchUpInside];
#endif
}
- (void)test {
[RoomHighValueGiftBannerAnimation display:self.view
with:nil
tapToRoom:NO
complete:nil];
}
- (void)setupForBoom {