Subversion Repositories Projects

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
805 - 1
//
2
//  ChannelsViewCell.m
3
//  myKopter
4
//
5
//  Created by Frank Blumenberg on 16.05.10.
6
//  Copyright 2010 __MyCompanyName__. All rights reserved.
7
//
8
 
9
#import "ChannelsViewCell.h"
10
 
11
#define kUIProgressBarWidth             160.0
12
#define kUIProgressBarHeight    24.0
13
 
14
@implementation ChannelsViewCell
15
 
16
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
17
  if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
18
 
19
    CGRect frame = CGRectMake(126.0, 20.0, kUIProgressBarWidth, kUIProgressBarHeight);
20
    progressBar = [[UIProgressView alloc] initWithFrame:frame];
21
    progressBar.progressViewStyle = UIProgressViewStyleDefault;
22
    progressBar.progress = 0.5;    // Initialization code
23
 
24
    [self.contentView addSubview:progressBar];
25
  }
26
  return self;
27
}
28
 
29
- (void)dealloc {
30
 
31
  [progressBar release];
32
 
33
  [super dealloc];
34
}
35
 
36
-(void)setChannelValue:(int16_t)value {
37
 
38
  progressBar.progress = (value+125)/250.0f;
39
}
40
 
41
 
42
 
43
@end