熟练记录一下

        // 内容view阴影设置
        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];
// 展开-关闭
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];
}

你可能感兴趣的:(熟练记录一下)