-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHOLabel.m
40 lines (33 loc) · 782 Bytes
/
HOLabel.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
//
// HOLabel.m
// hiddenObjectTest
//
// Created by Jonathan Langens on 02/04/15.
// Copyright (c) 2015 Jonathan Langens. All rights reserved.
//
#import "HOLabel.h"
@implementation HOLabel
-(instancetype)initWithFrame:(CGRect)frame andObject:(Object*) object andLocale:(NSString*) locale
{
self = [super initWithFrame:frame];
[self setLocale:locale];
[self setObject:object];
return self;
}
-(instancetype)initWithFrame:(CGRect)frame andObject:(Object*) object
{
self = [super initWithFrame:frame];
[self setLocale:@"EN"];
[self setObject:object];
return self;
}
-(void)setObject:(Object *)object
{
_object = object;
self.text = [object getNameForLocale:self.locale];
}
-(NSString*)trueName
{
return self.object.name;
}
@end