Commit a1310b86 by xuning

订单状态筛选UI定制开发

parent 6dfb7c2a
......@@ -15,6 +15,11 @@
7981EACA2B6F59E800F357E7 /* XVPasswordViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EAC92B6F59E800F357E7 /* XVPasswordViewController.m */; };
7981EACF2B6F63CF00F357E7 /* XVMainJobViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EACE2B6F63CF00F357E7 /* XVMainJobViewController.m */; };
7981EAD32B6F656900F357E7 /* XVCustomBarView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EAD22B6F656900F357E7 /* XVCustomBarView.m */; };
7981EAD92B6FB53E00F357E7 /* XVNewJobViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EAD82B6FB53E00F357E7 /* XVNewJobViewController.m */; };
7981EAED2B6FC05B00F357E7 /* XVCategoryTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EAEC2B6FC05B00F357E7 /* XVCategoryTitleView.m */; };
7981EAF02B6FC07800F357E7 /* XVCategoryTitleCellModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EAEF2B6FC07800F357E7 /* XVCategoryTitleCellModel.m */; };
7981EAF32B6FC08F00F357E7 /* XVCategoryTitleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EAF22B6FC08F00F357E7 /* XVCategoryTitleCell.m */; };
7981EAF62B6FD62200F357E7 /* XVOrderSortView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EAF52B6FD62200F357E7 /* XVOrderSortView.m */; };
799DF0C62B6BD8AF00680907 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 799DF0C52B6BD8AF00680907 /* AppDelegate.m */; };
799DF0D12B6BD8B100680907 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 799DF0D02B6BD8B100680907 /* Assets.xcassets */; };
799DF0D42B6BD8B100680907 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 799DF0D22B6BD8B100680907 /* LaunchScreen.storyboard */; };
......@@ -53,6 +58,16 @@
7981EACE2B6F63CF00F357E7 /* XVMainJobViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVMainJobViewController.m; sourceTree = "<group>"; };
7981EAD12B6F656900F357E7 /* XVCustomBarView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVCustomBarView.h; sourceTree = "<group>"; };
7981EAD22B6F656900F357E7 /* XVCustomBarView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVCustomBarView.m; sourceTree = "<group>"; };
7981EAD72B6FB53E00F357E7 /* XVNewJobViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVNewJobViewController.h; sourceTree = "<group>"; };
7981EAD82B6FB53E00F357E7 /* XVNewJobViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVNewJobViewController.m; sourceTree = "<group>"; };
7981EAEB2B6FC05B00F357E7 /* XVCategoryTitleView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVCategoryTitleView.h; sourceTree = "<group>"; };
7981EAEC2B6FC05B00F357E7 /* XVCategoryTitleView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVCategoryTitleView.m; sourceTree = "<group>"; };
7981EAEE2B6FC07800F357E7 /* XVCategoryTitleCellModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVCategoryTitleCellModel.h; sourceTree = "<group>"; };
7981EAEF2B6FC07800F357E7 /* XVCategoryTitleCellModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVCategoryTitleCellModel.m; sourceTree = "<group>"; };
7981EAF12B6FC08F00F357E7 /* XVCategoryTitleCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVCategoryTitleCell.h; sourceTree = "<group>"; };
7981EAF22B6FC08F00F357E7 /* XVCategoryTitleCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVCategoryTitleCell.m; sourceTree = "<group>"; };
7981EAF42B6FD62200F357E7 /* XVOrderSortView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVOrderSortView.h; sourceTree = "<group>"; };
7981EAF52B6FD62200F357E7 /* XVOrderSortView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVOrderSortView.m; sourceTree = "<group>"; };
799DF0C12B6BD8AF00680907 /* fastservice.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = fastservice.app; sourceTree = BUILT_PRODUCTS_DIR; };
799DF0C42B6BD8AF00680907 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
799DF0C52B6BD8AF00680907 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
......@@ -118,6 +133,7 @@
7981EACB2B6F635F00F357E7 /* Main */ = {
isa = PBXGroup;
children = (
7981EAEA2B6FC02F00F357E7 /* CustomCategoryView */,
7981EAD02B6F655500F357E7 /* View */,
7981EACC2B6F636600F357E7 /* Controller */,
);
......@@ -129,6 +145,8 @@
children = (
7981EACD2B6F63CF00F357E7 /* XVMainJobViewController.h */,
7981EACE2B6F63CF00F357E7 /* XVMainJobViewController.m */,
7981EAD72B6FB53E00F357E7 /* XVNewJobViewController.h */,
7981EAD82B6FB53E00F357E7 /* XVNewJobViewController.m */,
);
path = Controller;
sourceTree = "<group>";
......@@ -138,10 +156,25 @@
children = (
7981EAD12B6F656900F357E7 /* XVCustomBarView.h */,
7981EAD22B6F656900F357E7 /* XVCustomBarView.m */,
7981EAF42B6FD62200F357E7 /* XVOrderSortView.h */,
7981EAF52B6FD62200F357E7 /* XVOrderSortView.m */,
);
path = View;
sourceTree = "<group>";
};
7981EAEA2B6FC02F00F357E7 /* CustomCategoryView */ = {
isa = PBXGroup;
children = (
7981EAEB2B6FC05B00F357E7 /* XVCategoryTitleView.h */,
7981EAEC2B6FC05B00F357E7 /* XVCategoryTitleView.m */,
7981EAEE2B6FC07800F357E7 /* XVCategoryTitleCellModel.h */,
7981EAEF2B6FC07800F357E7 /* XVCategoryTitleCellModel.m */,
7981EAF12B6FC08F00F357E7 /* XVCategoryTitleCell.h */,
7981EAF22B6FC08F00F357E7 /* XVCategoryTitleCell.m */,
);
path = CustomCategoryView;
sourceTree = "<group>";
};
799DF0B82B6BD8AE00680907 = {
isa = PBXGroup;
children = (
......@@ -456,10 +489,15 @@
7981EACA2B6F59E800F357E7 /* XVPasswordViewController.m in Sources */,
7981EABD2B6E675F00F357E7 /* NSString+XVAdd.m in Sources */,
799DF0F72B6BDA1400680907 /* BRPlaceholderTextView.m in Sources */,
7981EAF02B6FC07800F357E7 /* XVCategoryTitleCellModel.m in Sources */,
799DF0F82B6BDA1400680907 /* NSString+Unicode.m in Sources */,
799DF0D72B6BD8B100680907 /* main.m in Sources */,
7981EAF32B6FC08F00F357E7 /* XVCategoryTitleCell.m in Sources */,
7981EAF62B6FD62200F357E7 /* XVOrderSortView.m in Sources */,
7981EAC42B6E800900F357E7 /* XVInputFieldView.m in Sources */,
7981EAD92B6FB53E00F357E7 /* XVNewJobViewController.m in Sources */,
799DF11A2B6D2B3200680907 /* XVLoginViewController.m in Sources */,
7981EAED2B6FC05B00F357E7 /* XVCategoryTitleView.m in Sources */,
799DF0FB2B6BDA1400680907 /* WRNavigationBar.m in Sources */,
799DF1102B6D25B400680907 /* UIBarButtonItem+SXCreate.m in Sources */,
799DF10F2B6D25B400680907 /* UINavigation+SXFixSpace.m in Sources */,
......
......@@ -7,7 +7,7 @@
<key>fastservice.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>17</integer>
<integer>18</integer>
</dict>
</dict>
</dict>
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "arrow_down.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "arrow_up.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fas fa-sort@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "filter.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "semiDesign-semi-icons-route@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -8,14 +8,19 @@
#import "XVMainJobViewController.h"
#import "XVCustomBarView.h"
#import "XVCategoryTitleView.h"
#import "XVNewJobViewController.h"
#import "XVOrderSortView.h"
@interface XVMainJobViewController ()<UITextFieldDelegate>
@interface XVMainJobViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
@property (nonatomic, strong) XVCustomBarView *barView;
@property (nonatomic, strong) UITextField *searchField;
@property (nonatomic, strong) XVCategoryTitleView *categoryView;
@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
@property (nonatomic, strong) XVOrderSortView *sortView;
......@@ -31,8 +36,64 @@
- (void)setupUI {
[self.view addSubview:self.barView];
[self.view addSubview:self.categoryView];
[self.view addSubview:self.listContainerView];
[self.view addSubview:self.sortView];
[self.sortView addRoundedCorners:(UIRectCornerBottomLeft | UIRectCornerBottomRight) withRadii:CGSizeMake(10, 10)];
}
// 点击选中或者滚动选中都会调用该方法。适用于只关心选中事件,不关心具体是点击还是滚动选中的。
- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index {
}
// 点击选中的情况才会调用该方法
- (void)categoryView:(JXCategoryBaseView *)categoryView didClickSelectedItemAtIndex:(NSInteger)index {
if (index == 0 && categoryView.selectedIndex == 0) {
self.sortView.backgroundColor = [UIColor whiteColor];
if(self.sortView.hidden) {
self.sortView.hidden = NO;
}else{
self.sortView.hidden = YES;
}
}else{
self.sortView.hidden = YES;
}
if(index == 4) {
// 路线规划
}
}
// 滚动选中的情况才会调用该方法
- (void)categoryView:(JXCategoryBaseView *)categoryView didScrollSelectedItemAtIndex:(NSInteger)index {
}
// 正在滚动中的回调
- (void)categoryView:(JXCategoryBaseView *)categoryView scrollingFromLeftIndex:(NSInteger)leftIndex toRightIndex:(NSInteger)rightIndex ratio:(CGFloat)ratio {
}
// 返回列表的数量
- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView {
return self.categoryView.titles.count;
}
// 根据下标 index 返回对应遵守并实现 `JXCategoryListContentViewDelegate` 协议的列表实例
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
return [[XVNewJobViewController alloc] init];
}
- (BOOL)fd_prefersNavigationBarHidden {
return YES;
}
......@@ -47,27 +108,55 @@
}
return _barView;
}
- (UITextField *)searchField {
if(_searchField == nil) {
_searchField = [[UITextField alloc]init];
[_searchField setValue: F_BBBBBB_COLOR forKeyPath:@"placeholderLabel.textColor"];
[_searchField setValue:[UIFont systemFontOfSize:14] forKeyPath:@"placeholderLabel.font"];
_searchField.font = [UIFont systemFontOfSize:14.0f];
_searchField.placeholder = @"输入订单号手机号地址商户信息快速查找";
_searchField.textColor = [UIColor blackColor];
_searchField.delegate = self;
_searchField.backgroundColor = [UIColor whiteColor];
_searchField.leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 20, 35)];
_searchField.leftViewMode = UITextFieldViewModeAlways;
_searchField.returnKeyType = UIReturnKeySearch;
_searchField.clearButtonMode = UITextFieldViewModeAlways;
[_searchField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
- (XVCategoryTitleView *)categoryView {
if(_categoryView == nil) {
_categoryView = [[XVCategoryTitleView alloc] initWithFrame:CGRectMake(0, self.barView.height, SCREEN_WIDTH, 50)];
_categoryView.titleColor = F_415058_COLOR;
_categoryView.titleSelectedColor = COLOR_THEMEGRENN;
_categoryView.titleFont = [UIFont systemFontOfSize:14];
_categoryView.titleSelectedFont = [UIFont systemFontOfSize:14];
_categoryView.backgroundColor = [UIColor whiteColor];
_categoryView.delegate = self;
kViewBorderRadius(self.searchField, 35/2, 0, [UIColor clearColor]);
_categoryView.titles = @[@"新任务", @"待取货", @"配送中",@"已取消",@"路线"];
_categoryView.uiTypes = @{@(0) : @(XVCategoryTitleUIType_SingleImage),
@(1) : @(XVCategoryTitleUIType_None),
@(2) : @(XVCategoryTitleUIType_None),
@(3) : @(XVCategoryTitleUIType_None),
@(4) : @(XVCategoryTitleUIType_SingleImage)}.mutableCopy;
_categoryView.imageLocations = @{@(0) : @(XVCategoryTitleImageLocation_Right),
@(4) : @(XVCategoryTitleImageLocation_Left)}.mutableCopy;
_categoryView.singleImages = @{@(0) : [UIImage imageNamed:@"fas fa-sort"],
@(4) : [UIImage imageNamed:@"semiDesign-semi-icons-route"]}.mutableCopy;
JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
lineView.indicatorColor = COLOR_THEMEGRENN;
lineView.indicatorWidth = JXCategoryViewAutomaticDimension;
_categoryView.indicators = @[lineView];
_categoryView.listContainer = self.listContainerView;
}
return _searchField;
return _categoryView;
}
- (JXCategoryListContainerView *)listContainerView {
if(_listContainerView == nil) {
_listContainerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
_listContainerView.frame = CGRectMake(0, self.barView.height + 50, SCREEN_WIDTH, SCREEN_HEIGHT-self.barView.height - 50);
_listContainerView.scrollView.scrollEnabled = YES;
}
return _listContainerView;
}
- (XVOrderSortView *)sortView {
if(_sortView == nil) {
_sortView = [[XVOrderSortView alloc]initWithFrame:CGRectMake(0, self.barView.height + self.categoryView.height, SCREEN_WIDTH, 115)];
_sortView.backgroundColor = [UIColor whiteColor];
_sortView.hidden = YES;
}
return _sortView;
}
@end
//
// XVNewJobViewController.h
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVBaseViewController.h"
#import "JXCategoryListContainerView.h"
NS_ASSUME_NONNULL_BEGIN
@interface XVNewJobViewController : XVBaseViewController<JXCategoryListContentViewDelegate>
@end
NS_ASSUME_NONNULL_END
//
// XVNewJobViewController.m
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVNewJobViewController.h"
@interface XVNewJobViewController ()<UITextFieldDelegate>
@property (nonatomic, strong) UITextField *searchField;
@end
@implementation XVNewJobViewController
#pragma mark - JXCategoryListContentViewDelegate
/**
实现 <JXCategoryListContentViewDelegate> 协议方法,返回该视图控制器所拥有的「视图」
*/
- (UIView *)listView {
return self.view;
}
- (void)viewDidLoad {
[super viewDidLoad];
self.view.backgroundColor = kRandomColor;
}
- (UITextField *)searchField {
if(_searchField == nil) {
_searchField = [[UITextField alloc]init];
[_searchField setValue: F_BBBBBB_COLOR forKeyPath:@"placeholderLabel.textColor"];
[_searchField setValue:[UIFont systemFontOfSize:14] forKeyPath:@"placeholderLabel.font"];
_searchField.font = [UIFont systemFontOfSize:14.0f];
_searchField.placeholder = @"输入订单号手机号地址商户信息快速查找";
_searchField.textColor = [UIColor blackColor];
_searchField.delegate = self;
_searchField.backgroundColor = [UIColor whiteColor];
_searchField.leftView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 20, 35)];
_searchField.leftViewMode = UITextFieldViewModeAlways;
_searchField.returnKeyType = UIReturnKeySearch;
_searchField.clearButtonMode = UITextFieldViewModeAlways;
[_searchField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
kViewBorderRadius(self.searchField, 35/2, 0, [UIColor clearColor]);
}
return _searchField;
}
@end
//
// XVCategoryTitleCell.h
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import <JXCategoryView/JXCategoryView.h>
NS_ASSUME_NONNULL_BEGIN
@interface XVCategoryTitleCell : JXCategoryTitleCell
@end
NS_ASSUME_NONNULL_END
//
// XVCategoryTitleCell.m
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVCategoryTitleCell.h"
#import "XVCategoryTitleCellModel.h"
@interface XVCategoryTitleCell()
@property (nonatomic, strong) UIImageView *singleImageView;
@end
@implementation XVCategoryTitleCell
- (void)initializeViews {
[super initializeViews];
self.titleLabelCenterX.active = NO;
self.maskTitleLabelCenterX.active = NO;
self.titleLabelCenterX.active = NO;
self.maskTitleLabelCenterX.active = NO;
self.singleImageView = [[UIImageView alloc] init];
self.singleImageView.contentMode = UIViewContentModeScaleAspectFit;
self.singleImageView.hidden = YES;
[self.contentView addSubview:self.singleImageView];
}
- (void)reloadData:(JXCategoryBaseCellModel *)cellModel {
[super reloadData:cellModel];
self.singleImageView.hidden = YES;
XVCategoryTitleCellModel *myCellModel = (XVCategoryTitleCellModel *)cellModel;
if (myCellModel.uiType == XVCategoryTitleUIType_SingleImage) {
if(myCellModel.imageLocation == XVCategoryTitleImageLocation_Right) {
[self.singleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.contentView);
make.left.mas_equalTo(self.titleLabel.mas_right).mas_offset(1);
make.size.mas_equalTo(CGSizeMake(10, 10));
}];
}else{
[self.singleImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.contentView);
make.left.mas_equalTo(self.contentView);
make.size.mas_equalTo(CGSizeMake(16, 16));
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.contentView);
make.left.mas_equalTo(self.singleImageView.mas_right).mas_offset(1);
}];
}
self.singleImageView.hidden = NO;
self.singleImageView.image = myCellModel.singleImage;
}
}
@end
//
// XVCategoryTitleCellModel.h
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import <JXCategoryView/JXCategoryView.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, XVCategoryTitleUIType) {
XVCategoryTitleUIType_None, // 纯文字
XVCategoryTitleUIType_SingleImage, // 文字+图片
};
typedef NS_ENUM(NSUInteger, XVCategoryTitleImageLocation) {
XVCategoryTitleImageLocation_Left,// 图片+文字
XVCategoryTitleImageLocation_Right, // 文字+图片
};
@interface XVCategoryTitleCellModel : JXCategoryTitleCellModel
@property (nonatomic, assign) XVCategoryTitleUIType uiType;
@property (nonatomic, assign) XVCategoryTitleImageLocation imageLocation;
@property (nonatomic, strong) UIImage *singleImage;
@end
NS_ASSUME_NONNULL_END
//
// XVCategoryTitleCellModel.m
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVCategoryTitleCellModel.h"
@implementation XVCategoryTitleCellModel
@end
//
// XVCategoryTitleView.h
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import <JXCategoryView/JXCategoryView.h>
#import "XVCategoryTitleCell.h"
#import "XVCategoryTitleCellModel.h"
NS_ASSUME_NONNULL_BEGIN
@interface XVCategoryTitleView : JXCategoryTitleView
//@(index):@(XVCategoryTitleUIType)
@property (nonatomic, strong) NSMutableDictionary<NSNumber *, NSNumber *> *uiTypes;
//@(index):@(XVCategoryTitleImageLocation)
@property (nonatomic, strong) NSMutableDictionary<NSNumber *, NSNumber *> *imageLocations;
//@(index):UIImage
@property (nonatomic, strong) NSMutableDictionary<NSNumber *, UIImage *> *singleImages;
@end
NS_ASSUME_NONNULL_END
//
// XVCategoryTitleView.m
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVCategoryTitleView.h"
@implementation XVCategoryTitleView
- (void)initializeData {
[super initializeData];
}
//返回自定义的cell class
- (Class)preferredCellClass {
return [XVCategoryTitleCell class];
}
- (void)refreshDataSource {
NSMutableArray *tempArray = [NSMutableArray array];
for (int i = 0; i < self.titles.count; i++) {
XVCategoryTitleCellModel *cellModel = [[XVCategoryTitleCellModel alloc] init];
[tempArray addObject:cellModel];
}
self.dataSource = tempArray;
}
- (void)refreshCellModel:(JXCategoryBaseCellModel *)cellModel index:(NSInteger)index {
[super refreshCellModel:cellModel index:index];
XVCategoryTitleCellModel *myModel = (XVCategoryTitleCellModel *)cellModel;
myModel.uiType = (XVCategoryTitleUIType)(self.uiTypes[@(index)].integerValue);
myModel.imageLocation = (XVCategoryTitleImageLocation)(self.imageLocations[@(index)].integerValue);
myModel.singleImage = self.singleImages[@(index)];
}
- (CGFloat)preferredCellWidthAtIndex:(NSInteger)index {
CGFloat cellWidth = [super preferredCellWidthAtIndex:index];
XVCategoryTitleUIType uiType = (XVCategoryTitleUIType)(self.uiTypes[@(index)].integerValue);
if (uiType == XVCategoryTitleUIType_None) {
return cellWidth;
}
return cellWidth + 3 + 10;
}
@end
//
// XVOrderSortView.h
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XVOrderSortView : UIView
@end
NS_ASSUME_NONNULL_END
//
// XVOrderSortView.m
// fastservice
//
// Created by xuning on 2/4/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVOrderSortView.h"
@implementation XVOrderSortView
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
}
*/
@end
......@@ -38,7 +38,7 @@
#define RGBAColor(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]
#define kHexRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0 blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define kRandomColor KRGB(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256))
#define kRandomColor RGBAColor(arc4random_uniform(256), arc4random_uniform(256), arc4random_uniform(256),1)
#define COLOR_THEMEGRENN [UIColor colorWithHexString:@"#4EB97B"]
......
......@@ -20,7 +20,7 @@ target 'fastservice' do
pod 'DZNEmptyDataSet'
pod 'IQKeyboardManager'
pod 'BRPickerView'
pod 'JXCategoryView'
pod 'Bugly'
pod 'BMKLocationKit'
......
......@@ -42,6 +42,7 @@ PODS:
- Bugly (2.5.93)
- DZNEmptyDataSet (1.8.1)
- IQKeyboardManager (6.5.11)
- JXCategoryView (1.6.1)
- LEEAlert (1.6.4)
- Masonry (1.1.0)
- MBProgressHUD (1.2.0)
......@@ -68,6 +69,7 @@ DEPENDENCIES:
- Bugly
- DZNEmptyDataSet
- IQKeyboardManager
- JXCategoryView
- LEEAlert
- Masonry
- MBProgressHUD
......@@ -87,6 +89,7 @@ SPEC REPOS:
- Bugly
- DZNEmptyDataSet
- IQKeyboardManager
- JXCategoryView
- LEEAlert
- Masonry
- MBProgressHUD
......@@ -105,6 +108,7 @@ SPEC CHECKSUMS:
Bugly: b8715e6ec4004b7f7fbffab0643ba80545aee3da
DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
IQKeyboardManager: ef43ce1ba1e5aaf4adf222c0a46f39761f246879
JXCategoryView: 7b1ee69ede4843c581688afe84d0f047723262f2
LEEAlert: a604ad481e3e9b021421a271f78594926dd034bb
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
......@@ -114,6 +118,6 @@ SPEC CHECKSUMS:
SDWebImage: 8ab87d4b3e5cc4927bd47f78db6ceb0b94442577
YYKit: 7cda43304a8dc3696c449041e2cb3107b4e236e7
PODFILE CHECKSUM: 83e1bf4ab5642ba08ff9082d3b51ce8b146e2aa1
PODFILE CHECKSUM: 4a2c0fd8eb861b7ea7718d39220c186e3098ab1b
COCOAPODS: 1.11.3
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment