礼物面板修改

This commit is contained in:
chenguilong
2022-09-29 18:39:08 +08:00
parent f4102596c0
commit 4be9c07a82
4 changed files with 247 additions and 1 deletions

View File

@@ -32,6 +32,7 @@
#import "XPGiftBarView.h"
#import "XPRoomHalfWebView.h"
#import "XPGraffitiGiftView.h"
#import "XPGiftHeadTypeView.h"
///P
#import "XPGiftProtocol.h"
///VC
@@ -40,13 +41,15 @@
#import "XPFirstRechargeViewController.h"
#import "XPNobleCenterViewController.h"
@interface XPSendGiftView ()< XPGiftBarViewDelegate, XPGiftProtocol, XPGiftInfoViewDelegate, XPGraffitiGiftViewDelegate, XPGiftUsersViewDelegate>
@interface XPSendGiftView ()< XPGiftBarViewDelegate, XPGiftProtocol, XPGiftInfoViewDelegate, XPGraffitiGiftViewDelegate, XPGiftUsersViewDelegate, XPGiftHeadTypeViewDelegate>
///
@property (nonatomic,strong) UIView * topView;
///
@property (nonatomic,strong) UIView *contentView;
///
@property (nonatomic,strong) UIStackView *stackView;
////
@property (nonatomic, strong) XPGiftHeadTypeView *headTypeView;
///
@property (nonatomic,strong) XPGiftUsersView *userView;
///
@@ -100,6 +103,7 @@
[self.view addSubview:self.contentView];
[self.contentView addSubview:self.stackView];
[self.stackView addArrangedSubview:self.graffitiView];
[self.stackView addArrangedSubview:self.headTypeView];
[self.stackView addArrangedSubview:self.userView];
[self.stackView addArrangedSubview:self.giftInfoView];
[self.stackView addArrangedSubview:self.giftBarView];
@@ -394,6 +398,29 @@
[self.delegate.getCurrentNav presentViewController:firstRechargeVC animated:YES completion:nil];
}
#pragma mark - XPGiftHeadTypeViewDelegate
///
- (void)xPGiftHeadTypeViewDidClickNoble:(XPGiftHeadTypeView *)view {
[self dismissViewControllerAnimated:YES completion:nil];
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventvipEntranceGiftClick];
XPNobleCenterViewController * nobleVC = [[XPNobleCenterViewController alloc] initWithRoomUid:self.delegate.getRoomInfo.uid];
[self.delegate.getCurrentNav pushViewController:nobleVC animated:YES];
}
///
- (void)xPGiftHeadTypeViewDidClickFirstRecharge:(XPGiftHeadTypeView *)view {
[self dismissViewControllerAnimated:YES completion:nil];
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:self.delegate.getCurrentNav];
[self.delegate.getCurrentNav presentViewController:firstRechargeVC animated:YES completion:nil];
}
///
- (void)xPGiftHeadTypeViewDidClickGift:(XPGiftHeadTypeView *)view {
}
///
- (void)xPGiftHeadTypeViewDidClickInteraction:(XPGiftHeadTypeView *)view {
}
#pragma mark - XPGiftInfoViewDelegate
- (void)xPGiftInfoView:(XPGiftInfoView *)view didClickPlayRule:(NSString *)ruleUrl {
XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init];
@@ -468,6 +495,7 @@
#pragma mark - XPGiftProtocol
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
self.headTypeView.isShowFirstRecharge = userInfo.isFirstCharge;
self.giftBarView.isShowFirstRecharge = userInfo.isFirstCharge;
self.giftInfoView.curUserNobleLevel = userInfo.userVipInfoVO.vipLevel;
}
@@ -639,4 +667,12 @@
return _graffitiView;
}
- (XPGiftHeadTypeView *)headTypeView {
if (!_headTypeView) {
_headTypeView = [[XPGiftHeadTypeView alloc] init];
_headTypeView.delegate = self;
}
return _headTypeView;
}
@end