-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJOGridViewCell.m
43 lines (34 loc) · 952 Bytes
/
JOGridViewCell.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
//
// JOGridViewCell.m
// gridview
//
// Created by Jeremy Foo on 9/7/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "JOGridViewCell.h"
@implementation JOGridViewCell
@synthesize reuseIdentifier = __reuseIdentifier;
@synthesize textLabel;
- (id)initWithFrame:(CGRect)frame
{
if ((self = [super initWithFrame:frame])) {
// Initialization code
self.clipsToBounds = YES;
textLabel = [[UILabel alloc] initWithFrame:frame];
textLabel.backgroundColor = [UIColor clearColor];
textLabel.textColor = [UIColor blackColor];
textLabel.textAlignment = UITextAlignmentCenter;
textLabel.text = @"";
[self addSubview:textLabel];
}
return self;
}
-(void) dealloc {
[__reuseIdentifier release], __reuseIdentifier = nil;
[textLabel release], textLabel = nil;
[super dealloc];
}
-(void)layoutSubviews {
textLabel.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
}
@end