1. #import "SubcategoryTableViewCell.h"
  2. @implementation SubcategoryTableViewCell
  3. - (void)awakeFromNib {
  4. // Initialization code
  5. }
  6. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  7. [super setSelected:selected animated:animated];
  8. }
  9. -(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
  10. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  11. if(self){
  12. self.contentView.backgroundColor = [UIColor clearColor];
  13. UIView *whiteRoundedCornerView = [[UIView alloc] initWithFrame:CGRectMake(10,10,300,150)];
  14. whiteRoundedCornerView.backgroundColor = [UIColor whiteColor];
  15. whiteRoundedCornerView.layer.masksToBounds = NO;
  16. whiteRoundedCornerView.layer.cornerRadius = 3.0;
  17. [whiteRoundedCornerView.layer setShadowColor:[UIColor grayColor].CGColor];
  18. whiteRoundedCornerView.layer.shadowOffset = CGSizeMake(-1, 1);
  19. whiteRoundedCornerView.layer.shadowOpacity = 0.2;
  20. [self.contentView addSubview:whiteRoundedCornerView];
  21. [self.contentView sendSubviewToBack:whiteRoundedCornerView];
  22. return self;
  23. }
  24. return self;
  25. }
  26. @end