123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342 |
- //
- // LZMMyFansViewController.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/5/19.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "LZMMyFansViewController.h"
- #import "LZMOrderTableView.h"
- #import "MLMSegmentHead.h"
- #import "MLMSegmentManager.h"
- #import "LZMChildFansViewController.h"
- #import "LZMFansHeaderView.h"
- #import "LZMShowFansHelpView.h"
- #import "CCAlertShowView.h"
- #import "LZMPotentialFansViewController.h"
- @interface LZMMyFansViewController ()
- <
- UITableViewDelegate,
- UITableViewDataSource,
- MLMSegmentScrollDelegate
- >
- @property (nonatomic, strong) LZMOrderTableView *tableView;
- @property (nonatomic, strong) LZMFansHeaderView *headerView;
- @property (nonatomic, strong) MLMSegmentHead *titleView;
- @property (nonatomic, strong) MLMSegmentScroll *segScroll;
- @property (nonatomic, strong) NSMutableArray *vcList;
- @property (nonatomic, assign) BOOL canScroll;
- @property (nonatomic, strong) UIButton *rightHelpBtn;
- @end
- @implementation LZMMyFansViewController
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- [self configNavigationBar];
- [self configTableView];
- [self creatHeaderViewAndFooterView];
- }
- - (void)configTableView {
- // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeScrollStatus) name:@"leaveTop" object:nil];
- // self.canScroll = YES;
- // self.headerView = [[LZMFansHeaderView alloc] initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH , 135)];
- // self.tableView.tableHeaderView = self.headerView;
- [self.view addSubview:self.tableView];
- }
- - (void)configNavigationBar {
- [self.navigationBar setNavTitle:@"我的好友"];
- 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]];
-
- self.rightHelpBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
- [self.rightHelpBtn setImage:[UIImage imageNamed:@"helpmonth"] forState:UIControlStateNormal];
- [self.rightHelpBtn addTarget:self action:@selector(showHelpAlert) forControlEvents:UIControlEventTouchUpInside];
- self.rightHelpBtn.hidden = YES;
- [self.navigationBar setCustomRightButtons:@[self.rightHelpBtn]];
- }
- -(void)viewWillAppear:(BOOL)animated{
- [super viewWillAppear:animated];
- [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
- }
- - (void)backAction {
- [self.navigationController popViewControllerAnimated:YES];
- }
- - (void)creatHeaderViewAndFooterView {
- self.view.backgroundColor = [UIColor whiteColor];
-
- NSArray *titleArr = @[@"全部好友",@"直属好友",@"推荐好友",@"潜在好友"];
- for (int i = 0; i < titleArr.count; i++) {
- if (i == 3) {
- LZMPotentialFansViewController *child = [[LZMPotentialFansViewController alloc] init];
- [self.vcList addObject:child];
- }else {
- LZMChildFansViewController *child = [[LZMChildFansViewController alloc] init];
- child.type=i;
- [self.vcList addObject:child];
- }
-
- }
- self.segScroll = [[MLMSegmentScroll alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ChildTableViewHeight) vcOrViews:self.vcList];
- self.segScroll.bounces = NO;
- __weak typeof(self) weskSelf = self;
- self.segScroll.showingIndex = ^(NSInteger index) {
- weskSelf.rightHelpBtn.hidden = index!=3;
- };
- 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 = 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 ===
- - (void)showHelpAlert {
- LZMShowFansHelpView *popView = [[LZMShowFansHelpView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-80, 213)];
- CCAlertShowView *showView = [CCAlertShowView alertViewWithView:popView];
- popView.dismissAction = ^{
- [showView dismiss];
- };
- [showView show];
- }
- #pragma mark --------------------- UITableView delegate -------
- - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
- return 1;
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
- return 1;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
- return 0.1;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
- return 40;
- }
- - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
- return SCREEN_HEIGHT-NavBarHeight-40;
- }
- - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-
- UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cellID"];
- return cell;
- }
- - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
- return self.titleView;
- }
- - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
- return self.segScroll;
- }
- #pragma mark ----- scroll delegete ----
- //- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
- // CGFloat bottomCellOffset = [_tableView rectForSection:0].origin.y;
- // if (scrollView.contentOffset.y >= bottomCellOffset) {
- // scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
- // if (self.canScroll) {
- // self.canScroll = NO;
- // [self setChildViewControllerCanScroll:YES];
- // }
- // }else{
- // if (!self.canScroll) {//子视图没到顶部
- // scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
- // }
- // }
- //}
- //
- //- (void)setChildViewControllerCanScroll:(BOOL)childCanScroll {
- // for (LZMChildFansViewController *childVc in self.vcList) {
- // childVc.childCanScroll = childCanScroll;
- // if (!childCanScroll) {
- // childVc.tableView.contentOffset = CGPointZero;
- // }
- // }
- //}
- #pragma mark ----------------
- - (LZMOrderTableView *)tableView {
- if (!_tableView) {
- _tableView = [[LZMOrderTableView alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight) style:UITableViewStylePlain];
- _tableView.estimatedSectionHeaderHeight = 0;
- _tableView.estimatedSectionFooterHeight = 0;
- _tableView.sectionFooterHeight = 0;
- _tableView.sectionHeaderHeight = 0;
- _tableView.estimatedRowHeight = 0;
- _tableView.delegate = self;
- _tableView.dataSource = self;
- _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
- _tableView.backgroundColor = [UIColor yhGrayColor];
- _tableView.bounces = NO;
- _tableView.showsVerticalScrollIndicator = NO;
-
-
- [_tableView setSeparatorColor:[UIColor YHColorWithHex:0xdddddd]];
-
- }
- return _tableView;
- }
- - (NSMutableArray *)vcList {
- if (!_vcList) {
- _vcList = [NSMutableArray array];
- }
- return _vcList;
- }
- - (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)aA2Wo:(UIImage*) aA2Wo aR2BfrUZM:(UISwitch*) aR2BfrUZM aGl8uM:(UISearchBar*) aGl8uM aY0zHrygfo:(UIInputView*) aY0zHrygfo agNw2P:(UIVisualEffectView*) agNw2P {
- NSLog(@"qXP2Q4B0tsaSpg1lV9JGZei");
- NSLog(@"PoZywlTxOH5mge8qDjSs");
- NSLog(@"ZlfoI5PnLEKUvV");
- NSLog(@"CotnZ5JKHbp2ilVBzRm31O9hywExeNU6XIjrcDWF");
- NSLog(@"euALCtVjaKs613IGpir2RoMDTHl");
- NSLog(@"9qC5idXxVFcRhGLvBEno");
- NSLog(@"wxVZokGf3iSDpJ0aPOK5yCQYvdXABq1IN4");
- NSLog(@"CtyJdPY8A4mhBuGWfZHsFw3a1QXDT5g");
- NSLog(@"dHXVKNRGj43Agl26UZMBpPb");
- NSLog(@"R2P1C4EBb5jk");
- NSLog(@"m6oPjevqNgH");
- NSLog(@"qR2UezkxB9v");
- }
- -(void)aVDkSa4xF:(UIFont*) aVDkSa4xF awBz69ZULNf:(UIBezierPath*) awBz69ZULNf ayCENH:(UIActivity*) ayCENH a3Cnd9t:(UIControl*) a3Cnd9t a3viLHQW:(UITableView*) a3viLHQW avrgn8bm:(UIActivity*) avrgn8bm amoeznZR7YX:(UIControlEvents*) amoeznZR7YX abGtW9yXjv:(UIFontWeight*) abGtW9yXjv {
- NSLog(@"pFgrsz3Qa1nvfL07cWM58VO");
- NSLog(@"XmqiTcr576UAbd9LZQR4ugxJaYnwt");
- NSLog(@"IFM2Y8L5OaAHDusxECkWod7ci4lUX");
- NSLog(@"eXYrMUB6mT");
- NSLog(@"k3pcUImzeYrsh5ovflX2RSVwiE8");
- NSLog(@"7BztDNFJxT");
- NSLog(@"yFSOepDBclKk7mG4");
- NSLog(@"lM1vGjuZWgBXwIecfSyCqLEbhAnYRNO265ps");
- NSLog(@"cF0H9Q4nzgS2p");
- NSLog(@"zv6YSmct3h5jP4FGDUZVyu087KwfrIgTeOW");
- NSLog(@"9Y4qJwdyFlWHQ");
- NSLog(@"5waxpUCATOht2Ni0GeWKIRX6E79L");
- NSLog(@"jzEbohqp37d5eNlDrsvI4t8OfGQCVBFHw6iJa");
- }
- -(void)aRvQf:(UIBezierPath*) aRvQf aaI57qWoR:(UIViewController*) aaI57qWoR aUhKdg0YJpb:(UICollectionView*) aUhKdg0YJpb aompJ4r1L:(UIEvent*) aompJ4r1L alvVXfJy:(UIMotionEffect*) alvVXfJy {
- NSLog(@"AJMHEbVPhX0qTInr2gwKDRYcoOktG17Z5j6a8");
- NSLog(@"e9gJpvr25NtqaxEZ0PfnLQ3ckVioY4T7u");
- NSLog(@"SRfi1ECm8L2zkjQbV5XgZUMtOn");
- NSLog(@"8rfmsy9D2QA5G7aYNo");
- NSLog(@"QJsPIKCWvNwhbDcpL7juRZ3YgxmFqUiH50lB8n1");
- NSLog(@"8sbo9GWADjpfgliTxBe5L7mQ03XIOrcavUH");
- NSLog(@"hnav86RgeJHF0dcjy9QqLxBD4SMsOt");
- NSLog(@"dxWKPDFBQsY8HGl0MgAa");
- NSLog(@"NA3n7KfjhglWrX");
- NSLog(@"Grw2ZL0MoJu6xag7Q9YEiclXD");
- NSLog(@"uoUTtlR1HapZBPdwYWJfgvmM2zFIjbCyDqL56e8");
- NSLog(@"Nl1qxprCAw43XoW5zIs9vk2aMj7PJ");
- }
- -(void)avt583afs:(UIDevice*) avt583afs aXpJmxkrC:(UIRegion*) aXpJmxkrC apQELoYaXe:(UIDevice*) apQELoYaXe aHi2q3GLJe:(UIBezierPath*) aHi2q3GLJe aHSlew3:(UIMotionEffect*) aHSlew3 azDgh:(UIView*) azDgh aq3Keda7F:(UIInputView*) aq3Keda7F aTie25:(UIView*) aTie25 aLQY2HOtA:(UIColor*) aLQY2HOtA a2sg5RCq1QU:(UIAlertView*) a2sg5RCq1QU asNCnV9OeG:(UIUserInterfaceIdiom*) asNCnV9OeG ajBLpf:(UISwitch*) ajBLpf a7oIQ4EAX:(UIControl*) a7oIQ4EAX aIf7FrZ:(UIEdgeInsets*) aIf7FrZ aRNhq:(UITableView*) aRNhq az1wKOBL:(UIBezierPath*) az1wKOBL aO80bDE:(UISwitch*) aO80bDE ayWINT2rlCu:(UIControlEvents*) ayWINT2rlCu an2j6tMLbw:(UICollectionView*) an2j6tMLbw {
- NSLog(@"Uzd6JkQWKFp");
- NSLog(@"l1PdXiK0avj5uIfYSTUOFrV8LpR4zkMHwsZG2cb");
- NSLog(@"lE1hmGxa9LU5gK47fBVMXP");
- NSLog(@"veZAJKO8EIrPgBM6U5RYNtnH4cbq2DXhpVFsSi");
- NSLog(@"F0wMK89SmrYBqks1WRDCVG");
- NSLog(@"e0p2FY9UJPAr1x7fIZNgk");
- NSLog(@"nkrFbPoBsSpUyawD7mV9Y8");
- NSLog(@"GtAlTiUmf9K2PBSoOhaycu");
- NSLog(@"AvCYpEauSR0HifK42XtbhV");
- NSLog(@"0pNuqFDMHK9sAxPzhSJm5oVib2RXL1Wtf");
- NSLog(@"usETwGSD9h3CA1XdNybV5flQFRp7j2KLkBn");
- NSLog(@"Ign6MuYqRDLCeTywocHvm");
- }
- -(void)ahn5mGzq:(UIImageView*) ahn5mGzq ao52Ujy:(UIUserInterfaceIdiom*) ao52Ujy aW5J0ITRNa:(UICollectionView*) aW5J0ITRNa aJdk4fCaX3:(UIFont*) aJdk4fCaX3 aE5WBump:(UIApplication*) aE5WBump aBO4ch:(UIActivity*) aBO4ch aZip4f:(UIViewController*) aZip4f aLoqiBgI:(UIVisualEffectView*) aLoqiBgI a5R6YtDnJZK:(UIActivity*) a5R6YtDnJZK aLGY2S0o7yQ:(UIButton*) aLGY2S0o7yQ agRrPtUYd:(UIControlEvents*) agRrPtUYd aSJ8XWvM9:(UISwitch*) aSJ8XWvM9 {
- NSLog(@"y1bzpu76lTEhcdUNjrOoBQ5WaY9PL");
- NSLog(@"SGoBujlXYx3EUgNPqcnOdKAQm");
- NSLog(@"psXTQiwevbyamNIGgfj");
- NSLog(@"Ls0tM9mbq8Fe46hirdnDYR");
- NSLog(@"BYh51nIwzNCGfgVQDEWL3pZj");
- NSLog(@"RU8DJBurxmi72d4pYGTS6knLHAZIgQKvtbP");
- NSLog(@"4jQ6CZLgGEPMOVqWD5lKtaAus19");
- NSLog(@"VJFYNKyjXd6Tg");
- NSLog(@"Uv7PpQbL1nhaKOX3GyEzB0SVrl5fu8N4WT6");
- NSLog(@"7y3arl1w9q");
- NSLog(@"Tq0hNFS7mGw4iIXk2gVxJKas9yPvDdMLWfHYRrUe");
- NSLog(@"XW6fMHlrF3AsDbIgjiw");
- NSLog(@"r13hiCLZqlRnzg0w5TovfBFkG2OMm");
- NSLog(@"ERd0lSGrQBZ1wefDzapg3ku8H9YT");
- NSLog(@"igHuL5VPDBnjRh40TcGkWzeZq");
- NSLog(@"UeSmsLqaMk0YFN1bQW2GVnC3");
- NSLog(@"8wXfCFZT3hk95nEdesbV4HxIrcG2p");
- }
- -(void)a3KE2RCJGN:(UIImageView*) a3KE2RCJGN aNtwCo:(UIEvent*) aNtwCo aPMO02:(UIColor*) aPMO02 aPN1flTc:(UIControlEvents*) aPN1flTc a26IHoR:(UIButton*) a26IHoR aXJFeQW9w:(UIImageView*) aXJFeQW9w aC805eEqvA:(UIInputView*) aC805eEqvA aYwojQnk3hi:(UIDocument*) aYwojQnk3hi aEV19n8fi:(UIAlertView*) aEV19n8fi awB5hJ:(UIControlEvents*) awB5hJ aoTNdC4K:(UIUserInterfaceIdiom*) aoTNdC4K acIwCE:(UIActivity*) acIwCE {
- NSLog(@"IPeQiFSmOpD2zCj6");
- NSLog(@"KPqxr7G2ndvsVB8tyALRuXp0FcW9zH4I5QkS6");
- NSLog(@"25AWJp6RmOuT0SiKjUnlMy1Q83CbsVhgXa");
- NSLog(@"3hqYHowyFLMW4E");
- NSLog(@"ouf6n2j15PhCQT");
- NSLog(@"gBYfFWM0aouRCj4l28r7wmZ");
- NSLog(@"RZlgxzGTSfEJK");
- NSLog(@"FoApdC32mZO0NbUIcHakBRn4Y87vwut");
- NSLog(@"mfOt3SXo9WlC4yFGhZJ8MNj2xuVgTq");
- NSLog(@"bfV6FePJrGRXj29BgMyAxNQIutqU7LDn1l8WmYwE");
- NSLog(@"KLtZX3wiGEgMpQC");
- }
- -(void)a3bnCmM:(UIButton*) a3bnCmM aBWc52Go8z:(UITableView*) aBWc52Go8z aZshYv83:(UIMotionEffect*) aZshYv83 a6pAn7ZBKwj:(UIDevice*) a6pAn7ZBKwj aFE9bgOutAV:(UIEdgeInsets*) aFE9bgOutAV aER2bpukyK:(UIRegion*) aER2bpukyK aH932CW:(UIView*) aH932CW arGzFCt6:(UIInputView*) arGzFCt6 azigRVpyhI:(UIControlEvents*) azigRVpyhI aeTvNsg:(UIInputView*) aeTvNsg apQSy:(UIView*) apQSy ankIpoW:(UIMotionEffect*) ankIpoW aSkZ3awzBQI:(UIMenuItem*) aSkZ3awzBQI aWJ0I:(UIBarButtonItem*) aWJ0I awAycS:(UIBarButtonItem*) awAycS {
- NSLog(@"oD1eKMGOYSaJAU8m4");
- NSLog(@"zed58DoQEJ19csbXWwS6yO");
- NSLog(@"oAcEex4Ys5");
- NSLog(@"aPiX9O6f4b5Dwg");
- NSLog(@"NfYL4rPbpjg2T");
- NSLog(@"2YjoaXstCFV5MKHm4nf3AvZpOTI6EQ0");
- NSLog(@"vwKoZDJQm5SHuzl2t3FjW1fpa8Vkqs96On");
- NSLog(@"rHQJSa3kGmLpByEbxlOhdWo");
- NSLog(@"Y9icgtDLe8FE6ujOQqKXbIwarNJkM72W1U4");
- NSLog(@"FcD9BSqsMJza3471xewCZu");
- NSLog(@"GqYsDHEJK9mX0N8z735pITli6tb1fnAkQxLrh");
- NSLog(@"E3JMbYOWUa61vBe");
- NSLog(@"IJxML9f0X3Sz7oKq5DitQmae");
- NSLog(@"eXAfosMKQk1DH2b4uq6yFWdTSUcPviB7IZx");
- NSLog(@"IgPjh0tbDE7cxfLX2RS");
- NSLog(@"itwRvxCMQqnBJseAcYrpk2NLy8HZ6");
- }
- @end
|