forked from pokeb/asi-http-request
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRequestProgressCell.m
40 lines (32 loc) · 1.01 KB
/
RequestProgressCell.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
//
// RequestProgressCell.m
// iPhone
//
// Created by Ben Copsey on 03/10/2010.
// Copyright 2010 All-Seeing Interactive. All rights reserved.
//
#import "RequestProgressCell.h"
@implementation RequestProgressCell
+ (id)cell
{
RequestProgressCell *cell = [[[RequestProgressCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"RequestProgressCell"] autorelease];
[[cell textLabel] setTextAlignment:UITextAlignmentLeft];
[[cell textLabel] setFont:[UIFont systemFontOfSize:12]];
[[cell textLabel] setLineBreakMode:UILineBreakModeMiddleTruncation];
[cell setProgressView:[[[UIProgressView alloc] initWithFrame:CGRectMake(0,0,100,20)] autorelease]];
[cell setAccessoryView:[cell progressView]];
return cell;
}
- (void)dealloc
{
[progressView release];
[super dealloc];
}
- (void)layoutSubviews
{
[super layoutSubviews];
CGRect f = [[self accessoryView] frame];
[[self accessoryView] setFrame:CGRectMake(f.origin.x, f.origin.y+6, f.size.width, f.size.height)];
}
@synthesize progressView;
@end