#define MY_HEIGHT 90.0
//cell的初始化方法
- (id)init
{
//此cell在table中只有一个,不会重复,所以不需要reuseId。
self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:nil];
if (!self) {return nil; }
self.selectionStyle = UITableViewCellSelectionStyleDefault;
UIImage* bgImage = [UIImage imageNamed:@"cell-bg"];
self.backgroundColor = [UIColor colorWithPatternImage:bgImage];
UIView* bg = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, MY_HEIGHT)];
bg.backgroundColor = [UIColor colorWithPatternImage:bgImage];
UIView* maskView = [[UIView alloc] initWithFrame:bg.bounds];
maskView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1];
[bg addSubview:maskView];
self.selectedBackgroundView = bg;
return self;
}