85 lines
3.5 KiB
Mathematica
85 lines
3.5 KiB
Mathematica
|
|
//
|
||
|
|
// QXCornRecordViewController.m
|
||
|
|
// QXLive
|
||
|
|
//
|
||
|
|
// Created by 启星 on 2025/5/26.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import "QXCornRecordViewController.h"
|
||
|
|
#import "JXCategoryView.h"
|
||
|
|
#import "QXCornRecordSubViewController.h"
|
||
|
|
|
||
|
|
@interface QXCornRecordViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
|
||
|
|
@property (nonatomic,strong)JXCategoryTitleView *categoryView;
|
||
|
|
@property (nonatomic,strong)JXCategoryListContainerView *containerView;
|
||
|
|
@property (nonatomic,strong)NSMutableArray <UIViewController*>*listVCArray;
|
||
|
|
@property (nonatomic,strong)NSArray *titles;
|
||
|
|
@end
|
||
|
|
|
||
|
|
@implementation QXCornRecordViewController
|
||
|
|
|
||
|
|
- (void)viewDidLoad {
|
||
|
|
[super viewDidLoad];
|
||
|
|
// Do any additional setup after loading the view.
|
||
|
|
}
|
||
|
|
-(void)setNavgationItems{
|
||
|
|
[super setNavgationItems];
|
||
|
|
if (self.type == 0) {
|
||
|
|
self.navigationItem.title = QXText(@"金币收支");
|
||
|
|
}else{
|
||
|
|
self.navigationItem.title = QXText(@"钻石收支");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
-(void)initSubViews{
|
||
|
|
self.view.backgroundColor = [UIColor whiteColor];
|
||
|
|
if (self.type == 0) {
|
||
|
|
self.titles = @[QXText(@"金币收入"),QXText(@"金币支出")];
|
||
|
|
}else{
|
||
|
|
self.titles = @[QXText(@"钻石收入"),QXText(@"钻石支出")];
|
||
|
|
}
|
||
|
|
self.listVCArray = [NSMutableArray array];
|
||
|
|
self.categoryView = [[JXCategoryTitleView alloc] init];
|
||
|
|
self.categoryView.frame = CGRectMake(0, kSafeAreaTop+44, SCREEN_WIDTH, 44);
|
||
|
|
self.categoryView.delegate = self;
|
||
|
|
self.categoryView.titles = self.titles;
|
||
|
|
self.categoryView.backgroundColor = [UIColor whiteColor];
|
||
|
|
self.categoryView.titleSelectedColor = [UIColor colorWithHexString:@"#333333"];
|
||
|
|
self.categoryView.titleColor = [UIColor colorWithHexString:@"#666666"];
|
||
|
|
self.categoryView.cellWidth = 70;
|
||
|
|
self.categoryView.contentEdgeInsetLeft = 16;
|
||
|
|
self.categoryView.cellSpacing = 12;
|
||
|
|
// self.categoryView.titleLabelZoomScale = 1.1;
|
||
|
|
self.categoryView.titleLabelZoomEnabled = YES;
|
||
|
|
self.categoryView.titleFont = [UIFont boldSystemFontOfSize:14];
|
||
|
|
self.categoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:16];
|
||
|
|
self.categoryView.averageCellSpacingEnabled = NO;
|
||
|
|
JXCategoryIndicatorImageView *indicatorView = [[JXCategoryIndicatorImageView alloc] init];
|
||
|
|
indicatorView.indicatorImageView.image = [UIImage imageNamed:@"home_slider"];
|
||
|
|
indicatorView.indicatorImageViewSize = CGSizeMake(58, 8);
|
||
|
|
indicatorView.verticalMargin = 11;
|
||
|
|
self.categoryView.indicators = @[indicatorView];
|
||
|
|
self.containerView = [[JXCategoryListContainerView alloc] initWithType:(JXCategoryListContainerType_ScrollView) delegate:self];
|
||
|
|
self.containerView.frame = CGRectMake(0, self.categoryView.bottom, SCREEN_WIDTH, SCREEN_HEIGHT-self.categoryView.bottom);
|
||
|
|
[self.view addSubview:self.categoryView];
|
||
|
|
[self.view addSubview:self.containerView];
|
||
|
|
self.categoryView.listContainer = self.containerView;
|
||
|
|
[self requestMineUserInfoData];
|
||
|
|
}
|
||
|
|
- (void)requestMineUserInfoData {
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
-(NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{
|
||
|
|
return self.titles.count;
|
||
|
|
}
|
||
|
|
-(id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index{
|
||
|
|
QXCornRecordSubViewController *vc = [[QXCornRecordSubViewController alloc] init];
|
||
|
|
vc.waterType = self.type;
|
||
|
|
vc.type = index;
|
||
|
|
return vc;
|
||
|
|
}
|
||
|
|
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
|
||
|
|
self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
|
||
|
|
}
|
||
|
|
@end
|