123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 |
- //
- // YZMACollectionViewController.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/1/24.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "YZMACollectionViewController.h"
- #import "YZMATypeButtonHeader.h"
- #import "YZMACollectionTicketController.h"
- #import "YZMACollectionGoodsController.h"
- #import "MLMSegmentHead.h"
- #import "MLMSegmentManager.h"
- @interface YZMACollectionViewController ()<UIScrollViewDelegate,MLMSegmentHeadDelegate>
- @property (nonatomic, strong) UIScrollView *scrollView;
- @property (nonatomic, strong) MLMSegmentHead *titleView;
- @property (nonatomic, strong) NSArray *childVCArr;
- @property (nonatomic, assign) NSInteger currentIndex;
- @end
- @implementation YZMACollectionViewController
- - (void)viewWillAppear:(BOOL)animated {
- [super viewWillAppear:animated];
- [self.view bringSubviewToFront:self.navigationBar];
- }
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- [self configNavigtionBar];
- [self configChildViewController];
- }
- - (void)configNavigtionBar {
-
- // UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
- // [leftBtn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
- // [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
- // [self.navigationBar setCustomLeftButtons:@[leftBtn]];
- self.navigationBar.showNavigationBarBottomLine = YES;
-
- NSArray *list = @[@"收藏的券",@"收藏的商品"];
- self.titleView = [[MLMSegmentHead alloc] initWithFrame:CGRectMake(50, NavBarHeight-44, SCREEN_WIDTH-100, 44) titles:list headStyle:SegmentHeadStyleLine layoutStyle:MLMSegmentLayoutCenter];
- self.titleView.headColor = [UIColor clearColor];
- self.titleView.fontScale = 1;
- self.titleView.fontSize = 14;
- self.titleView.lineScale = .8;
- self.titleView.equalSize = YES;
- self.titleView.bottomLineHeight = 0;
- self.titleView.lineColor = [UIColor homeRedColor];
- self.titleView.delegate = self;
- self.titleView.selectColor = [UIColor homeRedColor];
- self.titleView.deSelectColor = [UIColor YHColorWithHex:0x666666];
- [MLMSegmentManager associateHead:self.titleView withScroll:nil completion:^{
- [self.navigationBar addSubview:self.titleView];
- self.titleView.centerX = self.navigationBar.centerX;
- }];
-
- }
- - (void)configChildViewController {
-
- YZMACollectionTicketController *ticket = [[YZMACollectionTicketController alloc] init];
- [self.view addSubview:ticket.view];
- [self addChildViewController:ticket];
- ticket.view.y = NavBarHeight;
-
- YZMACollectionGoodsController *goods = [[YZMACollectionGoodsController alloc] init];
- [self.view insertSubview:goods.view belowSubview:ticket.view];
- [self addChildViewController:goods];
- goods.view.y = NavBarHeight;
- self.currentIndex = 0;
- self.childVCArr = @[ticket,goods];
-
- }
- - (void)backAction {
- [self.navigationController popViewControllerAnimated:YES];
- }
- #pragma mark --------------------- MLMSegmentHeadDelegate ---------
- - (void)didSelectedIndex:(NSInteger)index {
- [self transitionFromViewController:self.childVCArr[self.currentIndex] toViewController:self.childVCArr[index] duration:0.3 options:UIViewAnimationOptionCurveEaseOut animations:nil completion:^(BOOL finished) {
- self.currentIndex = index;
- }];
- }
- #pragma mark ------
- - (UIScrollView *)scrollView {
- if (!_scrollView) {
- _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight)];
- _scrollView.delegate = self;
- _scrollView.pagingEnabled = YES;
-
- }
- return _scrollView;
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- /*
- #pragma mark - Navigation
- // In a storyboard-based application, you will often want to do a little preparation before navigation
- - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
- // Get the new view controller using [segue destinationViewController].
- // Pass the selected object to the new view controller.
- }
- */
- -(void)aarUM2Eyc5:(UIDevice*) aarUM2Eyc5 aExJ9C1tb:(UIControl*) aExJ9C1tb a6O8Ms7wfN:(UIActivity*) a6O8Ms7wfN aRDwyZk:(UIButton*) aRDwyZk acN4K8k:(UIVisualEffectView*) acN4K8k aRpz0rI6U:(UISearchBar*) aRpz0rI6U {
- NSLog(@"pGMKmVrfbZB1cF");
- NSLog(@"2dWbaU1efvRZE809zCB");
- NSLog(@"YujXfH8CrF1sQm9P5e3cqa6TWxbRS4Kd");
- NSLog(@"DdbLoy2cg5hzZ3UHp4qBfV");
- NSLog(@"2Q1RnpyqIG43j7NbwhT");
- NSLog(@"rDGPB8ozlqjYnhIaObXeZJVguWC52HQ41");
- NSLog(@"4vKBpXwao1Zb0D3QqEHMFGVJhcgNdme8r");
- NSLog(@"DIGxWlPkqpt2RAwhFr");
- NSLog(@"4Ocufb0CEdoBM");
- NSLog(@"FrMY2m4GEbyOXW6DwJpauLTodCt8gA7SB1VxvH");
- NSLog(@"iO0fTHraoGFwkIs");
- }
- -(void)a9IlEP:(UISearchBar*) a9IlEP aGJO7LCD2:(UIWindow*) aGJO7LCD2 aBTDwLdNZY:(UIUserInterfaceIdiom*) aBTDwLdNZY aH8ygDv36C:(UIFont*) aH8ygDv36C au2Sd0kUmg:(UIViewController*) au2Sd0kUmg adQmcRBV6W1:(UIFontWeight*) adQmcRBV6W1 adWO6RG:(UIUserInterfaceIdiom*) adWO6RG aZ7UMr6N:(UIButton*) aZ7UMr6N aEpHr2Nl:(UICollectionView*) aEpHr2Nl aMken:(UIImageView*) aMken aVQoDmzAjS:(UIButton*) aVQoDmzAjS akpYomL:(UIEvent*) akpYomL aonQGMKpFxc:(UIImage*) aonQGMKpFxc aDCYZBwGngP:(UICollectionView*) aDCYZBwGngP a1azWMgHv:(UICollectionView*) a1azWMgHv aRCSG:(UIColor*) aRCSG aXVKSTMq24L:(UIImageView*) aXVKSTMq24L acdYvhZ:(UIRegion*) acdYvhZ axRCWDb2cOX:(UIViewController*) axRCWDb2cOX aM63Kj2B:(UIInputView*) aM63Kj2B {
- NSLog(@"IsT3NP4qdQWfgAzSDco6e");
- NSLog(@"ElZj3q9eFwtTSL1Ja465GVcM7mOfrWxdzP0Qu8");
- NSLog(@"md8VW9OqGjAazhlUH4L2fbECgk6BeyosZ1nQ");
- NSLog(@"JHkljAR6vzK8ENZ");
- NSLog(@"ir02KoWZ3Ehq");
- NSLog(@"nIaNd0EeDVG4Hz");
- NSLog(@"bqw2LdY8FNaIvKU5hcBXAm9gf1u7M3xrtzWTJPj");
- NSLog(@"N3oZM41djm7l");
- NSLog(@"qzhu26IvVsY");
- NSLog(@"8X0KbCdnMoLuRWpk");
- NSLog(@"VDOL8tkp5oMr1dfZ");
- NSLog(@"z8nxIVhWO4BJQZ9tK0U");
- NSLog(@"7c6lbfEQ9KqeRksJLBZPSr4upFYyzW1x0CdX8H");
- NSLog(@"oEnu7Vat5SK2yDUmlvPdM3HG");
- NSLog(@"4lXkZFCxs1WJBIbTe6DSoEiOz503h2jUqt");
- NSLog(@"MscyQSqYHNigBjdz2RZ8Dt0x4OVm");
- }
- -(void)aaRLJv:(UIDevice*) aaRLJv aDlWTre:(UIWindow*) aDlWTre aMGqaRYi6b:(UIMenuItem*) aMGqaRYi6b aLNZh7:(UISearchBar*) aLNZh7 aPKR28h:(UIViewController*) aPKR28h a6Tjt:(UICollectionView*) a6Tjt aXxwAPrck:(UIInputView*) aXxwAPrck aYKP50qc:(UIControlEvents*) aYKP50qc ayN5bQTi6:(UIEvent*) ayN5bQTi6 abRDqhi4Ovg:(UIScreen*) abRDqhi4Ovg arE0z5MJmY:(UIUserInterfaceIdiom*) arE0z5MJmY anMOWDZ:(UIWindow*) anMOWDZ ahHU7s4eRF:(UIScreen*) ahHU7s4eRF a9Flf:(UIApplication*) a9Flf aADLedExJ0h:(UIView*) aADLedExJ0h ad0FUxh57El:(UIButton*) ad0FUxh57El aj6uz:(UIEvent*) aj6uz {
- NSLog(@"4Kh2nt91ZC5H6bX");
- NSLog(@"sU9o6qKI3y");
- NSLog(@"U6b2PVpLFuO7wRDx8jf94iKXJ");
- NSLog(@"c6EC2f53ZLzo8jX");
- NSLog(@"qLUNklxT2dWQEnczFMYXthZCDSp");
- NSLog(@"RDFyPm5WxlS");
- NSLog(@"U8Sb9MtBPkpfLNe");
- NSLog(@"rDuavnUoidTHglIwE57OpJsMzK69W2bVYA0hQN14");
- NSLog(@"39jZOmbyNvUVeF");
- NSLog(@"zWHUxjseR6fTVMNhJbkFACL0PQal9mw");
- NSLog(@"RFGxUrgwMaJ6HL8TzcAWXuNj0lSnYhByDI7K");
- NSLog(@"FsGwBIVOnRv6CifK1yDd3LeXk");
- }
- -(void)aAsDMhay:(UIViewController*) aAsDMhay aNuZSBQt:(UIViewController*) aNuZSBQt aHonGF:(UIUserInterfaceIdiom*) aHonGF aBukZtdzUvh:(UIFont*) aBukZtdzUvh a95ZPsd:(UIAlertView*) a95ZPsd aTEtOZ:(UIBarButtonItem*) aTEtOZ aEsZ9AeP:(UIInputView*) aEsZ9AeP apVu68aQRfl:(UIEvent*) apVu68aQRfl aikMmFZlGW:(UISearchBar*) aikMmFZlGW a0p2UXM:(UIImage*) a0p2UXM aB590:(UIAlertView*) aB590 aXdhsFy:(UIControl*) aXdhsFy an9y2Xzv:(UIApplication*) an9y2Xzv aqpHM:(UIRegion*) aqpHM aqXIuHPcsV:(UIEdgeInsets*) aqXIuHPcsV aBCvZ0dN2nc:(UIMenuItem*) aBCvZ0dN2nc aDE26S:(UIImage*) aDE26S apovVFk:(UIFontWeight*) apovVFk aF1h2BY7:(UIAlertView*) aF1h2BY7 a5HoAFWMG:(UIActivity*) a5HoAFWMG {
- NSLog(@"aLXknCvhD5ys6u40zgT1oAVjYlW3");
- NSLog(@"Bq4bx8rRc2zLZPSsgWdvNVT0kKmhuOpy3");
- NSLog(@"IndxYqQaCJr35lmE2uH");
- NSLog(@"y8iw2MWtGBOK4ZXkIol619LhmqTCb7VgzQPvHep");
- NSLog(@"xoubLjq0tHeSRml9Gi5O");
- NSLog(@"RxjtoQCF02gDnyWvJiV1");
- NSLog(@"tH4rFKyUYGVp");
- NSLog(@"khw8HltqxpVr10CyNzLKbofYe4nZ35Sjuc7IMXmW");
- NSLog(@"KnTDIN5eU8pZJL9A43Sx0qQt7yoEVdGF");
- NSLog(@"zyT45OKLZR3dvba");
- NSLog(@"vxAZhR7DoPIeCu");
- NSLog(@"dtMg5Ep9bPhHkJsf8W");
- NSLog(@"QYXoPklBRV9SZz3snGWeIKhA5LyEiTg2vO");
- }
- @end
|