> {
UIImage *icon_;
NSString *origin_;
- NSString *description_;
NSString *label_;
}
- (void) clearSource {
[icon_ release];
[origin_ release];
- [description_ release];
[label_ release];
icon_ = nil;
origin_ = nil;
- description_ = nil;
label_ = nil;
}
origin_ = [[source name] retain];
label_ = [[source uri] retain];
- description_ = [[source description] retain];
[content_ setNeedsDisplay];
}
if (!highlighted)
UISetColor(Blue_);
[label_ drawAtPoint:CGPointMake(58, 29) forWidth:(width - 95) withFont:Font12_ lineBreakMode:UILineBreakModeTailTruncation];
-
- if (!highlighted)
- UISetColor(Gray_);
- [description_ drawAtPoint:CGPointMake(12, 46) forWidth:(width - 40) withFont:Font14_ lineBreakMode:UILineBreakModeTailTruncation];
}
@end
return [sources_ objectAtIndex:idx];
}
-- (CGFloat) tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- Source *source = [self sourceAtIndexPath:indexPath];
- return [source description] == nil ? 56 : 73;
-}
-
- (UITableViewCell *) tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier = @"SourceCell";
list_ = [[UITableView alloc] initWithFrame:[[self view] bounds] style:UITableViewStylePlain];
[list_ setAutoresizingMask:UIViewAutoresizingFlexibleBoth];
+ [list_ setRowHeight:56];
[[self view] addSubview:list_];
[list_ setDataSource:self];