CCControlCenterActivity.m 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //
  2. // CCControlCenterActivity.m
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 01/03/17.
  6. // Copyright © 2017 TWS. All rights reserved.
  7. //
  8. #import "CCControlCenterActivity.h"
  9. #import "AppDelegate.h"
  10. #import "CCControlCenterActivityCell.h"
  11. @implementation CCControlCenterActivity
  12. #pragma --------------------------------------------------------------------------------------------
  13. #pragma mark ===== Init =====
  14. #pragma --------------------------------------------------------------------------------------------
  15. - (id)initWithCoder:(NSCoder *)aDecoder
  16. {
  17. if (self = [super initWithCoder:aDecoder]) {
  18. app.controlCenterActivity = self;
  19. }
  20. return self;
  21. }
  22. - (void)viewDidLoad {
  23. [super viewDidLoad];
  24. // Custom Cell
  25. [_tableView registerNib:[UINib nibWithNibName:@"CCControlCenterActivityCell" bundle:nil] forCellReuseIdentifier:@"ControlCenterActivityCell"];
  26. _tableView.delegate = self;
  27. _tableView.dataSource = self;
  28. _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  29. _tableView.backgroundColor = [UIColor greenColor];
  30. }
  31. // Apparirà
  32. - (void)viewWillAppear:(BOOL)animated
  33. {
  34. [super viewWillAppear:animated];
  35. app.controlCenter.noRecord.hidden = YES;
  36. }
  37. // E' arrivato
  38. - (void)viewDidAppear:(BOOL)animated
  39. {
  40. [super viewDidAppear:animated];
  41. }
  42. - (void)didReceiveMemoryWarning {
  43. [super didReceiveMemoryWarning];
  44. }
  45. #pragma --------------------------------------------------------------------------------------------
  46. #pragma mark - ==== Table ====
  47. #pragma --------------------------------------------------------------------------------------------
  48. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  49. {
  50. return 50;
  51. }
  52. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  53. {
  54. return 0;
  55. }
  56. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  57. {
  58. return 0;
  59. }
  60. - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
  61. {
  62. return 13.0f;
  63. }
  64. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  65. {
  66. CCControlCenterActivityCell *cell = (CCControlCenterActivityCell *)[tableView dequeueReusableCellWithIdentifier:@"ControlCenterActivityCell" forIndexPath:indexPath];
  67. return cell;
  68. }
  69. @end