Commit 69ff8776 by xuning

设置

parent f3faef41
......@@ -10,6 +10,8 @@
79267A9C2DBA8E0F000D2180 /* WMDragView.m in Sources */ = {isa = PBXBuildFile; fileRef = 79267A9A2DBA8E0F000D2180 /* WMDragView.m */; };
79267AA02DBBCEE2000D2180 /* XVOrderSearchView.m in Sources */ = {isa = PBXBuildFile; fileRef = 79267A9F2DBBCEE2000D2180 /* XVOrderSearchView.m */; };
79267AA32DBD1BFF000D2180 /* XVPersonalHeaderItemView.m in Sources */ = {isa = PBXBuildFile; fileRef = 79267AA22DBD1BFF000D2180 /* XVPersonalHeaderItemView.m */; };
79267AA62DBE5720000D2180 /* XVSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79267AA52DBE5720000D2180 /* XVSettingViewController.m */; };
79267AA92DBE655F000D2180 /* XVSettingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 79267AA82DBE655F000D2180 /* XVSettingTableViewCell.m */; };
798136512DB7AD84004BC05B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 798136502DB7AD84004BC05B /* CoreGraphics.framework */; };
798136532DB7AD90004BC05B /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 798136522DB7AD90004BC05B /* CoreLocation.framework */; };
798136572DB7ADB6004BC05B /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 798136562DB7ADB6004BC05B /* OpenGLES.framework */; };
......@@ -36,7 +38,6 @@
7981EAFF2B712CC700F357E7 /* HBLockSliderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EAFE2B712CC700F357E7 /* HBLockSliderView.m */; };
7981EB042B7273B500F357E7 /* XVPersonalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EB032B7273B500F357E7 /* XVPersonalViewController.m */; };
7981EB082B73BB2C00F357E7 /* XVPersonalHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EB072B73BB2C00F357E7 /* XVPersonalHeaderView.m */; };
7981EB0B2B73BC1500F357E7 /* XVPersonalViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EB0A2B73BC1500F357E7 /* XVPersonalViewCell.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 */; };
......@@ -50,7 +51,6 @@
799DF1102B6D25B400680907 /* UIBarButtonItem+SXCreate.m in Sources */ = {isa = PBXBuildFile; fileRef = 799DF10D2B6D25B400680907 /* UIBarButtonItem+SXCreate.m */; };
799DF1112B6D25B400680907 /* NSObject+SXRuntime.m in Sources */ = {isa = PBXBuildFile; fileRef = 799DF10E2B6D25B400680907 /* NSObject+SXRuntime.m */; };
799DF11A2B6D2B3200680907 /* XVLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 799DF1192B6D2B3200680907 /* XVLoginViewController.m */; };
79DC8B6F2B74A8E600DBD8EA /* XVPersonalFooterView.m in Sources */ = {isa = PBXBuildFile; fileRef = 79DC8B6E2B74A8E600DBD8EA /* XVPersonalFooterView.m */; };
79DC8B722B74B3EC00DBD8EA /* XVOrderSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79DC8B712B74B3EC00DBD8EA /* XVOrderSettingViewController.m */; };
79DC8B752B74B69600DBD8EA /* XVOrderDetailsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79DC8B742B74B69600DBD8EA /* XVOrderDetailsViewController.m */; };
79DC8B782B74B78A00DBD8EA /* XVOrderInfoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 79DC8B772B74B78A00DBD8EA /* XVOrderInfoViewController.m */; };
......@@ -77,6 +77,10 @@
79267A9F2DBBCEE2000D2180 /* XVOrderSearchView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVOrderSearchView.m; sourceTree = "<group>"; };
79267AA12DBD1BFF000D2180 /* XVPersonalHeaderItemView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVPersonalHeaderItemView.h; sourceTree = "<group>"; };
79267AA22DBD1BFF000D2180 /* XVPersonalHeaderItemView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVPersonalHeaderItemView.m; sourceTree = "<group>"; };
79267AA42DBE5720000D2180 /* XVSettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVSettingViewController.h; sourceTree = "<group>"; };
79267AA52DBE5720000D2180 /* XVSettingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVSettingViewController.m; sourceTree = "<group>"; };
79267AA72DBE655F000D2180 /* XVSettingTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVSettingTableViewCell.h; sourceTree = "<group>"; };
79267AA82DBE655F000D2180 /* XVSettingTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVSettingTableViewCell.m; sourceTree = "<group>"; };
798136262DB7AD09004BC05B /* BaiduMapAPI_Map.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BaiduMapAPI_Map.framework; path = "Pods/BaiduNaviKit-All/BaiduNaviKit-All/MapSDK/BaiduMapAPI_Map.framework"; sourceTree = "<group>"; };
798136272DB7AD09004BC05B /* BaiduMapAPI_WalkNavi.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BaiduMapAPI_WalkNavi.framework; path = "Pods/BaiduNaviKit-All/BaiduNaviKit-All/MapSDK/BaiduMapAPI_WalkNavi.framework"; sourceTree = "<group>"; };
798136282DB7AD09004BC05B /* BaiduMapAPI_Base.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = BaiduMapAPI_Base.framework; path = "Pods/BaiduNaviKit-All/BaiduNaviKit-All/MapSDK/BaiduMapAPI_Base.framework"; sourceTree = "<group>"; };
......@@ -153,8 +157,6 @@
7981EB032B7273B500F357E7 /* XVPersonalViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVPersonalViewController.m; sourceTree = "<group>"; };
7981EB062B73BB2C00F357E7 /* XVPersonalHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVPersonalHeaderView.h; sourceTree = "<group>"; };
7981EB072B73BB2C00F357E7 /* XVPersonalHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVPersonalHeaderView.m; sourceTree = "<group>"; };
7981EB092B73BC1500F357E7 /* XVPersonalViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVPersonalViewCell.h; sourceTree = "<group>"; };
7981EB0A2B73BC1500F357E7 /* XVPersonalViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVPersonalViewCell.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>"; };
......@@ -181,8 +183,6 @@
799DF10E2B6D25B400680907 /* NSObject+SXRuntime.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSObject+SXRuntime.m"; sourceTree = "<group>"; };
799DF1182B6D2B3200680907 /* XVLoginViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVLoginViewController.h; sourceTree = "<group>"; };
799DF1192B6D2B3200680907 /* XVLoginViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVLoginViewController.m; sourceTree = "<group>"; };
79DC8B6D2B74A8E600DBD8EA /* XVPersonalFooterView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVPersonalFooterView.h; sourceTree = "<group>"; };
79DC8B6E2B74A8E600DBD8EA /* XVPersonalFooterView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVPersonalFooterView.m; sourceTree = "<group>"; };
79DC8B702B74B3EC00DBD8EA /* XVOrderSettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVOrderSettingViewController.h; sourceTree = "<group>"; };
79DC8B712B74B3EC00DBD8EA /* XVOrderSettingViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XVOrderSettingViewController.m; sourceTree = "<group>"; };
79DC8B732B74B69600DBD8EA /* XVOrderDetailsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVOrderDetailsViewController.h; sourceTree = "<group>"; };
......@@ -392,6 +392,8 @@
7981EB032B7273B500F357E7 /* XVPersonalViewController.m */,
79DC8B702B74B3EC00DBD8EA /* XVOrderSettingViewController.h */,
79DC8B712B74B3EC00DBD8EA /* XVOrderSettingViewController.m */,
79267AA42DBE5720000D2180 /* XVSettingViewController.h */,
79267AA52DBE5720000D2180 /* XVSettingViewController.m */,
);
path = Controller;
sourceTree = "<group>";
......@@ -401,16 +403,14 @@
children = (
7981EB062B73BB2C00F357E7 /* XVPersonalHeaderView.h */,
7981EB072B73BB2C00F357E7 /* XVPersonalHeaderView.m */,
7981EB092B73BC1500F357E7 /* XVPersonalViewCell.h */,
7981EB0A2B73BC1500F357E7 /* XVPersonalViewCell.m */,
79DC8B6D2B74A8E600DBD8EA /* XVPersonalFooterView.h */,
79DC8B6E2B74A8E600DBD8EA /* XVPersonalFooterView.m */,
79DC8B822B8CD5DF00DBD8EA /* XVOrderSettiingTitleView.h */,
79DC8B832B8CD5DF00DBD8EA /* XVOrderSettiingTitleView.m */,
79DC8B852B8CD5F000DBD8EA /* XVOrderSettingView.h */,
79DC8B862B8CD5F000DBD8EA /* XVOrderSettingView.m */,
79267AA12DBD1BFF000D2180 /* XVPersonalHeaderItemView.h */,
79267AA22DBD1BFF000D2180 /* XVPersonalHeaderItemView.m */,
79267AA72DBE655F000D2180 /* XVSettingTableViewCell.h */,
79267AA82DBE655F000D2180 /* XVSettingTableViewCell.m */,
);
path = View;
sourceTree = "<group>";
......@@ -726,8 +726,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
79DC8B6F2B74A8E600DBD8EA /* XVPersonalFooterView.m in Sources */,
79267AA02DBBCEE2000D2180 /* XVOrderSearchView.m in Sources */,
79267AA62DBE5720000D2180 /* XVSettingViewController.m in Sources */,
79DC8B752B74B69600DBD8EA /* XVOrderDetailsViewController.m in Sources */,
79DC8B962B8DB05900DBD8EA /* XVGetOrderAlterButtonView.m in Sources */,
79DC8B872B8CD5F000DBD8EA /* XVOrderSettingView.m in Sources */,
......@@ -751,6 +751,7 @@
79DC8B722B74B3EC00DBD8EA /* XVOrderSettingViewController.m in Sources */,
7981EB082B73BB2C00F357E7 /* XVPersonalHeaderView.m in Sources */,
7981EAF02B6FC07800F357E7 /* XVCategoryTitleCellModel.m in Sources */,
79267AA92DBE655F000D2180 /* XVSettingTableViewCell.m in Sources */,
799DF0F82B6BDA1400680907 /* NSString+Unicode.m in Sources */,
7981EAFF2B712CC700F357E7 /* HBLockSliderView.m in Sources */,
79267AA32DBD1BFF000D2180 /* XVPersonalHeaderItemView.m in Sources */,
......@@ -770,7 +771,6 @@
799DF1102B6D25B400680907 /* UIBarButtonItem+SXCreate.m in Sources */,
79DC8B8D2B8D887000DBD8EA /* XVDispatchOrderAlter.m in Sources */,
799DF10F2B6D25B400680907 /* UINavigation+SXFixSpace.m in Sources */,
7981EB0B2B73BC1500F357E7 /* XVPersonalViewCell.m in Sources */,
799DF0F92B6BDA1400680907 /* UINavigationController+FDFullscreenPopGesture.m in Sources */,
799DF1072B6D224000680907 /* XVNaviViewController.m in Sources */,
);
......
{
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "chevron_right@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -12,7 +12,6 @@
#import "XVNewJobViewController.h"
#import "XVOrderSortView.h"
#import "XVPersonalViewController.h"
#import <UIViewController+CWLateralSlide.h>
#import <TXScrollLabelView.h>
#import "WMDragView.h"
#import "XVOrderSearchView.h"
......
......@@ -7,11 +7,10 @@
//
#import "XVPersonalViewController.h"
#import "XVPersonalViewCell.h"
#import "XVPersonalHeaderView.h"
#import "XVPersonalFooterView.h"
#import <SDCycleScrollView/SDCycleScrollView.h>
#import "XVVerticalButton.h"
#import "XVSettingViewController.h"
@interface XVPersonalViewController ()
......@@ -285,7 +284,13 @@
- (UIButton *)settingButton {
if (_settingButton == nil) {
_settingButton = [[UIButton alloc]initWithNormalImageName:@"riLine-settings-line 1" selectedImgName:@"riLine-settings-line 1"];
WS(weakSelf)
[_settingButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id _Nonnull sender) {
XVSettingViewController *settingVc = [[XVSettingViewController alloc]init];
[weakSelf cw_pushViewController:settingVc];
}];
}
return _settingButton;
}
- (UIScrollView *)scrollView {
......
//
// XVPersonalViewCell.h
// XVSettingViewController.h
// fastservice
//
// Created by xuning on 2/7/24.
// Copyright © 2024 FastService. All rights reserved.
// Created by xuning on 4/27/25.
// Copyright © 2025 FastService. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "XVBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XVPersonalViewCell : UITableViewCell
@property (nonatomic, strong) NSDictionary *item;
@interface XVSettingViewController : XVBaseViewController
@end
......
//
// XVSettingViewController.m
// fastservice
//
// Created by xuning on 4/27/25.
// Copyright © 2025 FastService. All rights reserved.
//
#import "XVSettingViewController.h"
#import "XVSettingTableViewCell.h"
@interface XVSettingViewController ()
@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSMutableArray<NSArray *> *dataArray;
@property (nonatomic, strong) UIButton *logoutButton;
@property (nonatomic, strong) UIButton *versionButton;
@end
@implementation XVSettingViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title = @"设置";
[self setupUI];
}
- (void)setupUI {
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(UIEdgeInsetsMake(0, 7, 0, 7));
}];
}
#pragma mark - TableViewDelegate & Datasource
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
CGFloat cornerRadius =10.0;
CGRect bounds = cell.bounds;
// 每区行数
NSInteger numberOfRows = [tableView numberOfRowsInSection:indexPath.section];
//绘制曲线
UIBezierPath *bezierPath = nil;
if (indexPath.row == 0 && numberOfRows == 1) {
//四个角都为圆角
bezierPath = [UIBezierPath bezierPathWithRoundedRect:bounds byRoundingCorners:UIRectCornerAllCorners cornerRadii:CGSizeMake(cornerRadius, cornerRadius)];
} else if (indexPath.row == 0) {
// cell.separatorInset = UIEdgeInsetsMake(0, 0, 0, cell.bounds.size.width);
//左上、右上角为圆角
bezierPath = [UIBezierPath bezierPathWithRoundedRect:bounds byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight) cornerRadii:CGSizeMake(cornerRadius, cornerRadius)];
} else if (indexPath.row == numberOfRows - 1) {
// cell.separatorInset = UIEdgeInsetsMake(0, 0, 0, cell.bounds.size.width);
//某个区的最后一行:左下、右下角为圆角
bezierPath = [UIBezierPath bezierPathWithRoundedRect:bounds byRoundingCorners:(UIRectCornerBottomLeft|UIRectCornerBottomRight) cornerRadii:CGSizeMake(cornerRadius, cornerRadius)];
} else {
//某个区的中间行:为矩形
bezierPath = [UIBezierPath bezierPathWithRect:bounds];
}
cell.backgroundColor = [UIColor clearColor];
//新建一个layer层,设置填充色和边框颜色
CAShapeLayer *layer = [CAShapeLayer layer];
layer.path = bezierPath.CGPath;
layer.fillColor = [UIColor whiteColor].CGColor;
layer.strokeColor = [UIColor whiteColor].CGColor;
//将layer层添加到cell.layer中,并插到最底层
[cell.layer insertSublayer:layer atIndex:0];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return self.dataArray.count;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.dataArray[section].count;
}
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
NSDictionary *dict = self.dataArray[indexPath.section][indexPath.row];
XVSettingTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"XVSettingViewController"];
cell.dict = dict;
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0 && indexPath.row == 0) {
return 80;
}
return 44;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
return 8;
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
if (section == 3) {
return 114;
}
return CGFLOAT_MIN;
}
- (nullable UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
return [UIView new];
}
- (nullable UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
if (section == 3) {
UIView *view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.tableView.width, 114)];
[view addSubview:self.logoutButton];
self.logoutButton.frame = CGRectMake(0, 20, self.tableView.width, 44);
[view addSubview:self.versionButton];
self.versionButton.frame = CGRectMake(0, 97, self.tableView.width, 17);
return view;
}
return [UIView new];
}
- (UITableView *)tableView {
if (_tableView == nil) {
_tableView = [[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStyleGrouped];
_tableView.delegate = self;
_tableView.dataSource = self;
_tableView.tableFooterView = [UIView new];
_tableView.backgroundColor = DEFAULT_BACKGROUND_COLOR;
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone; //设置分割线的分割
[_tableView registerClass:[XVSettingTableViewCell class] forCellReuseIdentifier:@"XVSettingViewController"];
}
return _tableView;
}
- (NSMutableArray *)dataArray {
if (_dataArray == nil) {
_dataArray = [NSMutableArray arrayWithCapacity:4];
[_dataArray addObject:@[
@{@"title":@"头像",@"type":@(1)},
@{@"title":@"姓名",@"type":@(2)},
@{@"title":@"昵称",@"type":@(3)},
@{@"title":@"性别",@"type":@(4)}]];
[_dataArray addObject:@[
@{@"title":@"更换手机号",@"type":@(4)},
@{@"title":@"修改密码",@"type":@(4)}]];
[_dataArray addObject:@[
@{@"title":@"清除缓存",@"type":@(4)},
@{@"title":@"关于快服务骑士",@"type":@(4)}]];
[_dataArray addObject:@[
@{@"title":@"账号注销",@"type":@(4)}]];
}
return _dataArray;
}
- (UIButton *)logoutButton {
if (_logoutButton == nil) {
_logoutButton = [[UIButton alloc]initWithTitle:@"退出登录" fontSize:14 titleColor:[UIColor whiteColor] bgColor:COLOR_THEMEGRENN];
}
return _logoutButton;
}
- (UIButton *)versionButton {
if(_versionButton == nil) {
_versionButton = [[UIButton alloc]initWithTitle:S(@"当前版本号:%@(Build %@)",APP_VERSION,APP_BUILD) fontSize:12 titleColor:F_606060_COLOR bgColor:nil];
}
return _versionButton;
}
@end
//
// XVPersonalFooterView.m
// fastservice
//
// Created by xuning on 2/8/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVPersonalFooterView.h"
@interface XVPersonalFooterView()
@property (nonatomic, strong) UIView *bgView;
@property (nonatomic, strong) UIImageView *serviceImageView;
@property (nonatomic, strong) UILabel *serviceLabel;
@end
@implementation XVPersonalFooterView
- (instancetype)initWithFrame:(CGRect)frame {
if(self = [super initWithFrame:frame]) {
[self setupUI];
}
return self;
}
- (void)setupUI {
[self addSubview:self.bgView];
[self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
make.right.mas_equalTo(self).mas_offset(-27);
make.top.mas_equalTo(self).mas_offset(21);
make.size.mas_equalTo(CGSizeMake(64, 64));
}];
[self.bgView addSubview:self.serviceImageView];
[self.serviceImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(self.bgView);
make.size.mas_equalTo(CGSizeMake(45, 45));
}];
kViewBorderRadius(self.bgView, 32, 0, [UIColor clearColor]);
[self addSubview:self.serviceLabel];
[self.serviceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.bgView);
make.top.mas_equalTo(self.serviceImageView.mas_bottom).mas_offset(9);
}];
}
- (UIView *)bgView {
if(_bgView == nil) {
_bgView = [[UIView alloc]init];
_bgView.backgroundColor = kHexRGB(0xF0EFEF);
}
return _bgView;
}
- (UIImageView *)serviceImageView {
if(_serviceImageView == nil) {
_serviceImageView = [[UIImageView alloc]initWithImageName:@"if-live-support"];
_serviceImageView.backgroundColor = kHexRGB(0xF0EFEF);
}
return _serviceImageView;
}
- (UILabel *)serviceLabel {
if(_serviceLabel == nil) {
_serviceLabel = [[UILabel alloc]initWithText:@"联系客服" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:14];
}
return _serviceLabel;
}
@end
//
// XVPersonalViewCell.m
// fastservice
//
// Created by xuning on 2/7/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVPersonalViewCell.h"
@interface XVPersonalViewCell()
@property (nonatomic, strong) UIImageView *iconImageView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIImageView *arrowImageViiew;
@property (nonatomic, strong) UIView *lineView;
@end
@implementation XVPersonalViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self setupUI];
}
return self;
}
- (void)setupUI {
[self.contentView addSubview:self.iconImageView];
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.contentView);
make.left.mas_equalTo(self.contentView).mas_offset(17);
make.size.mas_equalTo(CGSizeMake(24, 24));
}];
[self.contentView addSubview:self.titleLabel];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.contentView);
make.left.mas_equalTo(self.iconImageView.mas_right).mas_offset(9);
}];
[self.contentView addSubview:self.arrowImageViiew];
[self.arrowImageViiew mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.contentView);
make.right.mas_equalTo(self.contentView).mas_offset(-19);
make.size.mas_equalTo(CGSizeMake(17, 17));
}];
[self.contentView addSubview:self.lineView];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(self.contentView);
make.height.mas_equalTo(1);
}];
}
- (void)setItem:(NSDictionary *)item {
_item = item;
self.iconImageView.image = IMG(item[@"imageName"]);
self.titleLabel.text = item[@"title"];
}
- (UIImageView *)iconImageView {
if(_iconImageView == nil) {
_iconImageView = [[UIImageView alloc]initWithImageName:@"ze-pending-payment"];
}
return _iconImageView;
}
- (UILabel *)titleLabel {
if(_titleLabel == nil) {
_titleLabel = [[UILabel alloc]initWithText:@"标题" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:14];
}
return _titleLabel;
}
- (UIImageView *)arrowImageViiew {
if(_arrowImageViiew == nil) {
_arrowImageViiew = [[UIImageView alloc]initWithImageName:@"antOutline-right"];
}
return _arrowImageViiew;
}
- (UIView *)lineView {
if(_lineView == nil) {
_lineView = [[UIView alloc]init];
_lineView.backgroundColor = DEFAULT_BACKGROUND_COLOR;
}
return _lineView;
}
@end
//
// XVPersonalFooterView.h
// XVSettingTableViewCell.h
// fastservice
//
// Created by xuning on 2/8/24.
// Copyright © 2024 FastService. All rights reserved.
// Created by xuning on 4/27/25.
// Copyright © 2025 FastService. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XVPersonalFooterView : UIView
@interface XVSettingTableViewCell : UITableViewCell
@property (nonatomic, strong) NSDictionary *dict;
@end
......
//
// XVSettingTableViewCell.m
// fastservice
//
// Created by xuning on 4/27/25.
// Copyright © 2025 FastService. All rights reserved.
//
#import "XVSettingTableViewCell.h"
@interface XVSettingTableViewCell()
@property (nonatomic, strong) UIView *lineView;
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIImageView *userImageView;
@property (nonatomic, strong) UIImageView *idImageView;
@property (nonatomic, strong) UILabel *subTitleLabel;
@property (nonatomic, strong) UIImageView *arrowImageView;
@end
@implementation XVSettingTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
self.selectionStyle = UITableViewCellSelectionStyleNone;
[self setupUI];
}
return self;
}
- (void)setDict:(NSDictionary *)dict {
int type = [dict[@"type"] intValue];
if (type == 1) {
[self.contentView addSubview:self.userImageView];
[self.userImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(66, 66));
make.centerY.mas_equalTo(self.contentView);
make.right.mas_equalTo(self.contentView).mas_offset(-13);
}];
}else if(type == 2) {
[self.contentView addSubview:self.idImageView];
[self.idImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(47, 47));
make.centerY.mas_equalTo(self.contentView);
make.right.mas_equalTo(self.contentView).mas_offset(-13);
}];
[self.contentView addSubview:self.subTitleLabel];
[self.subTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.contentView);
make.right.mas_equalTo(self.idImageView.mas_left).mas_offset(-7);
}];
}else if( type == 3 || type == 4) {
[self.contentView addSubview:self.subTitleLabel];
[self.subTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.contentView);
make.right.mas_equalTo(self.contentView.mas_left).mas_offset(-38);
}];
if ( type == 4) {
[self.contentView addSubview:self.arrowImageView];
[self.arrowImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.size.mas_equalTo(CGSizeMake(20, 20));
make.centerY.mas_equalTo(self.contentView);
make.right.mas_equalTo(self.contentView).mas_offset(-5);
}];
}
}
}
- (void)setupUI {
[self.contentView addSubview:self.lineView];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.contentView).mas_offset(15);
make.right.mas_equalTo(self.contentView).mas_offset(-15);
make.bottom.mas_equalTo(self.contentView);
make.height.mas_equalTo(1);
}];
[self.contentView addSubview:self.titleLabel];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.contentView).mas_offset(15);
make.centerY.mas_equalTo(self.contentView);
}];
}
- (UIView *)lineView {
if (_lineView == nil) {
_lineView = [[UIView alloc]init];
_lineView.backgroundColor = F7_3_COLOR;
}
return _lineView;
}
- (UILabel *)titleLabel {
if(_titleLabel == nil) {
_titleLabel = [[UILabel alloc]initWithText:@"标题" textColor:F_606060_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:14];
}
return _titleLabel;
}
- (UIImageView *)userImageView {
if(_userImageView == nil) {
_userImageView = [[UIImageView alloc]initWithImageName:@"qishi-head"];
}
return _userImageView;
}
- (UIImageView *)idImageView {
if (_idImageView == nil) {
_idImageView = [[UIImageView alloc]initWithImageName:@"图标 15"];
}
return _idImageView;
}
- (UILabel *)subTitleLabel {
if(_subTitleLabel == nil) {
_subTitleLabel = [[UILabel alloc]initWithText:@"标题" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentRight) fontSize:14];
}
return _subTitleLabel;
}
- (UIImageView *)arrowImageView {
if (_arrowImageView == nil) {
_arrowImageView = [[UIImageView alloc]initWithImageName:@"chevron_right"];
}
return _arrowImageView;
}
@end
......@@ -22,7 +22,7 @@
#import "UINavigation+SXFixSpace.h"
#import "UIBarButtonItem+SXCreate.h"
#import <UIViewController+CWLateralSlide.h>
//#import<BMKLocationKit/BMKLocationComponent.h>
......@@ -48,6 +48,7 @@
#endif
#define IMG(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]
#define S(str,...) [NSString stringWithFormat:str,##__VA_ARGS__]
#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]
......@@ -104,6 +105,12 @@
//整个顶部的高度
#define KTOP_HEIGHT (KSTATUSBAR_HEIGHT + KNAVBAR_HEIGHT)
//app 版本
#define APP_VERSION [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]
#define APP_BUILD [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"]
#define IS_IPHONEX ({\
......
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