JDTableViewController.m 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //
  2. // JDTableViewController.m
  3. // kneet2
  4. //
  5. // Created by Created by Jason Lee on 10/1/15.
  6. // Copyright (c) 2015 ntels. All rights reserved.
  7. //
  8. #import "CustomTableView.h"
  9. #import "JDTableViewController.h"
  10. @interface JDTableViewController () {
  11. //groups, invite from sms,
  12. }
  13. @end
  14. #pragma mark - Class Definition
  15. @implementation JDTableViewController
  16. - (void)viewDidLoad {
  17. [super viewDidLoad];
  18. // Do any additional setup after loading the view.
  19. [self initUIOnSuper];
  20. [self prepareViewDidLoadOnSuper];
  21. }
  22. - (void)initUIOnSuper {
  23. self.tableView.separatorStyle = UITableViewCellSelectionStyleNone;
  24. self.tableView.tableFooterView = [[UIView alloc] init];
  25. }
  26. - (void)prepareViewDidLoadOnSuper {
  27. }
  28. #pragma mark - Main Logic
  29. #pragma mark - UITableView DataSource & Delegate
  30. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
  31. [tableView deselectRowAtIndexPath:indexPath animated:YES];
  32. }
  33. - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
  34. // Remove seperator inset
  35. if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
  36. [cell setSeparatorInset:UIEdgeInsetsZero];
  37. }
  38. // Prevent the cell from inheriting the Table View's margin settings
  39. if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
  40. [cell setPreservesSuperviewLayoutMargins:NO];
  41. }
  42. // Explictly set your cell's layout margins
  43. if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
  44. [cell setLayoutMargins:UIEdgeInsetsZero];
  45. }
  46. }
  47. #pragma mark - UI Events
  48. #pragma mark - MemoryWarning
  49. - (void)didReceiveMemoryWarning
  50. {
  51. [super didReceiveMemoryWarning];
  52. // Dispose of any resources that can be recreated.
  53. }
  54. @end