Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FastService
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
AppWaiBao
FastService
Commits
69ff8776
Commit
69ff8776
authored
Apr 27, 2025
by
xuning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置
parent
f3faef41
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
391 additions
and
190 deletions
+391
-190
project.pbxproj
FastService.xcodeproj/project.pbxproj
+0
-0
UserInterfaceState.xcuserstate
...serdata/xuning.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
Contents.json
...ssets.xcassets/APP设置/chevron_right.imageset/Contents.json
+22
-0
chevron_right@3x.png
...cassets/APP设置/chevron_right.imageset/chevron_right@3x.png
+0
-0
XVMainJobViewController.m
FastService/Main/Controller/XVMainJobViewController.m
+0
-1
XVPersonalViewController.m
FastService/Personal/Controller/XVPersonalViewController.m
+7
-2
XVSettingViewController.h
FastService/Personal/Controller/XVSettingViewController.h
+5
-6
XVSettingViewController.m
FastService/Personal/Controller/XVSettingViewController.m
+194
-0
XVPersonalFooterView.m
FastService/Personal/View/XVPersonalFooterView.m
+0
-79
XVPersonalViewCell.m
FastService/Personal/View/XVPersonalViewCell.m
+0
-97
XVSettingTableViewCell.h
FastService/Personal/View/XVSettingTableViewCell.h
+7
-4
XVSettingTableViewCell.m
FastService/Personal/View/XVSettingTableViewCell.m
+148
-0
PrefixHeader.pch
FastService/PrefixHeader.pch
+8
-1
No files found.
FastService.xcodeproj/project.pbxproj
View file @
69ff8776
This diff is collapsed.
Click to expand it.
FastService.xcworkspace/xcuserdata/xuning.xcuserdatad/UserInterfaceState.xcuserstate
View file @
69ff8776
No preview for this file type
FastService/Assets.xcassets/APP设置/chevron_right.imageset/Contents.json
0 → 100644
View file @
69ff8776
{
{
"images"
:
[
{
"idiom"
:
"universal"
,
"scale"
:
"1x"
},
{
"idiom"
:
"universal"
,
"scale"
:
"2x"
},
{
"filename"
:
"chevron_right@3x.png"
,
"idiom"
:
"universal"
,
"scale"
:
"3x"
}
],
"info"
:
{
"author"
:
"xcode"
,
"version"
:
1
}
}
FastService/Assets.xcassets/APP设置/chevron_right.imageset/chevron_right@3x.png
0 → 100644
View file @
69ff8776
973 Bytes
FastService/Main/Controller/XVMainJobViewController.m
View file @
69ff8776
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
#import "XVNewJobViewController.h"
#import "XVNewJobViewController.h"
#import "XVOrderSortView.h"
#import "XVOrderSortView.h"
#import "XVPersonalViewController.h"
#import "XVPersonalViewController.h"
#import <UIViewController+CWLateralSlide.h>
#import <TXScrollLabelView.h>
#import <TXScrollLabelView.h>
#import "WMDragView.h"
#import "WMDragView.h"
#import "XVOrderSearchView.h"
#import "XVOrderSearchView.h"
...
...
FastService/Personal/Controller/XVPersonalViewController.m
View file @
69ff8776
...
@@ -7,11 +7,10 @@
...
@@ -7,11 +7,10 @@
//
//
#import "XVPersonalViewController.h"
#import "XVPersonalViewController.h"
#import "XVPersonalViewCell.h"
#import "XVPersonalHeaderView.h"
#import "XVPersonalHeaderView.h"
#import "XVPersonalFooterView.h"
#import <SDCycleScrollView/SDCycleScrollView.h>
#import <SDCycleScrollView/SDCycleScrollView.h>
#import "XVVerticalButton.h"
#import "XVVerticalButton.h"
#import "XVSettingViewController.h"
@interface
XVPersonalViewController
()
@interface
XVPersonalViewController
()
...
@@ -285,7 +284,13 @@
...
@@ -285,7 +284,13 @@
-
(
UIButton
*
)
settingButton
{
-
(
UIButton
*
)
settingButton
{
if
(
_settingButton
==
nil
)
{
if
(
_settingButton
==
nil
)
{
_settingButton
=
[[
UIButton
alloc
]
initWithNormalImageName
:
@"riLine-settings-line 1"
selectedImgName
:
@"riLine-settings-line 1"
];
_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
;
return
_settingButton
;
}
}
-
(
UIScrollView
*
)
scrollView
{
-
(
UIScrollView
*
)
scrollView
{
...
...
FastService/Personal/
View/XVPersonalViewCell
.h
→
FastService/Personal/
Controller/XVSettingViewController
.h
View file @
69ff8776
//
//
// XV
PersonalViewCell
.h
// XV
SettingViewController
.h
// fastservice
// fastservice
//
//
// Created by xuning on
2/7/24
.
// Created by xuning on
4/27/25
.
// Copyright © 202
4
FastService. All rights reserved.
// Copyright © 202
5
FastService. All rights reserved.
//
//
#import
<UIKit/UIKit.h>
#import
"XVBaseViewController.h"
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@interface
XVPersonalViewCell
:
UITableViewCell
@interface
XVSettingViewController
:
XVBaseViewController
@property
(
nonatomic
,
strong
)
NSDictionary
*
item
;
@end
@end
...
...
FastService/Personal/Controller/XVSettingViewController.m
0 → 100644
View file @
69ff8776
//
// 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
FastService/Personal/View/XVPersonalFooterView.m
deleted
100644 → 0
View file @
f3faef41
//
// 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
FastService/Personal/View/XVPersonalViewCell.m
deleted
100644 → 0
View file @
f3faef41
//
// 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
FastService/Personal/View/XV
PersonalFooterView
.h
→
FastService/Personal/View/XV
SettingTableViewCell
.h
View file @
69ff8776
//
//
// XV
PersonalFooterView
.h
// XV
SettingTableViewCell
.h
// fastservice
// fastservice
//
//
// Created by xuning on
2/8/24
.
// Created by xuning on
4/27/25
.
// Copyright © 202
4
FastService. All rights reserved.
// Copyright © 202
5
FastService. All rights reserved.
//
//
#import <UIKit/UIKit.h>
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
NS_ASSUME_NONNULL_BEGIN
@interface
XVPersonalFooterView
:
UIView
@interface
XVSettingTableViewCell
:
UITableViewCell
@property
(
nonatomic
,
strong
)
NSDictionary
*
dict
;
@end
@end
...
...
FastService/Personal/View/XVSettingTableViewCell.m
0 → 100644
View file @
69ff8776
//
// 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
FastService/PrefixHeader.pch
View file @
69ff8776
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#import "UINavigation+SXFixSpace.h"
#import "UINavigation+SXFixSpace.h"
#import "UIBarButtonItem+SXCreate.h"
#import "UIBarButtonItem+SXCreate.h"
#import <UIViewController+CWLateralSlide.h>
//#import<BMKLocationKit/BMKLocationComponent.h>
//#import<BMKLocationKit/BMKLocationComponent.h>
...
@@ -48,6 +48,7 @@
...
@@ -48,6 +48,7 @@
#endif
#endif
#define IMG(imageName) [UIImage imageNamed:[NSString stringWithFormat:@"%@",imageName]]
#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 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 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 @@
...
@@ -104,6 +105,12 @@
//整个顶部的高度
//整个顶部的高度
#define KTOP_HEIGHT (KSTATUSBAR_HEIGHT + KNAVBAR_HEIGHT)
#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 ({\
#define IS_IPHONEX ({\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment