CCControlCenterActivity.m 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. #pragma --------------------------------------------------------------------------------------------
  32. #pragma mark - ==== Table ====
  33. #pragma --------------------------------------------------------------------------------------------
  34. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
  35. {
  36. return 50;
  37. }
  38. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
  39. {
  40. return 0;
  41. }
  42. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  43. {
  44. return 0;
  45. }
  46. - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
  47. {
  48. return 13.0f;
  49. }
  50. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  51. {
  52. CCControlCenterActivityCell *cell = (CCControlCenterActivityCell *)[tableView dequeueReusableCellWithIdentifier:@"ControlCenterActivityCell" forIndexPath:indexPath];
  53. return cell;
  54. }
  55. @end