root / asi-http-request-with-pithos / iPhone Sample / RequestProgressCell.m @ be116d22
History | View | Annotate | Download (1 kB)
1 |
// |
---|---|
2 |
// RequestProgressCell.m |
3 |
// iPhone |
4 |
// |
5 |
// Created by Ben Copsey on 03/10/2010. |
6 |
// Copyright 2010 All-Seeing Interactive. All rights reserved. |
7 |
// |
8 |
|
9 |
#import "RequestProgressCell.h" |
10 |
|
11 |
|
12 |
@implementation RequestProgressCell |
13 |
|
14 |
+ (id)cell |
15 |
{ |
16 |
RequestProgressCell *cell = [[[RequestProgressCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"RequestProgressCell"] autorelease]; |
17 |
[[cell textLabel] setTextAlignment:UITextAlignmentLeft]; |
18 |
[[cell textLabel] setFont:[UIFont systemFontOfSize:12]]; |
19 |
[[cell textLabel] setLineBreakMode:UILineBreakModeMiddleTruncation]; |
20 |
[cell setProgressView:[[[UIProgressView alloc] initWithFrame:CGRectMake(0,0,100,20)] autorelease]]; |
21 |
[cell setAccessoryView:[cell progressView]]; |
22 |
return cell; |
23 |
} |
24 |
|
25 |
- (void)dealloc |
26 |
{ |
27 |
[progressView release]; |
28 |
[super dealloc]; |
29 |
} |
30 |
|
31 |
- (void)layoutSubviews |
32 |
{ |
33 |
[super layoutSubviews]; |
34 |
CGRect f = [[self accessoryView] frame]; |
35 |
[[self accessoryView] setFrame:CGRectMake(f.origin.x, f.origin.y+6, f.size.width, f.size.height)]; |
36 |
|
37 |
} |
38 |
|
39 |
@synthesize progressView; |
40 |
@end |