blob: fce903fb2d222fbc9dab787594b05c5fc2982db3 (
plain)
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
|
#import "UILabel+RuntimeAttributes.h"
#import "UIFont+MapsMeFonts.h"
#import "UIColor+MapsMeColor.h"
// Runtime attributes for setting localized text in Xib.
@implementation UILabel (RuntimeAttributes)
- (void)setLocalizedText:(NSString *)localizedText
{
self.text = L(localizedText);
}
- (NSString *)localizedText {
return L(self.text);
}
- (void)setFontName:(NSString *)fontName
{
self.font = [UIFont fontWithName:fontName];
}
- (void)setColorName:(NSString *)colorName
{
self.textColor = [UIColor colorWithName:colorName];
}
@end
|