5667f3865dc0a9011f49ba1004849bc45f65ba28
[pithos-ios] / Classes / TextViewCell.m
1 //
2 //  TextViewCell.m
3 //  OpenStack
4 //
5 //  Created by Mike Mayo on 10/11/10.
6 //  The OpenStack project is provided under the Apache 2.0 license.
7 //
8
9 #import "TextViewCell.h"
10
11
12 @implementation TextViewCell
13
14 @synthesize textView;
15
16 - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
17     if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
18                 
19                 self.textView = [[[UITextView alloc] init] autorelease];
20         self.textView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleWidth |
21         UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleHeight;
22         
23         self.contentView.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleWidth |
24         UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleHeight;
25         
26         self.contentView.autoresizesSubviews = YES;
27         self.textView.editable = NO;
28                 [self.contentView addSubview:self.textView];    
29     }
30     return self;
31 }
32
33
34 //- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
35 //    
36 //    [super setSelected:selected animated:animated];
37 //    
38 //    // Configure the view for the selected state
39 //    if (selected) {
40 //        self.textView.textColor = [UIColor whiteColor];
41 //    } else {
42 //        self.textView.textColor = [UIColor blackColor];
43 //    }
44 //}
45
46
47 - (void)dealloc {
48     [textView release];
49     [super dealloc];
50 }
51
52 @end