123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- //
- // JXMyTopView.m
- // shiku_im
- //
- // Created by 123 on 2020/5/15.
- // Copyright © 2020 Reese. All rights reserved.
- //
- #import "JXMyTopView.h"
- #import "MJButton.h"
- @interface JXMyTopView()
- @end
- @implementation JXMyTopView
-
- +(instancetype)XIBJXXMGTopView{
-
- return [[NSBundle mainBundle]loadNibNamed:@"JXMyTopView" owner:self options:nil].firstObject;
- }
- -(void)awakeFromNib{
- [super awakeFromNib];;
- self.headMyIMG.layer.cornerRadius=35;
- self.headMyIMG.layer.masksToBounds=YES;
-
-
- NSArray * titles=@[@"即信客服",@"QQ客服",@"电话客服",@"视频客服"];
- NSArray * imageS=@[@"jxkf",@"qkf",@"dhk",@"spkf"];
- CGFloat titBtnH =(JX_SCREEN_WIDTH-20-80)/4;
- for(int i =0; i <titles.count; i++){
-
- MJButton *titBtn = [MJButton buttonWithType:UIButtonTypeCustom];
- //titBtn.backgroundColor=[UIColor yellowColor];
- [titBtn setImage:[UIImage imageNamed:imageS[i]] forState:UIControlStateNormal];
- [titBtn setTitle:titles[i] forState:UIControlStateNormal];
- titBtn.contentHorizontalAlignment=UIControlContentHorizontalAlignmentLeft;
- titBtn.tag=i;
- [_titleBtnView addSubview:titBtn];
- [titBtn addTarget:self action:@selector(phbangAndPackageBtn:) forControlEvents:UIControlEventTouchUpInside];
- titBtn.frame=CGRectMake(5+i*(titBtnH +20), 10, titBtnH, titBtnH);
- }
-
- }
- /**
- * 排行榜。即信钱包
- */
- - (IBAction)phbangAndPackageBtn:(UIButton *)sender {
-
-
- if (_paihangbang) {
- _paihangbang(sender);
- }
- }
- - (void)titleClick:(UIButton *)button{
-
- if (_topViewBlockBtn) {
- _topViewBlockBtn(button);
- }
-
- }
- @end
|