12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- //
- // KXQuestionButton.m
- // QBCS
- //
- // Created by kuxuan on 2017/6/9.
- // Copyright © 2017年 kuxuan. All rights reserved.
- //
- #import "KXQuestionButton.h"
- @implementation KXQuestionButton
- -(instancetype)initWithFrame:(CGRect)frame
- {
- if (self==[super initWithFrame:frame]) {
- self.backgroundColor=[UIColor whiteColor];
- [self setupUI];
- }
- return self;
- }
- -(void)setupUI
- {
- self.nameLabel=[[UILabel alloc]initWithFrame:CGRectMake(14, 20, SCREEN_WIDTH-40, 15)];
- self.nameLabel.textColor=[UIColor titleColor];
- self.nameLabel.font=[UIFont systemFontOfSize:15];
- self.nameLabel.numberOfLines=0;
- self.nameLabel.preferredMaxLayoutWidth=SCREEN_WIDTH-70;
- [self addSubview:self.nameLabel];
- [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(self);
- make.left.mas_equalTo(self).offset(20*SCREEN_MUTI);
- }];
-
- self.imageView=[[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH-30, 20, 10, 15)];
- [self addSubview:self.imageView];
- [self.imageView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.centerY.mas_equalTo(self);
- make.right.mas_equalTo(self).offset(-20*SCREEN_MUTI);
- }];
-
- UIView *line = [[UIView alloc] init];
- line.backgroundColor = [UIColor KXColorWithHex:0xe9e9e9];
- [self addSubview:line];
- [line mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(self).offset(15*SCREEN_MUTI);
- make.right.mas_equalTo(self).offset(-15*SCREEN_MUTI);
- make.bottom.mas_equalTo(self);
- make.height.mas_equalTo(@1);
- }];
- }
- -(void)setImageInpage
- {
- UIImageView *inpage=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@""]];
- NSLog(@"%@",inpage);
- }
- @end
|