MyTDGroupView.m 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // MyTDGroupView.m
  3. // smartRhino
  4. //
  5. // Created by tederen on 2019/10/31.
  6. // Copyright © 2019 tederen. All rights reserved.
  7. //
  8. #import "MyTDGroupView.h"
  9. @interface MyTDGroupView()
  10. @end
  11. @implementation MyTDGroupView
  12. - (instancetype)init
  13. {
  14. self = [super init];
  15. if (self) {
  16. self.backgroundColor = [UIColor whiteColor];
  17. [self addSubview:self.button];
  18. self.button.frame = CGRectMake(15,10,kGXScreenWidth - 30,30);
  19. }
  20. return self;
  21. }
  22. - (TDButton *)button{
  23. if (!_button) {
  24. _button = [[TDButton alloc] init];
  25. [_button setTitle:@" 搜索" forState:UIControlStateNormal];
  26. [_button setBackgroundColor:UIColorHex(F5F6F8)];
  27. [_button setTitleColor:UIColorHex(ABACAE) forState:UIControlStateNormal];
  28. [[_button titleLabel] setFont:[UIFont fontWithName:@"PingFang-SC-Regular" size:13.f]];
  29. [_button setImage:IMG(@"sousuo") forState:UIControlStateNormal];
  30. _button.layer.cornerRadius = 15;
  31. _button.layer.masksToBounds = YES;
  32. }
  33. return _button;
  34. }
  35. @end