From 3bd7d3e57f4f537d6798745e1324cc2f336b8ebe Mon Sep 17 00:00:00 2001 From: Gautier Pelloux-Prayer Date: Fri, 23 Oct 2015 17:32:18 +0200 Subject: [PATCH] HistoryDetails: add icons in tableview --- Classes/HistoryDetailsTableView.m | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/Classes/HistoryDetailsTableView.m b/Classes/HistoryDetailsTableView.m index 7e3832036..98cfc9be4 100644 --- a/Classes/HistoryDetailsTableView.m +++ b/Classes/HistoryDetailsTableView.m @@ -35,6 +35,24 @@ return [callLogs count]; } +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + UIView *tempView = [[UIView alloc] initWithFrame:tableView.frame]; + tempView.backgroundColor = [UIColor whiteColor]; + + CGRect frame = tempView.frame; + frame.origin.y = 0; + frame.size.height = 44; + UILabel *tempLabel = [[UILabel alloc] initWithFrame:frame]; + tempLabel.backgroundColor = [UIColor clearColor]; + tempLabel.textColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"color_E.png"]]; + tempLabel.text = NSLocalizedString(@"Calls", nil); + tempLabel.textAlignment = NSTextAlignmentCenter; + tempLabel.font = [UIFont boldSystemFontOfSize:17]; + [tempView addSubview:tempLabel]; + + return tempView; +} + - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *kCellId = @"UITableViewCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];