// // FSBottomTableViewCell.m // FSScrollViewNestTableViewDemo // // Created by huim on 2017/5/23. // Copyright © 2017年 fengshun. All rights reserved. // #import "FSBottomTableViewCell.h" #import "FSScrollContentViewController.h" @implementation FSBottomTableViewCell - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self) { self.backgroundColor =[UIColor whiteColor]; } return self; } #pragma mark Setter - (void)setViewControllers:(NSMutableArray *)viewControllers { _viewControllers = viewControllers; } - (void)setCellCanScroll:(BOOL)cellCanScroll { _cellCanScroll = cellCanScroll; for (FSScrollContentViewController *VC in _viewControllers) { VC.vcCanScroll = cellCanScroll; if (!cellCanScroll) {//如果cell不能滑动,代表到了顶部,修改所有子vc的状态回到顶部 VC.tableView.contentOffset = CGPointZero; } } } - (void)setIsRefresh:(BOOL)isRefresh { _isRefresh = isRefresh; for (FSScrollContentViewController *ctrl in self.viewControllers) { if ([ctrl.title isEqualToString:self.currentTagStr]) { ctrl.isRefresh = isRefresh; } } } @end