2021-09-16 19:30:22 +08:00
|
|
|
//
|
|
|
|
// XPMineViewController.m
|
|
|
|
// xplan-ios
|
|
|
|
//
|
|
|
|
// Created by 冯硕 on 2021/9/16.
|
|
|
|
//
|
|
|
|
|
|
|
|
#import "XPMineViewController.h"
|
|
|
|
///Third
|
|
|
|
#import <Masonry/Masonry.h>
|
2021-09-17 19:41:09 +08:00
|
|
|
#import <flutter_boost/FlutterBoost.h>
|
2021-09-16 19:30:22 +08:00
|
|
|
///Tool
|
|
|
|
#import "XPMacro.h"
|
2021-09-17 19:41:09 +08:00
|
|
|
#import "XPHtmlUrl.h"
|
|
|
|
#import "UIButton+EnlargeTouchArea.h"
|
2022-01-11 11:28:04 +08:00
|
|
|
#import "StatisticsServiceHelper.h"
|
2021-09-16 19:30:22 +08:00
|
|
|
///Model
|
|
|
|
#import "XPMineItemModel.h"
|
2021-09-23 18:38:33 +08:00
|
|
|
#import "UserInfoModel.h"
|
2021-09-16 19:30:22 +08:00
|
|
|
///P
|
|
|
|
#import "XPMineProtocol.h"
|
|
|
|
#import "XPMinePresent.h"
|
|
|
|
///View
|
|
|
|
#import "XPMineMenuTableViewCell.h"
|
2022-01-19 16:04:46 +08:00
|
|
|
#import "XPMineHeadItemTableViewCell.h"
|
2021-09-16 19:30:22 +08:00
|
|
|
#import "XPMineHeadView.h"
|
2022-01-19 16:29:07 +08:00
|
|
|
#import "XPMineSkillTipView.h"
|
2021-09-17 19:41:09 +08:00
|
|
|
///VC
|
|
|
|
#import "XPMineSettingViewController.h"
|
2021-09-22 18:30:15 +08:00
|
|
|
#import "XPMineTeenagerViewController.h"
|
2021-09-23 18:38:33 +08:00
|
|
|
#import "XPMineUserInfoViewController.h"
|
2021-09-24 19:17:19 +08:00
|
|
|
#import "XPMineRechargeViewController.h"
|
2021-09-17 19:41:09 +08:00
|
|
|
#import "XPWebViewController.h"
|
2021-10-14 21:10:04 +08:00
|
|
|
#import "XPRoomViewController.h"
|
2021-12-16 19:02:31 +08:00
|
|
|
#import "XPMineDressUpViewController.h"
|
2021-12-21 18:10:33 +08:00
|
|
|
#import "XPMineFansViewController.h"
|
|
|
|
#import "XPMineAttentionViewController.h"
|
2021-12-28 17:32:27 +08:00
|
|
|
#import "XPNobleCenterViewController.h"
|
2022-01-19 16:04:46 +08:00
|
|
|
#import "XPMatchManageViewController.h"
|
2022-01-19 18:58:30 +08:00
|
|
|
#import "XPSkillCardViewController.h"
|
2022-01-19 16:04:46 +08:00
|
|
|
|
|
|
|
@interface XPMineViewController ()<UITableViewDelegate, UITableViewDataSource, XPMineProtocol, XPMineHeadItemTableViewCellDelegate, XPMineHeadViewDelegate>
|
|
|
|
///顶部背景
|
|
|
|
@property (nonatomic, strong) UIView *bgImageView;
|
2021-09-22 18:30:15 +08:00
|
|
|
|
2021-09-16 19:30:22 +08:00
|
|
|
@property (nonatomic,strong) UITableView *tableView;
|
|
|
|
///数据源
|
|
|
|
@property (nonatomic,strong) NSArray<XPMineItemModel *> *datasource;
|
|
|
|
///赛事模块的
|
|
|
|
@property (nonatomic,strong) NSArray<XPMineItemModel *> *matchItemArray;
|
2022-01-19 16:04:46 +08:00
|
|
|
///卡片item
|
|
|
|
@property (nonatomic, strong) NSArray<XPMineItemModel *> *cardItemArray;
|
2021-09-16 19:30:22 +08:00
|
|
|
///头部
|
|
|
|
@property (nonatomic,strong) XPMineHeadView *headView;
|
|
|
|
///设置
|
|
|
|
@property (nonatomic,strong) UIButton *settingButton;
|
2021-09-18 20:05:02 +08:00
|
|
|
///
|
|
|
|
@property (nonatomic,strong) UserInfoModel *userInfo;
|
2021-09-16 19:30:22 +08:00
|
|
|
|
2022-01-19 16:29:07 +08:00
|
|
|
@property (nonatomic, strong) XPMineSkillTipView *skillTipView;
|
|
|
|
|
2021-09-16 19:30:22 +08:00
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation XPMineViewController
|
|
|
|
|
|
|
|
- (BOOL)isHiddenNavBar {
|
|
|
|
return YES;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (XPMinePresent *)createPresenter {
|
|
|
|
return [[XPMinePresent alloc] init];;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)viewDidLoad {
|
2021-09-22 18:30:15 +08:00
|
|
|
[super viewDidLoad];
|
2021-09-16 19:30:22 +08:00
|
|
|
[self initSubViews];
|
|
|
|
[self initSubViewConstraints];
|
2022-01-19 16:29:07 +08:00
|
|
|
[self showSkillCardTipView];
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)viewWillAppear:(BOOL)animated {
|
|
|
|
[super viewWillAppear:animated];
|
|
|
|
[self.presenter getUserInfo];
|
|
|
|
}
|
|
|
|
|
|
|
|
#pragma mark - Response
|
|
|
|
- (void)settingButtonAction:(UIButton *)sender {
|
2021-09-17 19:41:09 +08:00
|
|
|
XPMineSettingViewController * settingVC = [[XPMineSettingViewController alloc] init];
|
2021-09-18 20:05:02 +08:00
|
|
|
settingVC.userInfo = self.userInfo;
|
2021-09-17 19:41:09 +08:00
|
|
|
[self.navigationController pushViewController:settingVC animated:YES];
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
#pragma mark - Private Method
|
|
|
|
- (void)initSubViews {
|
2022-01-19 16:04:46 +08:00
|
|
|
[self.view addSubview:self.bgImageView];
|
2021-09-16 19:30:22 +08:00
|
|
|
[self.view addSubview:self.tableView];
|
|
|
|
[self.view addSubview:self.settingButton];
|
|
|
|
self.tableView.tableHeaderView = self.headView;
|
|
|
|
[self.presenter getNormalItems];
|
2022-01-19 16:04:46 +08:00
|
|
|
[self.presenter getCardItems];
|
2022-01-19 16:29:07 +08:00
|
|
|
if (@available(iOS 15.0, *)) {//移除iOS15列表头默认增加的22高度
|
|
|
|
self.tableView.sectionHeaderTopPadding = 0;
|
|
|
|
}
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)initSubViewConstraints {
|
2022-01-19 16:04:46 +08:00
|
|
|
[self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
make.left.right.top.mas_equalTo(0);
|
|
|
|
}];
|
2021-09-16 19:30:22 +08:00
|
|
|
[self.settingButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
make.size.mas_equalTo(CGSizeMake(18, 18));
|
|
|
|
make.right.mas_equalTo(self.view).offset(-14);
|
|
|
|
make.top.mas_equalTo(self.view).offset(kSafeAreaTopHeight + 29);
|
|
|
|
}];
|
|
|
|
|
|
|
|
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
make.top.mas_equalTo(self.view);
|
|
|
|
make.left.right.bottom.mas_equalTo(self.view);
|
|
|
|
}];
|
|
|
|
}
|
|
|
|
|
2022-01-19 16:29:07 +08:00
|
|
|
///展示技能卡引导
|
|
|
|
- (void)showSkillCardTipView {
|
|
|
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
|
|
|
NSString *skillCardTip = [defaults objectForKey:kYinyouSkillCardTipKey];
|
|
|
|
if (!skillCardTip) {
|
|
|
|
UIWindow *window = [UIApplication sharedApplication].delegate.window;
|
|
|
|
[window addSubview:self.skillTipView];
|
|
|
|
[window bringSubviewToFront:self.skillTipView];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-16 19:30:22 +08:00
|
|
|
- (void)pushViewControllerWithType:(XPMineItemType)type {
|
|
|
|
switch (type) {
|
2022-01-19 16:04:46 +08:00
|
|
|
case XPMineItemType_Match_Manage: {
|
|
|
|
XPMatchManageViewController *vc = [[XPMatchManageViewController alloc] init];
|
|
|
|
[self.navigationController pushViewController:vc animated:YES];
|
|
|
|
}
|
|
|
|
break;
|
2021-09-16 19:30:22 +08:00
|
|
|
case XPMineItemType_Match_Apply_Record:
|
2021-09-17 19:41:09 +08:00
|
|
|
[self pushMatchVCWithKey:@"quotaRecord"];
|
2021-09-16 19:30:22 +08:00
|
|
|
break;
|
|
|
|
case XPMineItemType_Match_Standings:
|
2021-09-17 19:41:09 +08:00
|
|
|
[self pushMatchVCWithKey:@"performance"];
|
2021-09-16 19:30:22 +08:00
|
|
|
break;
|
|
|
|
case XPMineItemType_Match_Card_Bag:
|
2021-09-17 19:41:09 +08:00
|
|
|
[self pushMatchVCWithKey:@"bag"];
|
2021-09-16 19:30:22 +08:00
|
|
|
break;
|
|
|
|
case XPMineItemType_Match_Shopping:
|
2021-09-17 19:41:09 +08:00
|
|
|
[self pushMatchVCWithKey:@"mall"];
|
2021-09-16 19:30:22 +08:00
|
|
|
break;
|
|
|
|
case XPMineItemType_Match_Relevance_Account:
|
2021-09-17 19:41:09 +08:00
|
|
|
[self pushWebViewWIthUrl:URLWithType(kGameBindAccountURL)];
|
2021-09-16 19:30:22 +08:00
|
|
|
break;
|
|
|
|
case XPMineItemType_Teenager_Mode:
|
2021-09-22 18:30:15 +08:00
|
|
|
{
|
|
|
|
XPMineTeenagerViewController * vc = [[XPMineTeenagerViewController alloc] init];
|
|
|
|
vc.userInfo = self.userInfo;
|
|
|
|
[self.navigationController pushViewController:vc animated:YES];
|
|
|
|
}
|
2021-09-16 19:30:22 +08:00
|
|
|
break;
|
|
|
|
case XPMineItemType_Real_Name_Authentic:
|
2021-09-17 19:41:09 +08:00
|
|
|
[self pushWebViewWIthUrl:URLWithType(kIdentityURL)];
|
|
|
|
break;
|
|
|
|
case XPMineItemType_Account:
|
2021-09-24 19:17:19 +08:00
|
|
|
{
|
2021-10-25 10:22:40 +08:00
|
|
|
XPMineRechargeViewController * rechargeVC = [[XPMineRechargeViewController alloc] init];
|
|
|
|
[self.navigationController pushViewController:rechargeVC animated:YES];
|
2021-09-24 19:17:19 +08:00
|
|
|
}
|
2021-09-17 19:41:09 +08:00
|
|
|
break;
|
|
|
|
case XPMineItemType_Invite_Friend:
|
|
|
|
[self pushWebViewWIthUrl:URLWithType(kUserInviteFriendURL)];
|
|
|
|
break;
|
|
|
|
case XPMineItemType_Personinfo:
|
2021-09-23 18:38:33 +08:00
|
|
|
{
|
|
|
|
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
|
|
|
|
infoVC.uid = self.userInfo.uid;
|
|
|
|
[self.navigationController pushViewController:infoVC animated:YES];
|
|
|
|
}
|
2021-09-16 19:30:22 +08:00
|
|
|
break;
|
2021-11-04 15:27:11 +08:00
|
|
|
case XPMineItemType_My_Room:
|
|
|
|
{
|
|
|
|
NSString* roomUid = [NSString stringWithFormat:@"%ld", (long)self.userInfo.uid];
|
|
|
|
[XPRoomViewController openRoom:roomUid viewController:self];
|
|
|
|
}
|
|
|
|
break;
|
2021-12-16 19:02:31 +08:00
|
|
|
case XPMineItemType_My_Dressup:
|
|
|
|
{
|
|
|
|
XPMineDressUpViewController * dressUpVC = [[XPMineDressUpViewController alloc] init];
|
|
|
|
[self.navigationController pushViewController:dressUpVC animated:YES];
|
|
|
|
}
|
|
|
|
break;
|
2021-12-21 18:10:33 +08:00
|
|
|
case XPMineItemType_Fans_List:
|
|
|
|
{
|
|
|
|
XPMineFansViewController * fansVC = [[XPMineFansViewController alloc] init];
|
|
|
|
[self.navigationController pushViewController:fansVC animated:YES];
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case XPMineItemType_Attention_List:
|
|
|
|
{
|
|
|
|
XPMineAttentionViewController * attentionVC = [[XPMineAttentionViewController alloc] init];
|
|
|
|
[self.navigationController pushViewController:attentionVC animated:YES];
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case XPMineItemType_My_Level:
|
|
|
|
[self pushWebViewWIthUrl:URLWithType(kUserLevelURL)];
|
|
|
|
break;
|
2021-12-28 17:32:27 +08:00
|
|
|
case XPMineItemType_Noble_Center:
|
|
|
|
{
|
|
|
|
XPNobleCenterViewController *nobleCenterVC = [[XPNobleCenterViewController alloc] init];
|
|
|
|
[self.navigationController pushViewController:nobleCenterVC animated:YES];
|
2022-01-19 18:58:30 +08:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case XPMineItemType_Skill_Card:
|
|
|
|
{
|
|
|
|
XPSkillCardViewController *skillCardVC = [[XPSkillCardViewController alloc] init];
|
|
|
|
skillCardVC.uid = self.userInfo.uid;
|
|
|
|
[self.navigationController pushViewController:skillCardVC animated:YES];
|
2021-12-28 17:32:27 +08:00
|
|
|
}
|
|
|
|
break;
|
2021-09-16 19:30:22 +08:00
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
2021-09-17 19:41:09 +08:00
|
|
|
|
|
|
|
- (void)pushWebViewWIthUrl:(NSString *)url {
|
|
|
|
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
|
|
|
webVC.url = url;
|
|
|
|
[self.navigationController pushViewController:webVC animated:YES];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)pushMatchVCWithKey:(NSString *)key {
|
|
|
|
[[FlutterBoost instance] open:key arguments:@{@"animated":@(YES)} completion:^(BOOL success) {
|
|
|
|
}];
|
|
|
|
}
|
|
|
|
|
2021-09-16 19:30:22 +08:00
|
|
|
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
|
|
|
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
|
|
|
if (section == 0) {
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return self.datasource.count;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
|
|
if (indexPath.section == 0) {
|
2022-01-19 16:04:46 +08:00
|
|
|
return 96;
|
2021-09-16 19:30:22 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
return 53;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
|
|
if (indexPath.section == 0) {
|
2022-01-19 16:04:46 +08:00
|
|
|
XPMineHeadItemTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineHeadItemTableViewCell class])];
|
2021-09-16 19:30:22 +08:00
|
|
|
if (cell == nil) {
|
2022-01-19 16:04:46 +08:00
|
|
|
cell = [[XPMineHeadItemTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineHeadItemTableViewCell class])];
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
2022-01-19 16:04:46 +08:00
|
|
|
cell.datasource = self.cardItemArray;
|
2021-09-16 19:30:22 +08:00
|
|
|
cell.delegate = self;
|
|
|
|
return cell;
|
|
|
|
} else {
|
|
|
|
XPMineMenuTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineMenuTableViewCell class])];
|
|
|
|
if (cell == nil) {
|
|
|
|
cell = [[XPMineMenuTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineMenuTableViewCell class])];
|
|
|
|
}
|
|
|
|
XPMineItemModel * item = [self.datasource objectAtIndex:indexPath.row];
|
|
|
|
cell.itemModel = item;
|
|
|
|
return cell;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
|
|
|
|
if (section == 1) {
|
2022-01-19 16:29:07 +08:00
|
|
|
return 13;
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
2022-01-19 16:29:07 +08:00
|
|
|
return 16;
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
|
|
|
|
UIView * view = [[UIView alloc] init];
|
|
|
|
view.backgroundColor = [UIColor clearColor];
|
|
|
|
return view;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
|
|
|
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
|
|
|
XPMineItemModel * model = [self.datasource objectAtIndex:indexPath.row];
|
|
|
|
[self pushViewControllerWithType:model.type];
|
|
|
|
}
|
|
|
|
#pragma mark - XPMineHeadViewDelegate
|
|
|
|
///点击头像
|
|
|
|
- (void)xPMineHeadView:(XPMineHeadView *)view didClickAvatar:(UserInfoModel *)info {
|
2021-09-17 19:41:09 +08:00
|
|
|
[self pushViewControllerWithType:XPMineItemType_Personinfo];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)xPMineHeadView:(XPMineHeadView *)view didClickAccount:(UserInfoModel *)info {
|
|
|
|
[self pushViewControllerWithType:XPMineItemType_Account];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)xPMineHeadView:(XPMineHeadView *)view didClickInviteFriend:(UserInfoModel *)info {
|
|
|
|
[self pushViewControllerWithType:XPMineItemType_Invite_Friend];
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
|
|
|
|
2021-12-21 18:10:33 +08:00
|
|
|
- (void)xpMineHeadViewClickFans {
|
|
|
|
[self pushViewControllerWithType:XPMineItemType_Fans_List];
|
|
|
|
}
|
|
|
|
|
|
|
|
- (void)xpMineHeadViewClickAttention {
|
|
|
|
[self pushViewControllerWithType:XPMineItemType_Attention_List];
|
|
|
|
}
|
2022-01-06 17:50:59 +08:00
|
|
|
|
|
|
|
- (void)xPMineHeadViewCliekNobleCenter {
|
2022-01-11 11:28:04 +08:00
|
|
|
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventvipEntranceMeClick];
|
2022-01-06 17:50:59 +08:00
|
|
|
[self pushViewControllerWithType:XPMineItemType_Noble_Center];
|
|
|
|
}
|
|
|
|
|
2021-09-16 19:30:22 +08:00
|
|
|
#pragma mark - XPMineProtocol
|
|
|
|
- (void)onGetNormalItemsSuccess:(NSArray<XPMineItemModel *> *)normalItems {
|
|
|
|
self.datasource = normalItems;
|
|
|
|
[self.tableView reloadData];
|
|
|
|
}
|
|
|
|
|
2022-01-19 16:04:46 +08:00
|
|
|
- (void)onGetCardItemsSuccess:(NSArray<XPMineItemModel *> *)cardItems {
|
|
|
|
self.cardItemArray = cardItems;
|
|
|
|
[self.tableView reloadData];
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
|
2021-09-18 20:05:02 +08:00
|
|
|
self.userInfo = userInfo;
|
2021-09-16 19:30:22 +08:00
|
|
|
self.headView.userInfo = userInfo;
|
2022-01-19 16:29:07 +08:00
|
|
|
[self.tableView reloadData];
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
2022-01-19 16:04:46 +08:00
|
|
|
|
|
|
|
#pragma mark - XPMineHeadItemTableViewCellDelegate
|
|
|
|
- (void)xPMineHeadItemTableViewCell:(XPMineHeadItemTableViewCell *)cell didSelectItem:(XPMineItemModel *)item {
|
|
|
|
[self pushViewControllerWithType:item.type];
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
2022-01-19 16:04:46 +08:00
|
|
|
|
2021-09-16 19:30:22 +08:00
|
|
|
#pragma mark - Getters And Setters
|
|
|
|
- (UITableView *)tableView {
|
|
|
|
if (!_tableView) {
|
|
|
|
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
|
|
|
_tableView.delegate = self;
|
|
|
|
_tableView.dataSource = self;
|
|
|
|
_tableView.showsVerticalScrollIndicator = NO;
|
|
|
|
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
|
|
|
[_tableView registerClass:[XPMineMenuTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineMenuTableViewCell class])];
|
2022-01-19 16:04:46 +08:00
|
|
|
[_tableView registerClass:[XPMineHeadItemTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineHeadItemTableViewCell class])];
|
2021-09-16 19:30:22 +08:00
|
|
|
_tableView.backgroundColor = [UIColor clearColor];
|
|
|
|
}
|
|
|
|
return _tableView;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (XPMineHeadView *)headView {
|
|
|
|
if (!_headView) {
|
2022-01-06 17:50:59 +08:00
|
|
|
CGFloat nobleH = (KScreenWidth - 30.0)/ 345.0 * 44;
|
2022-01-19 16:04:46 +08:00
|
|
|
_headView = [[XPMineHeadView alloc] initWithFrame:CGRectMake(0, 0,KScreenWidth , 123 + nobleH + kSafeAreaTopHeight)];
|
2021-09-16 19:30:22 +08:00
|
|
|
_headView.delegate = self;
|
|
|
|
}
|
|
|
|
return _headView;
|
|
|
|
}
|
|
|
|
|
|
|
|
- (UIButton *)settingButton {
|
|
|
|
if (!_settingButton) {
|
|
|
|
_settingButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
|
|
|
[_settingButton setImage:[UIImage imageNamed:@"mine_nav_setting"] forState:UIControlStateNormal];
|
|
|
|
[_settingButton setImage:[UIImage imageNamed:@"mine_nav_setting"] forState:UIControlStateSelected];
|
|
|
|
[_settingButton addTarget:self action:@selector(settingButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
2021-09-17 19:41:09 +08:00
|
|
|
[_settingButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
2021-09-16 19:30:22 +08:00
|
|
|
}
|
|
|
|
return _settingButton;
|
|
|
|
}
|
|
|
|
|
2022-01-19 16:04:46 +08:00
|
|
|
- (UIView *)bgImageView {
|
|
|
|
if (!_bgImageView) {
|
|
|
|
_bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"mine_head_bg"]];
|
|
|
|
_bgImageView.contentMode = UIViewContentModeScaleAspectFill;
|
|
|
|
}
|
|
|
|
return _bgImageView;
|
|
|
|
}
|
2021-09-16 19:30:22 +08:00
|
|
|
|
2022-01-19 16:29:07 +08:00
|
|
|
- (XPMineSkillTipView *)skillTipView {
|
|
|
|
if (!_skillTipView) {
|
|
|
|
_skillTipView = [[XPMineSkillTipView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)];
|
|
|
|
}
|
|
|
|
return _skillTipView;
|
|
|
|
}
|
|
|
|
|
2021-09-16 19:30:22 +08:00
|
|
|
@end
|