// // CCControlCenterActivity.m // Nextcloud // // Created by Marino Faggiana on 01/03/17. // Copyright © 2017 TWS. All rights reserved. // #import "CCControlCenterActivity.h" #import "AppDelegate.h" #import "CCControlCenterActivityCell.h" @implementation CCControlCenterActivity #pragma -------------------------------------------------------------------------------------------- #pragma mark ===== Init ===== #pragma -------------------------------------------------------------------------------------------- - (id)initWithCoder:(NSCoder *)aDecoder { if (self = [super initWithCoder:aDecoder]) { app.controlCenterActivity = self; } return self; } - (void)viewDidLoad { [super viewDidLoad]; // Custom Cell [_tableView registerNib:[UINib nibWithNibName:@"CCControlCenterActivityCell" bundle:nil] forCellReuseIdentifier:@"ControlCenterActivityCell"]; _tableView.delegate = self; _tableView.dataSource = self; _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; _tableView.backgroundColor = [UIColor greenColor]; } // Apparirà - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; app.controlCenter.noRecord.hidden = YES; } // E' arrivato - (void)viewDidAppear:(BOOL)animated { [super viewDidAppear:animated]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; } #pragma -------------------------------------------------------------------------------------------- #pragma mark - ==== Table ==== #pragma -------------------------------------------------------------------------------------------- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 50; } - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 0; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 0; } - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { return 13.0f; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { CCControlCenterActivityCell *cell = (CCControlCenterActivityCell *)[tableView dequeueReusableCellWithIdentifier:@"ControlCenterActivityCell" forIndexPath:indexPath]; return cell; } @end