12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- //
- // SPSBSalaryViewController.m
- // 我的社保
- //
- // Created by shanp on 2021/6/16.
- //
- #import "SPSBSalaryViewController.h"
- #import "SPSBUIGeneralHeader.h"
- #import <JXHFixHeaderViewController.h>
- #import <JXHFixHeaderViewHeaderController.h>
- #import <JXHClassifyView.h>
- #import "SPSBSalaryTableViewController.h"
- @interface SPSBSalaryViewController () {
- JXHFixHeaderViewController *_contentVC;
- NSArray<SPSBSalaryTableViewController *> *_tableViews;
- }
- @end
- @implementation SPSBSalaryViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self setupUI];
- }
- #pragma mark - Action
- #pragma mark - Network Action
- #pragma mark - UI
- - (void)setupUI {
- self.title = @"社保流水";
- [self createContentView];
- [self addClassifyView];
- [self createLists];
- [_contentVC.jxh_bgScrollView.panGestureRecognizer requireGestureRecognizerToFail:self.navigationController.interactivePopGestureRecognizer];
- }
- - (void)createLists {
- NSMutableArray *arr = NSMutableArray.new;
- for (NSInteger i = 0; i < 2; i ++) {
- SPSBSalaryTableViewController *list = SPSBSalaryTableViewController.new;
- list.spsb_type = i;
- [arr addObject:list];
- }
- _tableViews = arr;
- [_contentVC setListViews:_tableViews];
- }
- - (void)addClassifyView {
- JXHClassifyViewConfiguration *configuration = ({
- JXHClassifyViewConfiguration *configuration = JXHClassifyViewConfiguration.new;
- configuration.jxh_titleArray = @[@"待处理", @"已处理"];
- configuration.jxh_height = 50;
- configuration.jxh_font = spsb_font(16);
- configuration.jxh_normalColor = spsb_666666_color();
- configuration.jxh_selectedColor = spsb_3296FB_color();
- configuration.jxh_margen = 0.f;
- configuration.jxh_interval = 0.f;
- configuration.jxh_selectedViewSize = (CGSize){60, 2.5};
- configuration.jxh_selectedViewColor = spsb_3296FB_color();
- configuration.jxh_equalWidth = jxh_screenWidth() / 2;
- configuration.jxh_isNeedSelectedView = true;
- configuration;
- });
-
- [_contentVC setExteriorClassifyViewWithConfiguration:configuration];
- [self.view addSubview:_contentVC.jxh_classifyView];
- [_contentVC.jxh_classifyView makeConstraints:^(JXHConstraintMaker *make) {
- make.top.equalTo(self.view.safetop);
- make.leading.and.trailing.equalTo(0);
- make.height.equalTo(configuration.jxh_height);
- }];
- }
- - (void)createContentView {
- _contentVC = JXHFixHeaderViewController.new;
- [self addChildViewController:_contentVC];
- [self.view addSubview:_contentVC.view];
- [_contentVC.view makeConstraints:^(JXHConstraintMaker *make) {
- make.top.equalTo(self.view.safetop).offset(50);
- make.leading.and.trailing.and.bottom.equalTo(0);;
- }];
- JXHFixHeaderViewHeaderController *header = JXHFixHeaderViewHeaderController.new;
- [_contentVC setHeader:header];
- }
- @end
|