-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBHAlbumTitleReusableView.m
executable file
·45 lines (35 loc) · 1.24 KB
/
BHAlbumTitleReusableView.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
//
// BHAlbumTitleReusableView.m
// CollectionViewTutorial
//
// Created by Bryan Hansen on 11/3/12.
// Copyright (c) 2012 Bryan Hansen. All rights reserved.
//
#import "BHAlbumTitleReusableView.h"
@interface BHAlbumTitleReusableView ()
@property (nonatomic, strong, readwrite) UILabel *titleLabel;
@end
@implementation BHAlbumTitleReusableView
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
self.titleLabel = [[UILabel alloc] initWithFrame:self.bounds];
self.titleLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth |
UIViewAutoresizingFlexibleHeight;
self.titleLabel.backgroundColor = [UIColor clearColor];
self.titleLabel.textAlignment = NSTextAlignmentCenter;
self.titleLabel.font = [UIFont boldSystemFontOfSize:13.0f];
self.titleLabel.textColor = [UIColor colorWithWhite:1.0f alpha:1.0f];
self.titleLabel.shadowColor = [UIColor colorWithWhite:0.0f alpha:0.3f];
self.titleLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
[self addSubview:self.titleLabel];
}
return self;
}
- (void)prepareForReuse
{
[super prepareForReuse];
self.titleLabel.text = nil;
}
@end