// // MyTDGroupView.m // smartRhino // // Created by tederen on 2019/10/31. // Copyright © 2019 tederen. All rights reserved. // #import "MyTDGroupView.h" @interface MyTDGroupView() @end @implementation MyTDGroupView - (instancetype)init { self = [super init]; if (self) { self.backgroundColor = [UIColor whiteColor]; [self addSubview:self.button]; self.button.frame = CGRectMake(15,10,kGXScreenWidth - 30,30); [self.button setBackgroundColor:UIColorHex(F5F6F8)]; [self.button setTitleColor:UIColorHex(ABACAE) forState:UIControlStateNormal]; self.button.layer.cornerRadius = 15; self.button.layer.borderWidth = 0.f; self.button.layer.masksToBounds = YES; } return self; } - (instancetype)initWithFrame:(CGRect)frame { self = [super initWithFrame:frame]; if (self) { self.backgroundColor = [UIColor whiteColor]; [self addSubview:self.button]; self.button.frame = CGRectMake(15,0,frame.size.width - 30,frame.size.height); [self.button setBackgroundColor:UIColorHex(0xffffff)]; [self.button setTitleColor:UIColorHex(0x999999) forState:UIControlStateNormal]; self.button.layer.borderWidth = 0.5f; self.button.layer.borderColor = UIColorHex(0xDADADA).CGColor; self.button.layer.cornerRadius = frame.size.height * 0.5; self.button.layer.masksToBounds = YES; } return self; } - (TDButton *)button{ if (!_button) { _button = [[TDButton alloc] init]; [_button setTitle:@" 搜索" forState:UIControlStateNormal]; [[_button titleLabel] setFont:[UIFont fontWithName:@"PingFang-SC-Regular" size:13.f]]; [_button setImage:IMG(@"chatmsg_search_icon") forState:UIControlStateNormal]; } return _button; } @end