熟练记录一下

        // 内容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];
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。