Commit 8de2bacd by xuning

个人中心UI

parent 15ec20e9
......@@ -24,6 +24,8 @@
7981EAFC2B71272D00F357E7 /* XVNewJobViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7981EAFB2B71272D00F357E7 /* XVNewJobViewCell.m */; };
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 */; };
......@@ -39,6 +41,8 @@
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 */; };
FA5E55D5A48FDC04BA4CCD08 /* Pods_fastservice.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 08D109EE60B32403F3655A70 /* Pods_fastservice.framework */; };
/* End PBXBuildFile section */
......@@ -80,6 +84,10 @@
7981EAFE2B712CC700F357E7 /* HBLockSliderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HBLockSliderView.m; sourceTree = "<group>"; };
7981EB022B7273B500F357E7 /* XVPersonalViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XVPersonalViewController.h; sourceTree = "<group>"; };
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>"; };
......@@ -110,6 +118,10 @@
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>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -196,6 +208,7 @@
7981EB002B72739300F357E7 /* Personal */ = {
isa = PBXGroup;
children = (
7981EB052B73BB0D00F357E7 /* View */,
7981EB012B72739D00F357E7 /* Controller */,
);
path = Personal;
......@@ -206,10 +219,25 @@
children = (
7981EB022B7273B500F357E7 /* XVPersonalViewController.h */,
7981EB032B7273B500F357E7 /* XVPersonalViewController.m */,
79DC8B702B74B3EC00DBD8EA /* XVOrderSettingViewController.h */,
79DC8B712B74B3EC00DBD8EA /* XVOrderSettingViewController.m */,
);
path = Controller;
sourceTree = "<group>";
};
7981EB052B73BB0D00F357E7 /* View */ = {
isa = PBXGroup;
children = (
7981EB062B73BB2C00F357E7 /* XVPersonalHeaderView.h */,
7981EB072B73BB2C00F357E7 /* XVPersonalHeaderView.m */,
7981EB092B73BC1500F357E7 /* XVPersonalViewCell.h */,
7981EB0A2B73BC1500F357E7 /* XVPersonalViewCell.m */,
79DC8B6D2B74A8E600DBD8EA /* XVPersonalFooterView.h */,
79DC8B6E2B74A8E600DBD8EA /* XVPersonalFooterView.m */,
);
path = View;
sourceTree = "<group>";
};
799DF0B82B6BD8AE00680907 = {
isa = PBXGroup;
children = (
......@@ -514,6 +542,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
79DC8B6F2B74A8E600DBD8EA /* XVPersonalFooterView.m in Sources */,
7981EAB72B6E669000F357E7 /* UIScrollView+XVAdd.m in Sources */,
7981EACF2B6F63CF00F357E7 /* XVMainJobViewController.m in Sources */,
799DF1042B6D220300680907 /* XVBaseViewController.m in Sources */,
......@@ -525,6 +554,8 @@
7981EACA2B6F59E800F357E7 /* XVPasswordViewController.m in Sources */,
7981EABD2B6E675F00F357E7 /* NSString+XVAdd.m in Sources */,
799DF0F72B6BDA1400680907 /* BRPlaceholderTextView.m in Sources */,
79DC8B722B74B3EC00DBD8EA /* XVOrderSettingViewController.m in Sources */,
7981EB082B73BB2C00F357E7 /* XVPersonalHeaderView.m in Sources */,
7981EAF02B6FC07800F357E7 /* XVCategoryTitleCellModel.m in Sources */,
799DF0F82B6BDA1400680907 /* NSString+Unicode.m in Sources */,
7981EAFF2B712CC700F357E7 /* HBLockSliderView.m in Sources */,
......@@ -541,6 +572,7 @@
799DF0FB2B6BDA1400680907 /* WRNavigationBar.m in Sources */,
799DF1102B6D25B400680907 /* UIBarButtonItem+SXCreate.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 */,
799DF0FC2B6BDA1400680907 /* WRCustomNavigationBar.m in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "antOutline-insurance@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "antOutline-read@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "antOutline-right@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "fas fa-user-circle@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "iconPark-clipboard@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "iconPark-mark@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "iconPark-ranking@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "if-live-support@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "stLine-slider-l@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ze-pending-payment@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
......@@ -11,6 +11,8 @@
#import "XVCategoryTitleView.h"
#import "XVNewJobViewController.h"
#import "XVOrderSortView.h"
#import "XVPersonalViewController.h"
#import <UIViewController+CWLateralSlide.h>
@interface XVMainJobViewController ()<JXCategoryViewDelegate,JXCategoryListContainerViewDelegate>
......@@ -105,6 +107,12 @@
if(_barView == nil) {
_barView = [[XVCustomBarView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, KSTATUSBAR_HEIGHT + 45)];
_barView.backgroundColor = [UIColor whiteColor];
WS(weakSelf);
[_barView.centerButton addBlockForControlEvents:UIControlEventTouchUpInside block:^(id _Nonnull sender) {
XVPersonalViewController *vc = [[XVPersonalViewController alloc]init];
[weakSelf cw_showDrawerViewController:vc animationType:CWDrawerAnimationTypeMask configuration:nil];
}];
}
return _barView;
}
......
......@@ -30,7 +30,7 @@
}
- (void)viewDidLoad {
[super viewDidLoad];
[[NSUserDefaults standardUserDefaults] setValue:@(YES) forKey:@"_UIConstraintBasedLayoutLogUnsatisfiable"];
// [[NSUserDefaults standardUserDefaults] setValue:@(YES) forKey:@"_UIConstraintBasedLayoutLogUnsatisfiable"];
self.tableView.rowHeight = UITableViewAutomaticDimension;
self.tableView.estimatedRowHeight = 100;
......
//
// XVOrderSettingViewController.h
// fastservice
//
// Created by xuning on 2/8/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XVOrderSettingViewController : XVBaseViewController
@end
NS_ASSUME_NONNULL_END
//
// XVOrderSettingViewController.m
// fastservice
//
// Created by xuning on 2/8/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVOrderSettingViewController.h"
@interface XVOrderSettingViewController ()
@end
@implementation XVOrderSettingViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -7,26 +7,139 @@
//
#import "XVPersonalViewController.h"
#import "XVPersonalViewCell.h"
#import "XVPersonalHeaderView.h"
#import "XVPersonalFooterView.h"
@interface XVPersonalViewController ()
@property (nonatomic, strong) UIImageView *userImageView;
@property (nonatomic, strong) UILabel *nameLabel;
@property (nonatomic, strong) UILabel *phoneLabel;
@property (nonatomic, strong) XVPersonalHeaderView *headerView;
@property (nonatomic, strong) XVPersonalFooterView *footerView;
@property (nonatomic, strong) NSArray *dataArray;
@end
@implementation XVPersonalViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
[self setupUI];
}
- (void)setupUI {
[self.tableView registerClass:[XVPersonalViewCell class] forCellReuseIdentifier:@"XVPersonalViewCell"];
self.tableView.backgroundColor = DEFAULT_BACKGROUND_COLOR;
self.tableView.rowHeight = 64;
self.tableView.tableHeaderView = self.headerView;
self.tableView.tableFooterView = self.footerView;
[self.view addSubview:self.userImageView];
[self.userImageView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.view).mas_offset(KSTATUSBAR_HEIGHT + 15);
make.left.mas_equalTo(self.view).mas_offset(12);
make.size.mas_equalTo(CGSizeMake(62, 62));
}];
[self.view addSubview:self.nameLabel];
[self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.userImageView.mas_right).mas_offset(26);
make.top.mas_equalTo(self.userImageView);
}];
[self.view addSubview:self.phoneLabel];
[self.phoneLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.userImageView.mas_right).mas_offset(26);
make.top.mas_equalTo(self.nameLabel.mas_bottom).mas_offset(7);
}];
[self.view addSubview:self.tableView];
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.mas_equalTo(self.view);
make.top.mas_equalTo(self.phoneLabel.mas_bottom).mas_offset(13);
make.bottom.mas_equalTo(self.view.mas_safeAreaLayoutGuideBottom).mas_offset(0);
}];
}
/*
#pragma mark - Navigation
#pragma mark - TableViewDelegate & Datasource
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return self.dataArray.count;
}
- (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
XVPersonalViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"XVPersonalViewCell"];
cell.item = self.dataArray[indexPath.row];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
}
- (BOOL)fd_prefersNavigationBarHidden {
return NO;
}
- (UIImageView *)userImageView {
if(_userImageView == nil) {
_userImageView = [[UIImageView alloc]initWithImageName:@"fas fa-user-circle"];
}
return _userImageView;
}
- (UILabel *)nameLabel {
if(_nameLabel == nil) {
_nameLabel = [[UILabel alloc]initWithText:@"骑士" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:26];
}
return _nameLabel;
}
- (UILabel *)phoneLabel {
if(_phoneLabel == nil) {
_phoneLabel = [[UILabel alloc]initWithText:@"138****0018" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:20];
}
return _phoneLabel;
}
- (XVPersonalHeaderView *)headerView {
if(_headerView == nil) {
_headerView = [[XVPersonalHeaderView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH * 0.75, 124)];
_headerView.backgroundColor = [UIColor whiteColor];
}
return _headerView;
}
- (XVPersonalFooterView *)footerView {
if(_footerView == nil) {
_footerView = [[XVPersonalFooterView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH * 0.75, 124)];
_footerView.backgroundColor = [UIColor whiteColor];
}
return _footerView;
}
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
- (NSArray *)dataArray {
if(_dataArray == nil) {
_dataArray = @[@{@"title":@"我的账户",@"imageName":@"ze-pending-payment",@"className":@""},
@{@"title":@"我的保险",@"imageName":@"antOutline-insurance",@"className":@""},
@{@"title":@"骑手排行榜",@"imageName":@"iconPark-ranking",@"className":@""},
@{@"title":@"接单设置",@"imageName":@"stLine-slider-l",@"className":@""},
@{@"title":@"活动中心",@"imageName":@"iconPark-mark",@"className":@""},
@{@"title":@"服务宝典",@"imageName":@"antOutline-read",@"className":@""},
@{@"title":@"通知公告",@"imageName":@"iconPark-clipboard",@"className":@""},];
}
return _dataArray;
}
*/
@end
//
// XVPersonalFooterView.h
// fastservice
//
// Created by xuning on 2/8/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XVPersonalFooterView : UIView
@end
NS_ASSUME_NONNULL_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
//
// XVPersonalHeaderView.h
// fastservice
//
// Created by xuning on 2/7/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XVPersonalHeaderView : UIView
@end
NS_ASSUME_NONNULL_END
//
// XVPersonalHeaderView.m
// fastservice
//
// Created by xuning on 2/7/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import "XVPersonalHeaderView.h"
@interface XVPersonalHeaderView()
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIButton *moreButton;
@property (nonatomic, strong) UILabel *orderTitleLabel;
@property (nonatomic, strong) UILabel *priceTitleLabel;
@property (nonatomic, strong) UILabel *orderLabel;
@property (nonatomic, strong) UILabel *priceLabel;
@property (nonatomic, strong) UIView *lineView;
@end
@implementation XVPersonalHeaderView
- (instancetype)initWithFrame:(CGRect)frame {
if(self = [super initWithFrame:frame]) {
[self setupUI];
}
return self;
}
- (void)setupUI {
[self addSubview:self.titleLabel];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self).mas_offset(12);
make.left.mas_equalTo(self).mas_offset(14);
}];
[self addSubview:self.moreButton];
[self.moreButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.titleLabel);
make.right.mas_equalTo(self).mas_offset(-18);
}];
[self addSubview:self.orderTitleLabel];
[self.orderTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self).mas_offset(-self.width / 4);
make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_offset(17);
}];
[self addSubview:self.priceTitleLabel];
[self.priceTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self).mas_offset(self.width / 4);
make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_offset(17);
}];
[self addSubview:self.orderLabel];
[self.orderLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self).mas_offset(-self.width / 4);
make.top.mas_equalTo(self.orderTitleLabel.mas_bottom).mas_offset(8);
}];
[self addSubview:self.priceLabel];
[self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self).mas_offset(self.width / 4);
make.top.mas_equalTo(self.orderTitleLabel.mas_bottom).mas_offset(8);
}];
[self addSubview:self.lineView];
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.right.bottom.mas_equalTo(self);
make.height.mas_equalTo(1);
}];
}
- (UILabel *)titleLabel {
if(_titleLabel == nil) {
_titleLabel = [[UILabel alloc]initWithText:@"接单统计" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:18];
}
return _titleLabel;
}
- (UIButton *)moreButton {
if(_moreButton == nil) {
_moreButton = [[UIButton alloc]initWithTitle:@"查看更多" fontSize:14 titleColor:F_101010_COLOR bgColor:[UIColor whiteColor]];
}
return _moreButton;
}
- (UILabel *)orderTitleLabel {
if(_orderTitleLabel == nil) {
_orderTitleLabel = [[UILabel alloc]initWithText:@"今日完成(单)" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:14];
}
return _orderTitleLabel;
}
- (UILabel *)priceTitleLabel {
if(_priceTitleLabel == nil) {
_priceTitleLabel = [[UILabel alloc]initWithText:@"今日收入(元)" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:14];
}
return _priceTitleLabel;
}
- (UILabel *)priceLabel {
if(_priceLabel == nil) {
_priceLabel = [[UILabel alloc]initWithText:@"0" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:26];
}
return _priceLabel;
}
- (UILabel *)orderLabel {
if(_orderLabel == nil) {
_orderLabel = [[UILabel alloc]initWithText:@"0" textColor:F_101010_COLOR textAlignment:(NSTextAlignmentCenter) fontSize:26];
}
return _orderLabel;
}
- (UIView *)lineView {
if(_lineView == nil) {
_lineView = [[UIView alloc]init];
_lineView.backgroundColor = DEFAULT_BACKGROUND_COLOR;
}
return _lineView;
}
@end
//
// XVPersonalViewCell.h
// fastservice
//
// Created by xuning on 2/7/24.
// Copyright © 2024 FastService. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XVPersonalViewCell : UITableViewCell
@property (nonatomic, strong) NSDictionary *item;
@end
NS_ASSUME_NONNULL_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
......@@ -32,7 +32,8 @@ target 'fastservice' do
pod 'BaiduNaviKit-All/Search', '6.4.0' # 集成地图Search包
# pod 'BaiduNaviKit-All/Cloud', '6.0.0' # 集成地图Cloud包
pod 'BaiduNaviKit-All/Utils', '6.4.0' # 集成地图Utils包
pod 'MMDrawerController', '~> 0.5.7'
pod 'CWLateralSlide', '~> 1.6.3'
end
......@@ -40,6 +40,7 @@ PODS:
- BRPickerView/StringPickerView (2.8.0):
- BRPickerView/Base
- Bugly (2.5.93)
- CWLateralSlide (1.6.5)
- DZNEmptyDataSet (1.8.1)
- IQKeyboardManager (6.5.11)
- JXCategoryView (1.6.1)
......@@ -48,18 +49,6 @@ PODS:
- MBProgressHUD (1.2.0)
- MJExtension (3.4.1)
- MJRefresh (3.7.5)
- MMDrawerController (0.5.7):
- MMDrawerController/Core (= 0.5.7)
- MMDrawerController/MMDrawerBarButtonItem (= 0.5.7)
- MMDrawerController/MMDrawerVisualStates (= 0.5.7)
- MMDrawerController/Subclass (= 0.5.7)
- MMDrawerController/Core (0.5.7)
- MMDrawerController/MMDrawerBarButtonItem (0.5.7):
- MMDrawerController/Core
- MMDrawerController/MMDrawerVisualStates (0.5.7):
- MMDrawerController/Core
- MMDrawerController/Subclass (0.5.7):
- MMDrawerController/Core
- SAMKeychain (1.5.3)
- SDWebImage (5.15.2):
- SDWebImage/Core (= 5.15.2)
......@@ -79,6 +68,7 @@ DEPENDENCIES:
- BMKLocationKit
- BRPickerView
- Bugly
- CWLateralSlide (~> 1.6.3)
- DZNEmptyDataSet
- IQKeyboardManager
- JXCategoryView
......@@ -87,7 +77,6 @@ DEPENDENCIES:
- MBProgressHUD
- MJExtension
- MJRefresh
- MMDrawerController (~> 0.5.7)
- SAMKeychain
- SDWebImage
- YYKit
......@@ -100,6 +89,7 @@ SPEC REPOS:
- BMKLocationKit
- BRPickerView
- Bugly
- CWLateralSlide
- DZNEmptyDataSet
- IQKeyboardManager
- JXCategoryView
......@@ -108,7 +98,6 @@ SPEC REPOS:
- MBProgressHUD
- MJExtension
- MJRefresh
- MMDrawerController
- SAMKeychain
- SDWebImage
- YYKit
......@@ -120,6 +109,7 @@ SPEC CHECKSUMS:
BMKLocationKit: 058df3f51b379be4b2865ee19bfb58c32398dc8a
BRPickerView: a0ff460bf092bc069db5a54153395b1f7e8f5300
Bugly: b8715e6ec4004b7f7fbffab0643ba80545aee3da
CWLateralSlide: 8939c8dea91a24e40d0793553118cb57cd67f64b
DZNEmptyDataSet: 9525833b9e68ac21c30253e1d3d7076cc828eaa7
IQKeyboardManager: ef43ce1ba1e5aaf4adf222c0a46f39761f246879
JXCategoryView: 7b1ee69ede4843c581688afe84d0f047723262f2
......@@ -128,11 +118,10 @@ SPEC CHECKSUMS:
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
MJExtension: 21c5f6f8c4d5d8844b7ae8fbae08fed0b501f961
MJRefresh: fdf5e979eb406a0341468932d1dfc8b7f9fce961
MMDrawerController: 7a4cf8e25596bf2434e03ce50d22a8608ddee6a1
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
SDWebImage: 8ab87d4b3e5cc4927bd47f78db6ceb0b94442577
YYKit: 7cda43304a8dc3696c449041e2cb3107b4e236e7
PODFILE CHECKSUM: 1d16adcabfafa5b9a2b254509261600f723d9dc6
PODFILE CHECKSUM: 30267728a5db79ee8e4505697e6db6b6d31e8dfc
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