123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- //
- // JXtopShowVIew.h
- // shiku_im
- //
- // Created by 123 on 2020/5/21.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import <UIKit/UIKit.h>
- #import "JLSelectModel.h"
-
- typedef void(^JxGuanXinBlockBtn)(UIButton *btn);
- @interface JXtopShowVIew : UIView
- @property (nonatomic,strong) JLSelectItemModel *selectItemModel;
- +(instancetype)xibJXtopShowVIew;
- @property (weak, nonatomic) IBOutlet UIButton *caizongBtn;
- @property (weak, nonatomic) IBOutlet UIButton *tebieBtn;
- @property (nonatomic,strong) NSMutableArray *dataArr;
-
- @property (weak, nonatomic) IBOutlet UIView *xiaLineView;
- @property (nonatomic,copy) JxGuanXinBlockBtn jxGuanXinBlockBtn;
- @property (weak, nonatomic) IBOutlet UIButton *tebieGuanXin;
- @end
-
- /**
-
- -(void)setDataArr:(NSMutableArray *)dataArr{
- _dataArr=dataArr;
-
- NSArray * titles1=@[@"全部",@"食品饮料",@"进口食品",@"美容化妆",@"母婴玩具"];
- CGFloat titBtnX =10;
- for(int i =0; i <titles1.count; i++){
- UIButton *titBtn = [UIButton buttonWithType:UIButtonTypeCustom];
- titBtn.titleLabel.font= [UIFont systemFontOfSize:15 weight:UIFontWeightMedium];
- [titBtn setTitleColor:kRGBColor51 forState:UIControlStateNormal];
- [titBtn setTitle:titles1[i] forState:UIControlStateNormal];
- titBtn.backgroundColor=[UIColor whiteColor];
- titBtn.layer.cornerRadius=10;
- titBtn.layer.masksToBounds=YES;
- titBtn.tag=i;
- CGSize titleSize=[self titleBtnWight:titles1[i] and:titBtn];
- CGFloat titBtnW = titleSize.width+0;
- titBtn.frame=CGRectMake(titBtnX, 3, titBtnW, 24);
- titBtnX += titBtnW + 10;
- [_topScorllView addSubview:titBtn];
-
- }
- _topScorllView.contentSize=CGSizeMake(10+titles1.count*((JX_SCREEN_WIDTH -100)/5 + 25), 0);
-
-
- }
- UIView *topView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, self.qiuIMG.frame.size.width, self.qiuIMG.frame.size.height)];
- [_topViewSubView addSubview:topView];
-
- UILabel *qiShuL=[[UILabel alloc]init];
- qiShuL.text=@"117期";
- qiShuL.textColor=kRGBColor51;
- qiShuL.font=[UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
- [topView addSubview:qiShuL];
- self.qishuL=qiShuL;
- [qiShuL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(topView.mas_centerY);
- make.left.mas_equalTo(10);
- }];
-
- UILabel *hezhiLL=[[UILabel alloc]init];
- hezhiLL.text=@" ";
- hezhiLL.textColor=kRGBColor51;
- hezhiLL.font=[UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
- [topView addSubview:hezhiLL];
- [hezhiLL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(topView.mas_centerY);
- make.right.mas_equalTo(-8);
- }];
-
- UIView *qiuIMG=[[UIView alloc]init];
- hezhiLL.text=@" ";
- hezhiLL.backgroundColor=[UIColor cyanColor];
- hezhiLL.font=[UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
- [topView addSubview:hezhiLL];
- [hezhiLL mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(topView.mas_centerY);
- make.right.mas_equalTo(-8);
- }];
-
- */
|