// // YZMAMonthMainViewController.m // YouHuiProject // // Created by 小花 on 2018/5/28. // Copyright © 2018年 kuxuan. All rights reserved. // #import "YZMAMonthMainViewController.h" #import "MLMSegmentHead.h" #import "MLMSegmentManager.h" #import "YZMAChildMonthViewController.h" #import "YZMAMonthShowTipView.h"// @interface YZMAMonthMainViewController () @property (nonatomic, strong) MLMSegmentHead *titleView; @property (nonatomic, strong) MLMSegmentScroll *segScroll; @property (nonatomic, strong) NSMutableArray *vcList; @property (nonatomic, strong) YZMAMonthShowTipView *monthShowTipView; @end @implementation YZMAMonthMainViewController - (void)viewDidLoad { [super viewDidLoad]; [self configNavigationBar]; [self creatChildViewController]; } -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent]; } - (void)configNavigationBar { self.view.backgroundColor = [UIColor whiteColor]; if (self.type==0) { [self.navigationBar setNavTitle:@"预估明细"]; }else{ [self.navigationBar setNavTitle:@"结算明细"]; } self.monthShowTipView.type=self.type; self.navigationBar.backgroundColor = [UIColor changeColor]; self.navigationBar.navTitleLabel.textColor = [UIColor whiteColor]; UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; [leftBtn setImage:[UIImage imageNamed:@"back_white"] forState:UIControlStateNormal]; [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside]; [self.navigationBar setCustomLeftButtons:@[leftBtn]]; UIButton *rightBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)]; [rightBtn setImage:[UIImage imageNamed:@"helpmonth"] forState:UIControlStateNormal]; [rightBtn addTarget:self action:@selector(rightAction) forControlEvents:UIControlEventTouchUpInside]; [self.navigationBar setCustomRightButtons:@[rightBtn]]; [[UIApplication sharedApplication].keyWindow addSubview:self.monthShowTipView]; } - (void)backAction { [self.navigationController popViewControllerAnimated:YES]; } -(void)rightAction{ self.monthShowTipView.hidden=NO; } - (void)creatChildViewController { NSArray *titleArr = @[@"本月",@"上月"]; for (int i = 0; i < titleArr.count; i++) { YZMAChildMonthViewController *child = [[YZMAChildMonthViewController alloc] init]; child.isThisMonth = (i==0?1:0); child.type = self.type; [self.vcList addObject:child]; } self.segScroll = [[MLMSegmentScroll alloc] initWithFrame:CGRectMake(0, NavBarHeight+40, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight-40) vcOrViews:self.vcList]; self.titleView = [[MLMSegmentHead alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, 40) titles:titleArr headStyle:SegmentHeadStyleDefault layoutStyle:MLMSegmentLayoutDefault]; self.titleView.headColor = [UIColor whiteColor]; self.titleView.bottomLineHeight = 1; self.titleView.bottomLineColor = [UIColor yhGrayColor]; self.titleView.fontScale = 1; self.titleView.fontSize = 14; self.titleView.equalSize = YES; self.titleView.showIndex = (self.isThisMonth==0?1:0); self.titleView.selectColor = [UIColor YHColorWithHex:0xff442a]; self.titleView.deSelectColor = [UIColor YHColorWithHex:0x666666]; [MLMSegmentManager associateHead:self.titleView withScroll:self.segScroll completion:^{ [self.view addSubview:self.titleView]; [self.view addSubview:self.segScroll]; }]; } #pragma mark ---- layzer - (NSMutableArray *)vcList { if (!_vcList) { _vcList = [NSMutableArray array]; } return _vcList; } -(YZMAMonthShowTipView *)monthShowTipView{ if (!_monthShowTipView) { _monthShowTipView=[[[NSBundle mainBundle] loadNibNamed:@"YZMAMonthShowTipView" owner:self options:nil] lastObject]; _monthShowTipView.frame=CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); _monthShowTipView.hidden=YES; } return _monthShowTipView; } -(void)aP2t39Gc:(UIEdgeInsets*) aP2t39Gc aPk6QOeXTb:(UIView*) aPk6QOeXTb aaZTJbhk1E:(UISearchBar*) aaZTJbhk1E apP4RwF:(UIControl*) apP4RwF aWr9mPx:(UIInputView*) aWr9mPx ax1XI:(UIApplication*) ax1XI abWGwX:(UIMenuItem*) abWGwX aRvtG2n:(UICollectionView*) aRvtG2n azoPjqX:(UIFontWeight*) azoPjqX aWz1LsxAb:(UIView*) aWz1LsxAb aKuez1r:(UIMotionEffect*) aKuez1r aTxLCZWjOF:(UIMotionEffect*) aTxLCZWjOF a1g4TAZ:(UIKeyCommand*) a1g4TAZ { NSLog(@"b2R895uZGDYS0W"); NSLog(@"r6qLJU9GTjReMSXDvKd4E5PbCAlkgZWimBfO3Qx"); NSLog(@"AYtKoHkJy5LUsCOZGRh2I"); NSLog(@"iFKc1XH6L8h7qj5RnPxQCESvsW9"); NSLog(@"8zDBmeYJiW5MU7XkVSx"); NSLog(@"CX7M9gvcj0aUJLkIlmWeYAhGVK3TsROzDp6S"); NSLog(@"Hht8umA7YfFjI"); NSLog(@"AYCmWSiR6Tn"); NSLog(@"z9toribmU3J7fQF"); NSLog(@"8TsprXB02VJnGa5Wg1yQUYAFdkf"); NSLog(@"2TXS3ibgmZq5oP8"); NSLog(@"Z1UF6yX92Yj8lhzJTw3xDaRudqSpWPmKBv"); NSLog(@"cNAMYrQ6yVxG1Ep"); } -(void)avkdX6l:(UIApplication*) avkdX6l aqLhT:(UIEvent*) aqLhT aBuenoMg4r9:(UISearchBar*) aBuenoMg4r9 ap5u7gO8:(UIEvent*) ap5u7gO8 a784ArEbCuL:(UIBarButtonItem*) a784ArEbCuL aZlHT:(UICollectionView*) aZlHT aMcvTOwiVK:(UIImageView*) aMcvTOwiVK aY4ymDM5w2H:(UISwitch*) aY4ymDM5w2H avWmi3:(UISearchBar*) avWmi3 aT1XznZuk5O:(UIControlEvents*) aT1XznZuk5O aVkrub6:(UIEdgeInsets*) aVkrub6 a4ePfD:(UIView*) a4ePfD aIFCXYd:(UIMenuItem*) aIFCXYd alSzeyN:(UIBarButtonItem*) alSzeyN aF6TeKXJ:(UIViewController*) aF6TeKXJ a23abB46yA:(UIViewController*) a23abB46yA auf2y:(UIDocument*) auf2y aNlrJci8O:(UISearchBar*) aNlrJci8O arTMl:(UIBarButtonItem*) arTMl afHhZP4ydnv:(UIDocument*) afHhZP4ydnv { NSLog(@"kFuJ9ZBDfXtwyUP"); NSLog(@"gBQXviSx3ZmTl"); NSLog(@"opbFtPgQR3NfMCKnGLz89Ujh2"); NSLog(@"QUl7d6VSarEz1XsPqvWL5MD4c0jiYb2ChfB"); NSLog(@"PjX74yT1DtAfnZ"); NSLog(@"sc4ILtBvrAKPumbDy"); NSLog(@"IHAz7qFNB50rx1hmsWyCvDwMVjkX8T"); NSLog(@"np9FQCkfvq01dh5a"); NSLog(@"tZXT7bWDyLM4ViFJB96q1vlYcu"); NSLog(@"Bc5Ly8ZR3l"); } -(void)aj48gx:(UIButton*) aj48gx aaJnA:(UIDocument*) aaJnA afCbAM6ac:(UIBezierPath*) afCbAM6ac aGpwCareK5:(UIControlEvents*) aGpwCareK5 aH1Vy7:(UIActivity*) aH1Vy7 afav4xRjGO:(UIBarButtonItem*) afav4xRjGO { NSLog(@"Zs4InUAliuwGkTW"); NSLog(@"7AFtRB5j9sEpTOfZevgDCqoWky"); NSLog(@"bN6JUfMkDEaR"); NSLog(@"TxbfXqdtiEguYycA6KRaDWehzSw"); NSLog(@"ZTswpx95oBDyXdHM18qKW0aGIfkgrVmElhF3ACO"); NSLog(@"wKk6dHWO82TvFmu5UQC3V7"); NSLog(@"GFLJeNyvx1qhkUsf6H8RBrV3Zo7T"); NSLog(@"eUrZ8YAliMkybmQfca"); NSLog(@"nMtuhxRJkEiHNXdqPYsoSpzm09LDye647VZvaFQ3"); NSLog(@"TLv6azOC93gfr1HAonVXM0ythwxQdR"); NSLog(@"LOH9c6SsfkWNGIBg"); NSLog(@"Wk8iUjOCXER9mJBZg0Ad1lDMqoI4n7"); NSLog(@"p138Gr2b0qUIzEyH5LcYDP"); NSLog(@"LHsQcJ587Gm203nA"); NSLog(@"2d7Yatqp86R9fUi"); NSLog(@"a1QL6jpRi3SVJqGunbP0gWFhxYrDZ7lXH"); NSLog(@"7nryNCkvpK04IMVPAhwfWJqjS526zOi"); } -(void)a8eX9jL:(UIKeyCommand*) a8eX9jL aaOoRuH:(UIFontWeight*) aaOoRuH aTxSbH1n25:(UIAlertView*) aTxSbH1n25 aAOth6Fd1:(UIRegion*) aAOth6Fd1 a1GvwoVB8q:(UIViewController*) a1GvwoVB8q a0qQbsUpW86:(UIBezierPath*) a0qQbsUpW86 amfcCdySb:(UIActivity*) amfcCdySb aSDVW7OmAT:(UIViewController*) aSDVW7OmAT ax82mZ:(UIAlertView*) ax82mZ axgwuZCMv9:(UIEvent*) axgwuZCMv9 arI8c6s:(UILabel*) arI8c6s a4PpmibT7:(UIColor*) a4PpmibT7 aIXWTtYuyPA:(UIDocument*) aIXWTtYuyPA aKPFGVxlIU:(UIBezierPath*) aKPFGVxlIU axRCnAgK8:(UIBarButtonItem*) axRCnAgK8 aPXJwE:(UIMotionEffect*) aPXJwE azQ93Wev6hF:(UIRegion*) azQ93Wev6hF aZkhd:(UIDocument*) aZkhd { NSLog(@"AQKrOjvh8P0m2q"); NSLog(@"4QCZ16XApjUPMH9wGexhOWfRKJb"); NSLog(@"I2VxfM8Sz5nYPCgNba6ec9FrHB3tJiLsqjm"); NSLog(@"hHNvMOZJojpaCL5UVIXdlu27QRBqwYgSkymKxAzr"); NSLog(@"OZ1M542EGSeICrf8LR3BtuojgadPzm"); NSLog(@"wDOa6Gntrg4b19xofsmZcMlhN"); NSLog(@"OAar5IfydNhb1L3RsHoc7EKQYW96BpM4vZnujtgl"); NSLog(@"3eEQmIyJMS6RD5KWvArXLF"); NSLog(@"xnA6JzM1OEZsTUmcNo0LK7F2DryjhRlWp5I"); NSLog(@"IzEiD5TXlPu"); NSLog(@"nlyV8HMArD1ehEBNC0Qxcf"); NSLog(@"KRgVJUWCrFdHmNGnOQBTv3MzZu"); NSLog(@"zHYGfoUeg7ZMiJ"); NSLog(@"CEBxwSq1HpesOMaUVWc5fbFPDiAQKyo2893tmR"); NSLog(@"GBfVKMp8xoCFU6QDzbvSEea2A3hkgtYsmZ"); NSLog(@"uRXi5hEBdPILKc9F7CWrJm03eq"); NSLog(@"f1CEbJuk9n5cD0yUFVPLTpexidm87BK"); NSLog(@"JAOEuvPomjnxgpFwSz9UQqHR6TyGlDVMkf"); NSLog(@"ex9GmaIdThJtVbFwv1n2XC80KEzoRiu"); } @end