KSBaseTableViewController.m 886 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // KSBaseTableViewController.m
  3. // StudentDaya
  4. //
  5. // Created by Kyle on 2020/10/27.
  6. // Copyright © 2020 DayaMusic. All rights reserved.
  7. //
  8. #import "KSBaseTableViewController.h"
  9. @interface KSBaseTableViewController ()
  10. @end
  11. @implementation KSBaseTableViewController
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. [self closeSelfSizing];
  15. self.tableView.tableFooterView = [UIView new];
  16. self.tableView.backgroundColor = HexRGB(0xf0f0f6);
  17. self.tableView.separatorColor = HexRGB(0xdfdfdf);
  18. }
  19. - (void)closeSelfSizing {
  20. self.tableView.estimatedRowHeight = 0;
  21. self.tableView.estimatedSectionHeaderHeight = 0;
  22. self.tableView.estimatedSectionFooterHeight = 0;
  23. }
  24. - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  25. UIView *view = [UIView new];
  26. view.backgroundColor = HexRGB(0xf0f0f6);
  27. return view;
  28. }
  29. @end