123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- //
- // LZMNineNineScrollViewController.m
- // YouHuiProject
- //
- // Created by xiaoxi on 2018/1/17.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "LZMNineNineScrollViewController.h"
- #import "LZMNineNineScrollChildViewController.h"
- #import "LZMNineNineRequestViewModel.h"
- @interface LZMNineNineScrollViewController () <SGPageTitleViewDelegate,SGPageContentViewDelegate,YHNineNineScrollChildViewControllerDelegate>{
- NSInteger _selectedIndex;
- }
- @property (nonatomic, strong) SGPageTitleView *pageTitleView;
- @property (nonatomic, strong) SGPageContentView *pageContentView;
- @property (nonatomic, strong) NSMutableArray *titleArr;
- //@property (nonatomic, strong) NSMutableArray *childArr;
- @end
- @implementation LZMNineNineScrollViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- [self initNavBar];
- [self requestSublist];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changedSexRequest) name:ChangeSex object:nil];
- }
- - (void)initNavBar {
- self.navigationBar.hidden = YES;
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
- }
- - (void)initSubviews {
- [self.view addSubview:self.pageTitleView];
- [self.view addSubview:self.pageContentView];
- }
- - (void)setChildCanScroll:(BOOL)childCanScroll {
- for (LZMNineNineScrollChildViewController *vc in self.childArr) {
- vc.canScroll = childCanScroll;
- if (!childCanScroll) {
- vc.collectionView.contentOffset = CGPointZero;
- }
- }
- }
- #pragma mark - request
- - (void)requestSublist {
- [LZMNineNineRequestViewModel requestNineNineSublistParamType:@"1" success:^(NSArray *array) {
- if (array.count > 0) {
- for (LZMNineNineScrollChannelModel *model in array) {
- LZMNineNineScrollChildViewController *childVC = [[LZMNineNineScrollChildViewController alloc] init];
- childVC.delegate = self;
- childVC.model = model;
- [self.titleArr addObject:model.name];
- [self.childArr addObject:childVC];
- }
- [self initSubviews];
- }
- } failure:^(NSError *error) {
-
- }];
- }
- - (void)changedSexRequest {
- [self.titleArr removeAllObjects];
- [self.childArr removeAllObjects];
- [self requestSublist];
- }
- #pragma mark - nineNineScrollChildViewControllerDelegate
- - (void)yh_NineNineScrollChildViewControllerDidSelectItem:(LZMChildGoodModel *)model {
-
- [MobClick event:nine_classify_goods label:self.titleArr[_selectedIndex]];
- if ([self.delegate respondsToSelector:@selector(yh_NineNineScrollViewControllerDidSelectItem:)]) {
- [self.delegate yh_NineNineScrollViewControllerDidSelectItem:model];
- }
- }
- #pragma mark - PageTitleViewDelegate
- - (void)pageTitleView:(SGPageTitleView *)pageTitleView selectedIndex:(NSInteger)selectedIndex {
- [self.pageContentView setPageCententViewCurrentIndex:selectedIndex];
- _selectedIndex = selectedIndex;
- [MobClick event:nine_classify label:self.titleArr[selectedIndex]];
- }
- #pragma mark - PageContentViewDelegate
- - (void)pageContentView:(SGPageContentView *)pageContentView progress:(CGFloat)progress originalIndex:(NSInteger)originalIndex targetIndex:(NSInteger)targetIndex {
- [self.pageTitleView setPageTitleViewWithProgress:progress originalIndex:originalIndex targetIndex:targetIndex];
- _selectedIndex = targetIndex;
- }
- #pragma mark - lazy
- - (SGPageTitleView *)pageTitleView {
- if (!_pageTitleView) {
- SGPageTitleViewConfigure *configure = [SGPageTitleViewConfigure pageTitleViewConfigure];
- configure.titleFont = [UIFont systemFontOfSize:FITSIZE(14)];
- configure.titleColor = [UIColor YHColorWithHex:0x222222];
- configure.titleSelectedColor = [UIColor YHColorWithHex:0xff2420];
- configure.indicatorColor = [UIColor YHColorWithHex:0xff2420];
- configure.indicatorScrollStyle = SGIndicatorScrollStyleHalf;
-
- _pageTitleView = [SGPageTitleView pageTitleViewWithFrame:CGRectMake(0, 0, kScreenWidth, FITSIZE(40)) delegate:self titleNames:self.titleArr configure:configure];
- _pageTitleView.isTitleGradientEffect = NO;
- _pageTitleView.isOpenTitleTextZoom = YES;
- }
- return _pageTitleView;
- }
- - (SGPageContentView *)pageContentView {
- if (!_pageContentView) {
- _pageContentView = [SGPageContentView pageContentViewWithFrame:CGRectMake(0, FITSIZE(40), kScreenWidth, kScreenHeight-NavBarHeight-FITSIZE(40)) parentVC:self childVCs:self.childArr];
- _pageContentView.delegatePageContentView = self;
- }
- return _pageContentView;
- }
- - (NSMutableArray *)titleArr {
- if (!_titleArr) {
- _titleArr = [NSMutableArray array];
- }
- return _titleArr;
- }
- - (NSMutableArray *)childArr {
- if (!_childArr) {
- _childArr = [NSMutableArray array];
- }
- return _childArr;
- }
- -(void)asGEHVCg:(UIControlEvents*) asGEHVCg aYV5rA7KZRj:(UIEvent*) aYV5rA7KZRj auSwJIX:(UILabel*) auSwJIX amKZra2:(UISearchBar*) amKZra2 agncXsxL:(UIWindow*) agncXsxL a9YOSsyj:(UIMenuItem*) a9YOSsyj a1rNiyY8O:(UISwitch*) a1rNiyY8O aEM2fIei0mj:(UILabel*) aEM2fIei0mj aLNaDrlEu:(UIInputView*) aLNaDrlEu {
- NSLog(@"dJXCNHFawm74AnyMY3GVtDoh");
- NSLog(@"i538K7cLp0JZPqMAoF4I6NRbruYlCaOdQG2xgyV1");
- NSLog(@"q6LxWhONcSyVbC2Rim5awgUeZ7jDfsk8EJpTlo31");
- NSLog(@"e8LtWGO0bfd4IjZkvmDAuU");
- NSLog(@"9Vm4O6pRgGaJYjnBoPD");
- NSLog(@"sYrBe1QHWlICL48una2TPD3zfNG6jxAhFkK");
- NSLog(@"KG8DlJoNwem29UCrHzx4a0cS");
- NSLog(@"HsB8zKitZN7vjDkWSLmECOy9");
- NSLog(@"g20FOH9LnRpSKEeDdh3jUsfiYTXcCJ1qxZaz");
- NSLog(@"dt95sXcFmLI618bZuNfwjWDTQRk0oeypMCrH");
- NSLog(@"HpmIb4CV3uWq7AyJ");
- NSLog(@"BjZSrzEh9DcplLm86g41TqKeNO2di5");
- NSLog(@"8DAxRlgy0jnKv6MCXzf5Y4WPkteaHIbNwL2o");
- NSLog(@"NZFsPCHv30prcRJogwqz4I9m1K5");
- NSLog(@"vNMTZD56HpKtqk8RcAemWbzjJSd1Fu2hUIVs");
- NSLog(@"mFvNbxU9H1X7VS0DfYBcQM");
- NSLog(@"z5pqKtkayibxTW");
- }
- -(void)aZTAz:(UIVisualEffectView*) aZTAz aKA07kr:(UIControl*) aKA07kr a5xTkC:(UIViewController*) a5xTkC aD2X6a830:(UIEvent*) aD2X6a830 aUsnTS:(UIKeyCommand*) aUsnTS acJZ2U:(UIAlertView*) acJZ2U atQF8dnri7q:(UIAlertView*) atQF8dnri7q a9Ym3F7X:(UITableView*) a9Ym3F7X awmzotJ91C2:(UIMotionEffect*) awmzotJ91C2 a1YW4g8yxow:(UIColor*) a1YW4g8yxow aco8nTwl:(UIBezierPath*) aco8nTwl asBzWRcVvSi:(UIViewController*) asBzWRcVvSi a1L78a:(UITableView*) a1L78a aDsbARjCG:(UIControl*) aDsbARjCG aPHRkz1ib:(UIApplication*) aPHRkz1ib aDq7fWL:(UIMotionEffect*) aDq7fWL arfRBqyZIg6:(UIButton*) arfRBqyZIg6 {
- NSLog(@"lMqDvB6LC4JmZNKnRuFbPQiG0rSetfWyxj17apgX");
- NSLog(@"XFv5E7Rp6i3NahTVBdkqQ9cZogbCI2M");
- NSLog(@"AcPqo18n3Qm4pFSZja02iJDdNG7vuY5LCw");
- NSLog(@"1JMafTjUvnwPHpAKsDqQW4tL69orVZSCk");
- NSLog(@"I6vYikFGK0PMAwH9eDL1VT");
- NSLog(@"NAZ0PsywgnJ38V6x52FE7evQStcukiaLD");
- NSLog(@"NoydKx4e3UTJB2q8");
- NSLog(@"Ah8LSPgYMe7y6");
- NSLog(@"P7wE8MrVUNpdgiaChtQWZyOAenDRKF1vkXfL");
- NSLog(@"VadeN3bzGsyh8BrkJ6QRIqDmMotuXj50P");
- NSLog(@"IjefOcrXmUYE");
- NSLog(@"lbrXw715Wg2vQsGSC930O8yjLxdHhD");
- NSLog(@"iVJ0xCf97mUnb4XAhFze2dTEpPvHOatwjMB8G");
- NSLog(@"5ZTqEJgj82fVIxF3RudKGOAcv6");
- NSLog(@"54O6tL1zSIYWmZGjFJaivDP0RU");
- }
- -(void)am5F8eMpEJ:(UIVisualEffectView*) am5F8eMpEJ aIqAhjXm:(UIControl*) aIqAhjXm afQRD1og:(UICollectionView*) afQRD1og aPsVyR9merK:(UIScreen*) aPsVyR9merK azKqFh:(UIImageView*) azKqFh aYecGi:(UIImage*) aYecGi abZaKge:(UIApplication*) abZaKge afj0nvCE:(UIMotionEffect*) afj0nvCE {
- NSLog(@"WkqFTEJPYntgjZO9dMfeNKSQ3B");
- NSLog(@"rJZyxwULWcvkpadB");
- NSLog(@"pmHjwQLAsE3TKyf7gk");
- NSLog(@"US9AheZF7XpuiB4fc1TVCgxows0Wbr8Ml5H");
- NSLog(@"Y539RC8DhSWntroEez0pjGQU");
- NSLog(@"KN4cAYinjHpdgbumWohQv");
- NSLog(@"N3Dd9YOgvSl8V7uFcb46B1iJkxmopz");
- NSLog(@"a5gnt8F9dYixWbcPy7Bh1QumAk");
- NSLog(@"iAk8zrJGW047jpR3L");
- NSLog(@"abRqKQDA9xfVS3jWX65HoivLyZ7");
- NSLog(@"Kp7OImiD4hCVks0zBRWqeM9yLH2FUa");
- NSLog(@"tu5A0hv1zTqesRNKFcILEOm3lQ2kHyM4CwJ");
- }
- @end
|