-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPopoverItem.m
50 lines (44 loc) · 1023 Bytes
/
PopoverItem.m
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
//
// PopoverDaily.m
// daily Expenses
//
// Created by renan veloso silva on 11/07/13.
// Copyright (c) 2013 renan veloso silva. All rights reserved.
//
#import "PopoverItem.h"
#import "ItemManager.h"
@implementation PopoverItem
-(id)initWithId:(NSString*)idValue{
self = [super init];
if(self){
item = [[ItemManager sharedInstance] getSpendItemById:idValue];
}
return self;
}
-(void)viewWillAppear:(BOOL)animated{
_name.text = item.label;
_category.text = item.type;
_parcel.text = item.parcel;
_value.text = item.value;
_date.text = item.dateSpent;
_notes.text = item.notes;
}
- (void)dealloc {
[_name release];
[_category release];
[_parcel release];
[_value release];
[_date release];
[_notes release];
[super dealloc];
}
- (void)viewDidUnload {
[self setName:nil];
[self setCategory:nil];
[self setParcel:nil];
[self setValue:nil];
[self setDate:nil];
[self setNotes:nil];
[super viewDidUnload];
}
@end