| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- //
- // DeliveryRequirementHomeViewController.m
- // IBOSSHSH
- //
- // Created by ssl on 2018/1/12.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "DispatchRequirementHomeViewController.h"
- @interface DispatchRequirementHomeViewController ()
- @end
- @implementation DispatchRequirementHomeViewController
- static int navcount = 2; //导航数
- #pragma mark - 公共函数
- /**
- 视图加载完成函数
- */
- - (void)viewDidLoad {
- [super viewDidLoad];
- self.navigationItem.title = @"派工回执";
- UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
- [button setBackgroundImage:[UIImage imageNamed:@"icon_back.png"]
- forState:UIControlStateNormal];
- [button addTarget:self action:@selector(goBack)
- forControlEvents:UIControlEventTouchUpInside];
- button.frame = CGRectMake(0, 0,15,18);
- UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
- self.navigationItem.leftBarButtonItem = menuButton;
- [self initUI];
- }
- #pragma mark - 私有函数
- /*
- 初始化UI
- */
- - (void)initUI{
-
- self.page = [[PageSwitchView alloc] init];
- [self.view addSubview:self.page];
- [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"H:|[_page]|" options:0 metrics:nil views:NSDictionaryOfVariableBindings(_page)]];
- [self.view addConstraints:[NSLayoutConstraint constraintsWithVisualFormat:@"V:|[_page]-marg-|" options:0 metrics:@{@"marg":@(SCREENHEIGHT >= 812 ? 34 : 0)} views:NSDictionaryOfVariableBindings(_page)]];
-
- NSMutableArray *arr = [NSMutableArray array];
- _deliveryUnreceiptVC = [[DispatchRequirementNoReceiptController alloc] init];
- _deliveryReceiptVC = [[DispatchRequirementReceiptController alloc] init];
-
- _deliveryReceiptVC.refreshDelegate=self;
- _deliveryUnreceiptVC.cNav = self.navigationController;
- _deliveryReceiptVC.cNav = self.navigationController;
-
- PageSwitchModel *model = [[PageSwitchModel alloc] init];
- model.title = @"未回执";
- model.controller = _deliveryUnreceiptVC;
- [arr addObject:model];
- model = [[PageSwitchModel alloc] init];
- model.title = @"已回执";
- model.controller = _deliveryReceiptVC;
- [arr addObject:model];
- self.page.datas = arr;
-
- }
- -(void)refreshData
- {
- [ _deliveryUnreceiptVC refreshData];
- }
- /**
- * 返回函数
- */
- - (void)goBack
- {
- [self.navigationController popViewControllerAnimated:YES];
-
- }
- @end
|