aboutsummaryrefslogtreecommitdiffstats
path: root/iphone/FixMyStreet/Classes/SubjectTableViewCell.m
blob: 55b6f1b2f8dd49f59b6585f9eafedd7dba47ad47 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
//  subjectTableViewCell.m
//  FixMyStreet
//
//  Created by Matthew on 26/09/2008.
//  Copyright 2008 UK Citizens Online Democracy. All rights reserved.
//

#import "SubjectTableViewCell.h"

@implementation SubjectTableViewCell

@synthesize textField;

- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
    if (self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) {
        textField = [[UITextField alloc] initWithFrame:CGRectZero];
		textField.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
		textField.font = [UIFont systemFontOfSize:20];
		textField.placeholder = @"Summary";
		textField.autocapitalizationType = UITextAutocapitalizationTypeSentences;
		textField.clearButtonMode = UITextFieldViewModeWhileEditing;
		textField.returnKeyType = UIReturnKeyDone;
		[self addSubview:textField];
    }
    return self;
}

-(void)layoutSubviews {
	textField.frame = CGRectInset(self.contentView.bounds, 20, 0);
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
    // Configure the view for the selected state
}

- (void)dealloc {
	[textField release];
    [super dealloc];
}

@end