// // UIViewController+SPSBLoadDataStatus.m // 我的社保 // // Created by shanp on 2021/4/21. // #import "UIViewController+SPSBLoadDataStatus.h" #import "SPSBRefreshHeader.h" #import "UIScrollView+SPSBAutoLoadData.h" @implementation UITableViewController (SPSBLoadDataStatus) - (void)endLoadDataStatusWithCanRefresh:(bool)refresh canLoad:(bool)load { [self endLoadDataStatus]; [self tableViewCanRefresh:refresh canLoad:load]; } - (void)endLoadDataStatus { [self.tableView.mj_header endRefreshing]; [self.tableView endAutoLoadData]; } - (void)tableViewCanRefresh:(bool)refresh canLoad:(bool)load { self.tableView.mj_header.hidden = !refresh; self.tableView.spsb_canLoadData = load; } @end