-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransactionCell.m
More file actions
54 lines (43 loc) · 2.47 KB
/
TransactionCell.m
File metadata and controls
54 lines (43 loc) · 2.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// TransactionCell.m
// Family Farm
//
// Created by Axel Trajano on 5/11/14.
// Copyright (c) 2014 Axel S. Trajano. All rights reserved.
//
#import "TransactionCell.h"
#import "TransactionHeader.h"
@implementation TransactionCell
- (void)awakeFromNib
{
// Initialization code
TransactionHeader * cellView = [TransactionHeader new];
[self addSubview:cellView.view];
[cellView.view setTranslatesAutoresizingMaskIntoConstraints:NO];
[self addConstraint:[NSLayoutConstraint constraintWithItem:cellView.view attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeHeight multiplier:1 constant:0]];
[self addConstraint:[NSLayoutConstraint constraintWithItem:cellView.view attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeWidth multiplier:1 constant:0]];
[self addConstraint:[NSLayoutConstraint constraintWithItem:cellView.view attribute:NSLayoutAttributeLeft relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeft multiplier:1 constant:0]];
[self addConstraint:[NSLayoutConstraint constraintWithItem:cellView.view attribute:NSLayoutAttributeRight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeRight multiplier:1 constant:0]];
[self addConstraint:[NSLayoutConstraint constraintWithItem:cellView.view attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1 constant:0]];
[self addConstraint:[NSLayoutConstraint constraintWithItem:cellView.view attribute:NSLayoutAttributeBottom relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeBottom multiplier:1 constant:0]];
_serviceOffered = [cellView serviceLabel];
_serviceFee = [cellView serviceFeeLabel];
_landArea = [cellView landAreaLabel];
_balance = [cellView balanceLabel];
_transactionDate = [cellView dateLabel];
_notes = [cellView noteLabel];
UIColor * black = [UIColor blackColor];
[_serviceOffered setTextColor:black];
[_serviceFee setTextColor:black];
[_balance setTextColor:black];
[_landArea setTextColor:black];
[_transactionDate setTextColor:black];
[_notes setTextColor:black];
[self setAccessoryType:UITableViewCellAccessoryDetailButton];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end