Commit ded58319 by xuning

订单排序

parent a1310b86
......@@ -7,7 +7,7 @@
<key>fastservice.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>18</integer>
<integer>19</integer>
</dict>
</dict>
</dict>
......
......@@ -7,15 +7,155 @@
//
#import "XVOrderSortView.h"
@interface XVOrderSortView()
@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UIButton *systemButton;
@property (nonatomic, strong) UILabel *distanceLabel;
@property (nonatomic, strong) UILabel *timeLabel;
@property (nonatomic, strong) UIButton *distanceAscButton;
@property (nonatomic, strong) UIButton *distanceDescButton;
@property (nonatomic, strong) UIButton *timeAscButton;
@property (nonatomic, strong) UIButton *timeDescButton;
@end
@implementation XVOrderSortView
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
// Drawing code
- (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(9);
make.left.mas_equalTo(self).mas_offset(16);
}];
[self addSubview:self.systemButton];
[self.systemButton sizeToFit];
[self.systemButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.titleLabel);
make.left.mas_equalTo(self.titleLabel.mas_right).mas_offset(15);
make.width.mas_equalTo(60);
make.height.mas_equalTo(15);
}];
kViewBorderRadius(self.systemButton, 4, 0, [UIColor clearColor]);
[self addSubview:self.distanceLabel];
[self.distanceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.titleLabel);
make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_offset(20);
}];
[self addSubview:self.timeLabel];
[self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.mas_equalTo(self.titleLabel);
make.top.mas_equalTo(self.distanceLabel.mas_bottom).mas_offset(18);
}];
[self addSubview:self.distanceAscButton];
[self addSubview:self.distanceDescButton];
[self.distanceAscButton sizeToFit];
[self.distanceDescButton sizeToFit];
[self.distanceAscButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.distanceLabel);
make.left.mas_equalTo(self.distanceLabel.mas_right).mas_offset(33);
make.size.mas_equalTo(CGSizeMake(94, 17));
}];
[self.distanceDescButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.distanceLabel);
make.left.mas_equalTo(self.distanceAscButton.mas_right).mas_offset(18);
make.size.mas_equalTo(CGSizeMake(94, 17));
}];
[self addSubview:self.timeAscButton];
[self addSubview:self.timeDescButton];
[self.timeAscButton sizeToFit];
[self.timeDescButton sizeToFit];
[self.timeAscButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.timeLabel);
make.left.mas_equalTo(self.timeLabel.mas_right).mas_offset(33);
make.size.mas_equalTo(CGSizeMake(94, 17));
}];
[self.timeDescButton mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerY.mas_equalTo(self.timeLabel);
make.left.mas_equalTo(self.timeAscButton.mas_right).mas_offset(18);
make.size.mas_equalTo(CGSizeMake(94, 17));
}];
}
- (UILabel *)titleLabel {
if(_titleLabel == nil) {
_titleLabel = [[UILabel alloc]initWithText:@"订单排序" textColor:F_3D3B4F_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:12];
}
return _titleLabel;
}
- (UIButton *)systemButton {
if(_systemButton == nil) {
_systemButton = [[UIButton alloc]initWithTitle:@"系统推荐" fontSize:12 titleColor:[UIColor whiteColor] bgColor:COLOR_THEMEGRENN];
}
return _systemButton;
}
- (UILabel *)distanceLabel {
if(_distanceLabel == nil) {
_distanceLabel = [[UILabel alloc]initWithText:@"按距离排序" textColor:F_606060_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:12];
}
return _distanceLabel;
}
- (UILabel *)timeLabel {
if(_timeLabel == nil) {
_timeLabel = [[UILabel alloc]initWithText:@"按时间排序" textColor:F_606060_COLOR textAlignment:(NSTextAlignmentLeft) fontSize:12];
}
return _timeLabel;
}
- (UIButton *)distanceAscButton {
if(_distanceAscButton == nil) {
_distanceAscButton = [[UIButton alloc]initWithTitle:@"取货地由近及远" fontSize:12 titleColor:[UIColor colorWithHexString:@"#737272"] bgColor:F7_3_COLOR];
}
return _distanceAscButton;
}
- (UIButton *)distanceDescButton {
if(_distanceDescButton == nil) {
_distanceDescButton = [[UIButton alloc]initWithTitle:@"取货地由远及近" fontSize:12 titleColor:[UIColor colorWithHexString:@"#737272"] bgColor:F7_3_COLOR];
}
return _distanceDescButton;
}
- (UIButton *)timeAscButton {
if(_timeAscButton == nil) {
_timeAscButton = [[UIButton alloc]initWithTitle:@"取货时间最近" fontSize:12 titleColor:[UIColor colorWithHexString:@"#737272"] bgColor:F7_3_COLOR];
}
return _timeAscButton;
}
- (UIButton *)timeDescButton {
if(_timeDescButton == nil) {
_timeDescButton = [[UIButton alloc]initWithTitle:@"取货时间最远" fontSize:12 titleColor:[UIColor colorWithHexString:@"#737272"] bgColor:F7_3_COLOR];
}
return _timeDescButton;
}
*/
@end
......@@ -57,6 +57,7 @@
#define F_7D7D7d_COLOR [UIColor colorWithHexString:@"#7D7D7D"]
#define F_9B9B9B_COLOR [UIColor colorWithHexString:@"#9B9B9B"]
#define F_666666_COLOR [UIColor colorWithHexString:@"#666666"]
#define F_606060_COLOR [UIColor colorWithHexString:@"#606060"]
#define F_BBBBBB_COLOR [UIColor colorWithHexString:@"#BBBBBB"]
#define E9_3_COLOR [UIColor colorWithHexString:@"#e9e9e9"]
......
......@@ -32,5 +32,7 @@ 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'
end
......@@ -48,6 +48,18 @@ 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)
......@@ -75,6 +87,7 @@ DEPENDENCIES:
- MBProgressHUD
- MJExtension
- MJRefresh
- MMDrawerController (~> 0.5.7)
- SAMKeychain
- SDWebImage
- YYKit
......@@ -95,6 +108,7 @@ SPEC REPOS:
- MBProgressHUD
- MJExtension
- MJRefresh
- MMDrawerController
- SAMKeychain
- SDWebImage
- YYKit
......@@ -114,10 +128,11 @@ SPEC CHECKSUMS:
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
MJExtension: 21c5f6f8c4d5d8844b7ae8fbae08fed0b501f961
MJRefresh: fdf5e979eb406a0341468932d1dfc8b7f9fce961
MMDrawerController: 7a4cf8e25596bf2434e03ce50d22a8608ddee6a1
SAMKeychain: 483e1c9f32984d50ca961e26818a534283b4cd5c
SDWebImage: 8ab87d4b3e5cc4927bd47f78db6ceb0b94442577
YYKit: 7cda43304a8dc3696c449041e2cb3107b4e236e7
PODFILE CHECKSUM: 4a2c0fd8eb861b7ea7718d39220c186e3098ab1b
PODFILE CHECKSUM: 1d16adcabfafa5b9a2b254509261600f723d9dc6
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