-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLevelsCell.m
56 lines (39 loc) · 1.56 KB
/
LevelsCell.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
51
52
53
54
55
56
//
// LevelsCell.m
// Labyrinth
//
// Created by Corina Schemainda on 11.01.14.
// Copyright (c) 2014 Benjamin Otto. All rights reserved.
//
#import "LevelsCell.h"
@implementation LevelsCell
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
// Initialization code
self.contentView.layer.borderWidth = 2.0;
self.contentView.layer.borderColor = [UIColor whiteColor].CGColor;
self.backgroundColor = [UIColor darkGrayColor];
self.label= [[UILabel alloc]initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height)];
self.label.center=CGPointMake(frame.size.width/2, frame.size.height/2);
self.label.textAlignment=NSTextAlignmentCenter;
[self.contentView addSubview:_label];
self.imgView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height)];
[self.contentView addSubview:self.imgView];
/* UIView *backgroundView = [[UIView alloc]initWithFrame:self.bounds];
backgroundView.layer.borderColor = [[UIColor whiteColor]CGColor];
backgroundView.layer.borderWidth = 2.0f;
self.selectedBackgroundView = backgroundView;*/
}
return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
// Drawing code
}
*/
@end