ifish/Ifish/views/setViewCell/SetCell.m

44 lines
1.3 KiB
Objective-C

//
// SetCell.m
// Ifish
//
// Created by imac on 15/9/28.
// Copyright © 2015年 imac. All rights reserved.
//
#import "SetCell.h"
@implementation SetCell
- (void)awakeFromNib {
//self.backgroundView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"firstSetCell"]];
UIView *clearView=[[UIView alloc] init];
clearView.backgroundColor=[UIColor clearColor];
clearView.frame=self.bounds;
[self setSelectedBackgroundView:clearView];
}
-(void)resetCellbackImgAt:(NSIndexPath *)indexPath{
if (indexPath.section==0&&indexPath.row==0) {
self.backgroundView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"firstSetCell"]];
}else if (indexPath.section==0&&indexPath.row==1){
self.backgroundView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"secondSetCell"]];
}else if (indexPath.section==1&&indexPath.row==0){
self.backgroundView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"firstSetCell"]];
}else if (indexPath.section==1&&indexPath.row==1){
self.backgroundView=[[UIImageView alloc]initWithImage:[UIImage imageNamed:@"secondSetCell"]];
}
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
}
@end