透明な部分を持つUIViewにUITableViewCellを追加します。最初はすべてが完璧に見えますが、行の選択を解除すると、UIViewの背景が透明になりません。UIViewの背景の透明度
ステップ1
http://img29.imageshack.us/img29/1842/screenshot20110910at409.png
ステップ2
http://img41.imageshack.us/img41/1842/screenshot20110910at409.png
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
UIView *priceView = [[UIView alloc] init];
priceView.frame = CGRectMake(250, 10, 40, 21);
priceView.backgroundColor = [UIColor colorWithPatternImage:[ UIImage imageNamed:@"priceBG.png" ]];
priceView.opaque = NO;
[priceView.layer setOpaque:NO];
[cell addSubview:priceView];
[priceView release];
return cell;
'[[セルcontentView] addSubview:priceView]試し'と何が起こるかを教えて? – deanWombourne
@deanWombourneまだ動作しません – user837488