-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathGroupedSectionHeader.m
More file actions
46 lines (36 loc) · 1.08 KB
/
GroupedSectionHeader.m
File metadata and controls
46 lines (36 loc) · 1.08 KB
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
//
// SectionHeader.m
// MyKeePass
//
// Created by Qiang Yu on 3/3/10.
// Copyright 2010 Qiang Yu. All rights reserved.
//
#import "GroupedSectionHeader.h"
@implementation GroupedSectionHeader
@synthesize _label;
@synthesize _button;
- (id)initWithFrame:(CGRect)frame{
if (self = [super initWithFrame:frame]) {
self.backgroundColor = [UIColor clearColor];
_label = [[UILabel alloc]initWithFrame:CGRectMake(15, 8, 270, 30)];
_label.backgroundColor = [UIColor clearColor];
_label.font = [UIFont boldSystemFontOfSize:16];
_label.textColor = [UIColor blackColor];
[self addSubview:_label];
_button = [UIButton buttonWithType:UIButtonTypeCustom];
_button.frame = CGRectMake(278, 12, 30, 30);
[_button setImage:[UIImage imageNamed:@"add.png"] forState:UIControlStateNormal];
[_button setImage:[UIImage imageNamed:@"addPressed.png"] forState:UIControlStateSelected];
[self addSubview:_button];
}
return self;
}
- (void)drawRect:(CGRect)rect {
// Drawing code
}
- (void)dealloc {
[_label release];
//[_button release];
[super dealloc];
}
@end