// 內(nèi)容view陰影設(shè)置
UIView *contentView = [[UIView alloc] initWithFrame:CGRectMake(15, 0, SCR_W - 15*2, headerView.height)];
contentView.backgroundColor = [UIColor whiteColor];
/*
contentView.layer.cornerRadius = 12;
contentView.layer.shadowOffset = CGSizeMake(0, 0);
contentView.layer.shadowOpacity = 1;
contentView.layer.shadowRadius = 3;
contentView.layer.shadowColor = [UIColorFromHex(0xc6c6c6) colorWithAlphaComponent:.57].CGColor;
*/
[headerView addSubview:contentView];
// 展開-關(guān)閉
UIImageView *imageView = [[UIImageView alloc]initWithFrame:CGRectMake(contentView.width - 20 -25, 20, 25, 25)];
imageView.image = [UIImage imageNamed:_isFold?@"icon_checkin_up":@"icon_checkin_down"];
[imageView addTarget:self action:@selector(foldClick:)];
[contentView addSubview:imageView];
- (void)foldClick:(UITapGestureRecognizer *)sender {
_isFold = !_isFold;
[self.checkInTabelView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationAutomatic];
}
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者