宠物店修改

This commit is contained in:
kai60
2020-05-02 14:56:49 +08:00
parent 8fca79324a
commit 53f06fcf43
100 changed files with 2672 additions and 198 deletions
+26 -11
View File
@@ -34,6 +34,7 @@
UIImageView *bakc=[[UIImageView alloc] initWithFrame:CGRectMake(0, 10, self.frame.size.width, self.frame.size.height)];
bakc.image = self.backgroundImage;
self.backImageView=bakc;
//bakc.backgroundColor = [UIColor redColor];
[self addSubview:bakc];
@@ -56,6 +57,12 @@
[self addSubview:self.tableView];
}
-(void)changeStyle:(NSString*)style
{
self.backgroundColor=[UIColor whiteColor];
[self.backImageView removeFromSuperview];
self.tableView.backgroundColor=[UIColor whiteColor];
}
#pragma mark - Table view data source
@@ -77,22 +84,30 @@
{
PopCell *cell =[tableView dequeueReusableCellWithIdentifier:@"PopCell"];
if (!cell) {
UITableViewCell*realcell;
if ([self.delegate respondsToSelector:@selector(tableView:cellForPopViewIndexPath:)]) {
realcell=[self.delegate tableView:tableView cellForPopViewIndexPath:indexPath];
}
else
{
PopCell *cell =[tableView dequeueReusableCellWithIdentifier:@"PopCell"];
cell = [[[NSBundle mainBundle] loadNibNamed:@"PopCell" owner:self options:nil]lastObject];
if (!cell) {
cell = [[[NSBundle mainBundle] loadNibNamed:@"PopCell" owner:self options:nil]lastObject];
}
cell.nametitle.text = self.titles[indexPath.row];
cell.backgroundColor = [UIColor colorWithRed:40.0/256.0 green:40.0/256.0 blue:40.0/256.0 alpha:1];
cell.nametitle.textColor = [UIColor whiteColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.popViewHeaderImg.image = [UIImage imageNamed:self.titleImgs[indexPath.row]];
realcell=cell;
}
cell.nametitle.text = self.titles[indexPath.row];
cell.backgroundColor = [UIColor colorWithRed:40.0/256.0 green:40.0/256.0 blue:40.0/256.0 alpha:1];
cell.nametitle.textColor = [UIColor whiteColor];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.popViewHeaderImg.image = [UIImage imageNamed:self.titleImgs[indexPath.row]];
return cell;
return realcell;
}