BottomView.m 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // BottomView.m
  3. // Haishenghai-master
  4. //
  5. // Created by 刘云鸽 on 2019/2/25.
  6. // Copyright © 2019年 Haishenghai intelligence network technology. All rights reserved.
  7. //
  8. #import "BottomView.h"
  9. @implementation BottomView
  10. -(instancetype)initWithFrame:(CGRect)frame{
  11. self = [super initWithFrame:frame];
  12. if (self) {
  13. self.allBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  14. _allBtn.frame = CGRectMake(10, 0, 44, self.bounds.size.height);
  15. _allBtn.titleLabel.font = [UIFont systemFontOfSize:14];
  16. [_allBtn setTitle:@"全选" forState:UIControlStateNormal];
  17. [_allBtn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
  18. [self addSubview:_allBtn];
  19. self.deleteBtn = [UIButton buttonWithType:UIButtonTypeCustom];
  20. _deleteBtn.frame = CGRectMake(self.bounds.size.width-60, 0, 60, self.bounds.size.height);
  21. _deleteBtn.backgroundColor = [UIColor redColor];
  22. _deleteBtn.titleLabel.font = [UIFont systemFontOfSize:14];
  23. [_deleteBtn setTitle:@"删除" forState:UIControlStateNormal];
  24. [_deleteBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  25. [self addSubview:_deleteBtn];
  26. self.selectDevLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.bounds.size.width/2, 0, 120, self.bounds.size.height)];
  27. self.selectDevLabel.text =@"共选中0个设备";
  28. self.selectDevLabel.font =[UIFont systemFontOfSize:14];
  29. [self addSubview:_selectDevLabel];
  30. }
  31. return self;
  32. }
  33. /*
  34. // Only override drawRect: if you perform custom drawing.
  35. // An empty implementation adversely affects performance during animation.
  36. - (void)drawRect:(CGRect)rect {
  37. // Drawing code
  38. }
  39. */
  40. @end