|
|
@@ -18,7 +18,8 @@
|
|
|
|
|
|
@property (weak, nonatomic) IBOutlet UIView *bgView;
|
|
|
|
|
|
-@property (nonatomic, strong) JXCategoryTitleBackgroundView *titleCategoryView;
|
|
|
+@property (nonatomic, strong) JXCategoryTitleView *titleCategoryView;
|
|
|
+@property (nonatomic, strong) UIView *titleBgView;
|
|
|
|
|
|
@property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
|
|
|
|
|
|
@@ -38,6 +39,7 @@
|
|
|
[super awakeFromNib];
|
|
|
|
|
|
self.titleLab.text = NSLocalString(@"mimo_anchor_task_title");
|
|
|
+ self.titleLab.font = [MOTextTools getTheFontWithSize:16.0 AndFontName:@"Gilroy"];
|
|
|
|
|
|
self.bgView.layer.cornerRadius = 16.0;
|
|
|
self.bgView.layer.maskedCorners = kCALayerMinXMinYCorner | kCALayerMaxXMinYCorner;
|
|
|
@@ -55,35 +57,59 @@
|
|
|
[needTitleArr addObject:NSLocalString(@"mimo_anchor_task_months_day_title")];
|
|
|
}
|
|
|
|
|
|
- CGFloat width = 100.0 * needTitleArr.count + 5.0 * 2;
|
|
|
+ CGFloat totalItemWidth = SCREENWIDTH;
|
|
|
+ CGFloat cellWidth = totalItemWidth / 3.0;
|
|
|
+ CGFloat width = cellWidth * needTitleArr.count;
|
|
|
+
|
|
|
+ CGFloat titleBgViewWidth = width - 10.0;
|
|
|
+ [self.bgView addSubview:self.titleBgView];
|
|
|
+ [self.titleBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.top.equalTo(self.bgView).offset(50.0);
|
|
|
+ make.centerX.equalTo(self.bgView);
|
|
|
+ make.width.equalTo(@(titleBgViewWidth));
|
|
|
+ make.height.equalTo(@32.0);
|
|
|
+ }];
|
|
|
+ self.titleBgView.layer.cornerRadius = 32.0 / 2.0;
|
|
|
+
|
|
|
+
|
|
|
[self.bgView addSubview:self.titleCategoryView];
|
|
|
[self.titleCategoryView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.top.equalTo(self.bgView).offset(44.0);
|
|
|
- make.left.equalTo(self.bgView).offset(13.0);
|
|
|
+ make.centerY.equalTo(self.titleBgView.mas_centerY);
|
|
|
+ make.centerX.equalTo(self.bgView);
|
|
|
make.width.equalTo(@(width));
|
|
|
- make.height.equalTo(@24.0);
|
|
|
+ make.height.equalTo(@70.0);
|
|
|
}];
|
|
|
|
|
|
self.titleCategoryView.titles = needTitleArr;
|
|
|
- self.titleCategoryView.layer.cornerRadius = 24.0 / 2.0;
|
|
|
- self.titleCategoryView.layer.masksToBounds = YES;
|
|
|
- self.titleCategoryView.cellSpacing = 5.0;
|
|
|
- self.titleCategoryView.cellWidth = 100.0;
|
|
|
- self.titleCategoryView.cellWidthIncrement = 0.0;
|
|
|
- self.titleCategoryView.contentEdgeInsetLeft = 0.0;
|
|
|
- self.titleCategoryView.contentEdgeInsetRight = 0.0;
|
|
|
- self.titleCategoryView.titleColor = [MOTools colorWithHexString:@"#8F8F8F" alpha:1.0];
|
|
|
- self.titleCategoryView.titleSelectedColor = [UIColor blackColor];
|
|
|
- self.titleCategoryView.titleFont = [UIFont systemFontOfSize:12.0];
|
|
|
- self.titleCategoryView.titleSelectedFont = [UIFont boldSystemFontOfSize:14.0];
|
|
|
- self.titleCategoryView.backgroundCornerRadius = 24.0 / 2.0;
|
|
|
- self.titleCategoryView.normalBackgroundColor = [MOTools colorWithHexString:@"#F3F3F3" alpha:1.0];
|
|
|
- self.titleCategoryView.selectedBackgroundColor = [MOTools colorWithHexString:@"#F3F3F3" alpha:1.0];
|
|
|
- self.titleCategoryView.selectedBorderColor = [UIColor whiteColor];
|
|
|
+ self.titleCategoryView.cellSpacing = 0.0;
|
|
|
+ self.titleCategoryView.cellWidth = cellWidth;
|
|
|
+ self.titleCategoryView.titleColor = [MOTools colorWithHexString:@"#737373" alpha:1.0];
|
|
|
+ self.titleCategoryView.titleSelectedColor = kBaseBtnBgColor;
|
|
|
+ self.titleCategoryView.titleLabelMaskEnabled = YES;
|
|
|
+ self.titleCategoryView.titleFont = [MOTextTools getTheFontWithSize:14.0 AndFontName:@"Akrobat"];
|
|
|
+ self.titleCategoryView.backgroundColor = [UIColor clearColor];
|
|
|
+
|
|
|
+
|
|
|
+ JXCategoryIndicatorBackgroundView *backgroundView = [[JXCategoryIndicatorBackgroundView alloc] init];
|
|
|
+ backgroundView.indicatorHeight = 70.0;
|
|
|
+ backgroundView.indicatorWidth = 148.0;
|
|
|
+ backgroundView.indicatorWidthIncrement = 0;
|
|
|
+ backgroundView.indicatorColor = [UIColor clearColor];
|
|
|
+ backgroundView.verticalMargin = 4.0;
|
|
|
+ UIImageView *imgBgView = [[UIImageView alloc] init];
|
|
|
+ imgBgView.contentMode = UIViewContentModeScaleToFill;
|
|
|
+ [imgBgView setImage:[UIImage imageNamed:@"icon_rank_btn_bg_apple"]];
|
|
|
+ [backgroundView addSubview:imgBgView];
|
|
|
+ [imgBgView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
+ make.edges.equalTo(backgroundView);
|
|
|
+ }];
|
|
|
+
|
|
|
+
|
|
|
+ self.titleCategoryView.indicators = @[backgroundView];
|
|
|
|
|
|
[self.bgView addSubview:self.listContainerView];
|
|
|
[self.listContainerView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
- make.top.equalTo(self.bgView).offset(78.0);
|
|
|
+ make.top.equalTo(self.bgView).offset(102.0);
|
|
|
make.left.right.bottom.equalTo(self.bgView);
|
|
|
}];
|
|
|
self.titleCategoryView.listContainer = self.listContainerView;
|
|
|
@@ -172,9 +198,9 @@
|
|
|
}
|
|
|
|
|
|
#pragma mark - Lazy
|
|
|
-- (JXCategoryTitleBackgroundView *)titleCategoryView{
|
|
|
+- (JXCategoryTitleView *)titleCategoryView{
|
|
|
if(!_titleCategoryView){
|
|
|
- _titleCategoryView = [[JXCategoryTitleBackgroundView alloc] init];
|
|
|
+ _titleCategoryView = [[JXCategoryTitleView alloc] init];
|
|
|
_titleCategoryView.delegate = self;
|
|
|
}
|
|
|
return _titleCategoryView;
|
|
|
@@ -194,4 +220,12 @@
|
|
|
return _ruleView;
|
|
|
}
|
|
|
|
|
|
+- (UIView *)titleBgView{
|
|
|
+ if(!_titleBgView){
|
|
|
+ _titleBgView = [[UIView alloc] init];
|
|
|
+ _titleBgView.backgroundColor = [MOTools colorWithHexString:@"#000000" alpha:0.05];
|
|
|
+ }
|
|
|
+ return _titleBgView;
|
|
|
+}
|
|
|
+
|
|
|
@end
|