RDSSelectDeviceSubVC.m 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // RDSSelectDeviceSubVC.m
  3. // Temperature
  4. //
  5. // Created by 姓二名哈字富贵儿 on 2023/8/17.
  6. //
  7. #import "RDSSelectDeviceSubVC.h"
  8. @interface RDSSelectDeviceSubVC () <UITableViewDelegate, UITableViewDataSource>
  9. @property (nonatomic, strong) UITableView *tableView;
  10. @end
  11. @implementation RDSSelectDeviceSubVC
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. [self configSubviews];
  15. }
  16. - (void)configSubviews {
  17. self.tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
  18. self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  19. self.tableView.rowHeight = 110;
  20. self.tableView.delegate = self;
  21. self.tableView.dataSource = self;
  22. [self.view addSubview:self.tableView];
  23. [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
  24. make.left.right.bottom.equalTo(self.view);
  25. make.top.equalTo(self.view.mas_safeAreaLayoutGuideTop);
  26. }];
  27. }
  28. #pragma mark - UITableViewDataSource
  29. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  30. return self.dataSource.count;
  31. }
  32. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  33. return 1;
  34. }
  35. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  36. return [[UITableViewCell alloc] init];
  37. }
  38. @end