新UI马甲包

FSBottomTableViewCell.m 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //
  2. // FSBottomTableViewCell.m
  3. // FSScrollViewNestTableViewDemo
  4. //
  5. // Created by huim on 2017/5/23.
  6. // Copyright © 2017年 fengshun. All rights reserved.
  7. //
  8. #import "FSBottomTableViewCell.h"
  9. #import "FSScrollContentViewController.h"
  10. @implementation FSBottomTableViewCell
  11. - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  12. {
  13. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  14. if (self) {
  15. self.backgroundColor =[UIColor whiteColor];
  16. }
  17. return self;
  18. }
  19. #pragma mark Setter
  20. - (void)setViewControllers:(NSMutableArray *)viewControllers
  21. {
  22. _viewControllers = viewControllers;
  23. }
  24. - (void)setCellCanScroll:(BOOL)cellCanScroll
  25. {
  26. _cellCanScroll = cellCanScroll;
  27. for (FSScrollContentViewController *VC in _viewControllers) {
  28. VC.vcCanScroll = cellCanScroll;
  29. if (!cellCanScroll) {//如果cell不能滑动,代表到了顶部,修改所有子vc的状态回到顶部
  30. VC.tableView.contentOffset = CGPointZero;
  31. }
  32. }
  33. }
  34. - (void)setIsRefresh:(BOOL)isRefresh
  35. {
  36. _isRefresh = isRefresh;
  37. for (FSScrollContentViewController *ctrl in self.viewControllers) {
  38. if ([ctrl.title isEqualToString:self.currentTagStr]) {
  39. ctrl.isRefresh = isRefresh;
  40. }
  41. }
  42. }
  43. @end