AlarmConfigTableViewCell.m 728 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // AlarmConfigTableViewCell.m
  3. // XMEye
  4. //
  5. // Created by Levi on 2018/5/10.
  6. // Copyright © 2018年 Megatron. All rights reserved.
  7. //
  8. #import "AlarmConfigTableViewCell.h"
  9. #import "Header.h"
  10. @implementation AlarmConfigTableViewCell
  11. -(UISwitch *)mySwitch{
  12. if (!_mySwitch) {
  13. _mySwitch = [[UISwitch alloc] initWithFrame:CGRectMake(WIDTH - 70, 7, 50, 30)];
  14. }
  15. return _mySwitch;
  16. }
  17. -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  18. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  19. if (self) {
  20. [self configSubView];
  21. }
  22. return self;
  23. }
  24. -(void)configSubView{
  25. [self.contentView addSubview:self.mySwitch];
  26. }
  27. @end