0

UITableView を作成しました。以下のような背景画像を付けました。

UIImageView *imageview1 = [[UIImageView alloc] init];
imageview1.image = [UIImage imageNamed:@"blood2.gif"];
evc.tableView.backgroundView = imageview1;

次に、tableView:cellForRowAtIndexPath: メソッドでセルを変更して、セルを半透明にしました。

UIView *backgrView = [[UIView alloc] initWithFrame:CGRectZero];
backgrView.backgroundColor = [UIColor colorWithRed:1 green:1 blue:1 alpha:0.7];

cell.backgroundView = backgrView;

しかし、UITableViewCells の周囲に境界線がなくなりました。すでにセパレーターカラーを黒に設定していますが、境界線が表示されません...

4

1 に答える 1

1

これで確認してください

[cell.contentView.layer setBorderColor:[UIColor redColor] .CGColor];
[cell.contentView.layer setBorderWidth:2.0f];

于 2012-10-09T21:40:20.537 に答える