Graphics Reference
In-Depth Information
FIGURE 12-3
iPhone Application with Color Blended Layers Mode Turned On
When you examine the code for these areas, you can see where the issue lies. Specifically,
look at the
-initWithFrame:reuseIdentifier:
of the
CustomTableViewCell
object; this is
where the trouble lies (see Listing 12-1).
LISTING 12-1
[CustomTableViewCell -initWithFrame:reuseIdentifier:]
- (
id
)initWithFrame:(CGRect)frame reuseIdentifier:(NSString*)ident
{
if
(!(
self
= [
super
initWithFrame
:frame
reuseIdentifier
:ident]))
return nil
;
UIView *contentView = [
self
contentView];
imageView
= [[UIImageView alloc] initWithFrame:CGRectMake(5, 5, 64, 64)];
[
imageView
setContentMode:UIViewContentModeScaleAspectFit];
[contentView addSubview:
imageView
];
[
imageView
release];
titleLabel
= [[UILabel alloc] initWithFrame:CGRectZero];
[
titleLabel
setFont:[UIFont boldSystemFontOfSize:14.0f]];
[
titleLabel
setBackgroundColor:[UIColor clearColor]];
[contentView addSubview:
titleLabel
];
[
titleLabel
release];