// // JXMyTopView.m // shiku_im // // Created by 123 on 2020/5/15. // Copyright © 2020 Reese. All rights reserved. // #import "JXServiceTopView.h" @interface JXServiceTopView() @property (weak, nonatomic) UIImageView *headIMG; @property (weak, nonatomic) UILabel *titeL; @property (weak, nonatomic) IBOutlet UIView *vipLeverL; @end @implementation JXServiceTopView +(instancetype)XIBJXServiceTopView{ return [[NSBundle mainBundle]loadNibNamed:@"JXServiceTopView" owner:self options:nil].firstObject; } -(void)awakeFromNib{ [super awakeFromNib];; UIView *navTitleView=[[UIView alloc]init]; navTitleView.frame = CGRectMake(0,0,JX_SCREEN_WIDTH,JX_SCREEN_TOP); [self addSubview:navTitleView]; UIButton *gabtn=[[UIButton alloc]initWithFrame:CGRectMake(0,JX_STATUSBAR_H,44,44)]; [gabtn setImage:[UIImage imageNamed:@"goback"] forState:UIControlStateNormal]; [navTitleView addSubview:gabtn]; self.gobackBtn=gabtn; UILabel *navTitle=[[UILabel alloc]init]; navTitle.frame = CGRectMake(60,JX_STATUSBAR_H,JX_SCREEN_WIDTH-120,44); navTitle.font=[UIFont systemFontOfSize:15 weight:UIFontWeightMedium]; navTitle.textColor=[UIColor whiteColor]; navTitle.text=@"我的客服"; navTitle.textAlignment=NSTextAlignmentCenter; [navTitleView addSubview:navTitle]; UIButton *feedBtn=[[UIButton alloc]init]; feedBtn.frame = CGRectMake(JX_SCREEN_WIDTH-100,JX_STATUSBAR_H,85,44); feedBtn.titleLabel.font=[UIFont systemFontOfSize:15 weight:UIFontWeightMedium]; [feedBtn setTitle:@"投诉建议" forState:UIControlStateNormal]; feedBtn.contentHorizontalAlignment=UIControlContentHorizontalAlignmentRight; [navTitleView addSubview:feedBtn]; [feedBtn addTarget:self action:@selector(feedbackBtn:) forControlEvents:UIControlEventTouchUpInside]; UIView *headView=[[UIView alloc]init]; headView.frame = CGRectMake(20,90,JX_SCREEN_WIDTH-40,90); headView.backgroundColor=[UIColor whiteColor]; [self addSubview:headView]; UIImageView *headIMG=[[UIImageView alloc]init]; headIMG.frame = CGRectMake(10,10,70,70); headIMG.image=[UIImage imageNamed:@"组1"]; [headView addSubview:headIMG]; UILabel *titleL=[[UILabel alloc]init]; titleL.frame = CGRectMake(CGRectGetMaxX(headIMG.frame)+9,20,JX_SCREEN_WIDTH/2,15); titleL.font=[UIFont systemFontOfSize:15 weight:UIFontWeightMedium]; titleL.textColor=kRGBColor51; titleL.text=@"h12345"; [headView addSubview:titleL]; UILabel *contetL=[[UILabel alloc]init]; contetL.frame = CGRectMake(CGRectGetMaxX(headIMG.frame)+9,CGRectGetMaxY(titleL.frame)+9,JX_SCREEN_WIDTH/2,13); contetL.font=[UIFont systemFontOfSize:13 weight:UIFontWeightMedium]; contetL.textColor=kRGBColor151; contetL.text=@"欢迎来到客服中心"; [headView addSubview:contetL]; } - (void)feedbackBtn:(UIButton *)button{ if (_topViewBlockBtn) { _topViewBlockBtn(button); } } @end