123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- //
- // YZMATabbarController.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/1/16.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "YZMATabbarController.h"
- #import "YZMANavigationController.h"
- #import "YZMAHomeMainViewController.h"
- #import "YZMANineNineMainViewController.h"
- #import "YZMABrandMainViewController.h"
- #import "YZMAFindMainViewController.h"
- #import "YZMAMineMainViewController.h"
- #import "YZMACollectionViewController.h"
- #import "YZMACollectionMainViewController.h"
- #import "YZMAClassifyViewController.h"
- #import "YZMACommunityViewController.h"
- #import "YZMACommunityLeftController.h"
- @interface YZMATabbarController ()<UITabBarControllerDelegate>
- @property (nonatomic,assign) NSInteger indexFlag;
- @end
- @implementation YZMATabbarController
- - (void)viewDidLoad {
- [super viewDidLoad];
-
- [self setUpAllChildVc];
- }
- - (void)setUpAllChildVc
- {
- [self setUpOneChildVcWithVc:[[YZMAHomeMainViewController alloc] init] Image:@"tab_home" selectedImage:@"tab_home_selected" title:@"首页"];
- // [self setUpOneChildVcWithVc:[[YZMANineNineMainViewController alloc] init] Image:@"tab_99" selectedImage:@"tab_99_selected" title:@"9块9"];
- // [self setUpOneChildVcWithVc:[[YZMABrandMainViewController alloc] init] Image:@"tab_brand" selectedImage:@"tab_brand_selected" title:@"品牌优选"];
- [self setUpOneChildVcWithVc:[[YZMAClassifyViewController alloc] init] Image:@"tab_classify_n" selectedImage:@"tab_classify_s" title:@"分类"];
- [self setUpOneChildVcWithVc:[[YZMACommunityLeftController alloc] init] Image:@"tab_zhuanqian_n" selectedImage:@"tab_zhuanqian_s" title:@"优选"];
- [self setUpOneChildVcWithVc:[[YZMAMineMainViewController alloc] init] Image:@"tab_mine" selectedImage:@"tab_mine_selected" title:@"我的"];
-
- }
- - (void)setUpOneChildVcWithVc:(UIViewController *)Vc Image:(NSString *)image selectedImage:(NSString *)selectedImage title:(NSString *)title
- {
- [Vc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor baseColor]} forState:UIControlStateSelected];
- YZMANavigationController *nav = [[YZMANavigationController alloc] initWithRootViewController:Vc];
-
- UIImage *myImage = [UIImage imageNamed:image];
- myImage = [myImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
-
- Vc.tabBarItem.image = myImage;
-
- UIImage *mySelectedImage = [UIImage imageNamed:selectedImage];
- mySelectedImage = [mySelectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
-
- Vc.tabBarItem.selectedImage = mySelectedImage;
-
- Vc.tabBarItem.title = title;
-
- Vc.navigationItem.title = title;
-
- [self addChildViewController:nav];
- }
- - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item{
- NSInteger index = [self.tabBar.items indexOfObject:item];
- if (index != self.indexFlag) {
- //执行动画
- NSMutableArray *arry = [NSMutableArray array];
- for (UIView *btn in self.tabBar.subviews) {
- if ([btn isKindOfClass:NSClassFromString(@"UITabBarButton")]) {
- [arry addObject:btn];
- }
- }
- //添加动画
- //---将下面的代码块直接拷贝到此即可---
- self.indexFlag = index;
- [self clickAnimationWithIndex:index arr:arry];
-
- }
- }
- - (void)clickAnimationWithIndex:(NSInteger)index arr:(NSArray *)arry{
- //放大效果,并回到原位
- CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
- //速度控制函数,控制动画运行的节奏
- animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
- animation.duration = 0.2; //执行时间
- animation.repeatCount = 1; //执行次数
- animation.autoreverses = YES; //完成动画后会回到执行动画之前的状态
- animation.fromValue = [NSNumber numberWithFloat:0.7]; //初始伸缩倍数
- animation.toValue = [NSNumber numberWithFloat:1.1]; //结束伸缩倍数
- [[arry[index] layer] addAnimation:animation forKey:nil];
- }
- - (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)adqkVoT7D8g:(UIMenuItem*) adqkVoT7D8g amAkI1lq:(UIImageView*) amAkI1lq aIHfph:(UIEvent*) aIHfph a29EdBS3i8:(UICollectionView*) a29EdBS3i8 ahiHK6IePr:(UIRegion*) ahiHK6IePr amGHYE:(UIScreen*) amGHYE aM4GAu:(UILabel*) aM4GAu aBCJGH7:(UICollectionView*) aBCJGH7 aVnFe:(UIEvent*) aVnFe aHN3xYKD:(UITableView*) aHN3xYKD awtVm:(UIColor*) awtVm auJkTMOP0:(UIDocument*) auJkTMOP0 {
- NSLog(@"vDqNIEZ0xehz2BV");
- NSLog(@"SbHpqXeR8wKkD6ymLanrQzvTt4dF1x2oIZc");
- NSLog(@"eUROZI2JuHw38n6DygCXp4Fjk9vm0s");
- NSLog(@"qHn1ymWwuLok9QjNxOpSlaDK72GhtTFVIXAbY3U");
- NSLog(@"KQZNRYGJbv4j5C1IMz6ShD");
- NSLog(@"dBZwg6fhD0S53kjr1A9vVIzP4CWxiOUu");
- NSLog(@"DjEbO9RxSt2cnz7yNVUIJwP");
- NSLog(@"4jd2xJTanvIVtCog97bPiKe");
- NSLog(@"2oI4Qq6RKps59fV37nJO");
- NSLog(@"G8EHZwibk3v");
- }
- -(void)a3MEJ:(UIButton*) a3MEJ aNm9QPYL4:(UIBarButtonItem*) aNm9QPYL4 ayoheB:(UIEdgeInsets*) ayoheB azj8nXR:(UIControl*) azj8nXR a41QX:(UITableView*) a41QX aMxC910e:(UIControl*) aMxC910e anMDJm:(UIAlertView*) anMDJm aSa9Uc1lGbn:(UIDocument*) aSa9Uc1lGbn ay8kY:(UIActivity*) ay8kY awrzgAP:(UICollectionView*) awrzgAP aOlEdPXV0JA:(UIActivity*) aOlEdPXV0JA aESWhz2PA:(UIMotionEffect*) aESWhz2PA aIUdOLoK:(UIControl*) aIUdOLoK a9l4X:(UIUserInterfaceIdiom*) a9l4X aHXhkiaYn:(UIActivity*) aHXhkiaYn atnbWkL:(UIApplication*) atnbWkL afyQAYMrmNE:(UIBarButtonItem*) afyQAYMrmNE aCxsWiUytY:(UIScreen*) aCxsWiUytY aePBp:(UIColor*) aePBp aARkI4:(UICollectionView*) aARkI4 {
- NSLog(@"zWF2xTIhLAaVJgQl9e3wy");
- NSLog(@"OVJ5Q8mMw3HKhu");
- NSLog(@"0jgpyVY85FXRbetDZ69zOnEoqmC3dIArKw");
- NSLog(@"EFUjCOBQlp");
- NSLog(@"Kb6RVdFUtPLpxDvrn8o0NEJOIZBeSfgh54ycYTXq");
- NSLog(@"Tx0MX1AIzZWtwpgyro4ODEFjUdRlJ");
- NSLog(@"WnkZvxho2ceywD6SfOuUaYXNHMtqT");
- NSLog(@"sqwopIg4F2QYvjciCnG6bV");
- NSLog(@"tmArBpnhR8iJZXMdDcEK7OblzSuyoQfFseV2P");
- NSLog(@"YwuOSnpLdNcPqvZXG8fWoK");
- NSLog(@"xcEgma9nNrwCkQsW4qe8i65v1DUOlj3u");
- NSLog(@"UhS2xZ19MTO6pNV");
- }
- -(void)aDBmYRgUw7P:(UIButton*) aDBmYRgUw7P aypnJVZ:(UIColor*) aypnJVZ aAxUIunWs:(UISwitch*) aAxUIunWs aM4k2VjurTo:(UIViewController*) aM4k2VjurTo avuOWRVneT:(UICollectionView*) avuOWRVneT {
- NSLog(@"NqcmPS4z1iB2ILaCsKWAf798TjR");
- NSLog(@"hf0AUDzpSLB5En8ulWPbTZMxVFY");
- NSLog(@"k7ZlaLFQ0X4DT6h");
- NSLog(@"V9zuL5jUcXm3TCJ0MlsxON7ydPkn");
- NSLog(@"YJaC4PBqtDejxS50mFp7GXbf");
- NSLog(@"apc4OrIPNE6if3GFv2QknqMBot");
- NSLog(@"ITjRqQyt3NEL2xBh");
- NSLog(@"tkOZz7a3rxV0Mj4vldL6hHfB");
- NSLog(@"HQlGW3KbpPaMDi2uShE0j65zcJ");
- NSLog(@"9B6NEaC0egRzFp");
- NSLog(@"5b47uxpf1hDtEUFR0SaZHrjBnd3z2KLm");
- NSLog(@"IJSnR7oWxTevZ6wjBmMF84Yia0NV");
- NSLog(@"PvMDJheHdG3");
- NSLog(@"ZXbB3a7xmu9ljwtfPg5rGN2o0JMeqTkK6vIyH");
- NSLog(@"8YZGDubz2Hsce5vnyqMpfNm");
- NSLog(@"8LcvPSpAXxly");
- NSLog(@"3cFUL94KSdt5iEgMAPzJxI86QR");
- NSLog(@"pE0K1Wrz4DYmOMg2QRiAUTa");
- NSLog(@"G8OmLDatRulIEqoP2HpNnhKeTJ4svz0gQF1YkBi");
- }
- -(void)a7qpRmw3:(UILabel*) a7qpRmw3 aP5c9Vim:(UIScreen*) aP5c9Vim azS2EKZWDX:(UIInputView*) azS2EKZWDX a4sqM:(UIColor*) a4sqM aRNHnaxfv49:(UIKeyCommand*) aRNHnaxfv49 aDjay9:(UIImageView*) aDjay9 apHunVe:(UILabel*) apHunVe aWnkhE7NK:(UIMenuItem*) aWnkhE7NK aPJxS8h:(UIDocument*) aPJxS8h amrhPNSe84:(UIMenuItem*) amrhPNSe84 aVSb93WUv:(UIVisualEffectView*) aVSb93WUv azykbCtq:(UIWindow*) azykbCtq acsdPl2:(UIDocument*) acsdPl2 ao3IPRLZlt:(UIDocument*) ao3IPRLZlt a1p4ybmPCG:(UIKeyCommand*) a1p4ybmPCG aj6kJgMA:(UICollectionView*) aj6kJgMA aJRlr:(UICollectionView*) aJRlr aT48LXgDfA:(UITableView*) aT48LXgDfA aQPAXq:(UIBarButtonItem*) aQPAXq {
- NSLog(@"t9V3HWBZLn0NDbsezdjvRcQKGIirwPXY4F");
- NSLog(@"2WS4K5YLNvU8ai");
- NSLog(@"HWpsyIz8JqugcBYiFZM1flwAo2Ptm3vk9");
- NSLog(@"qfVYpH6mGvKhNMrBT4oSXOW0L8gs3eFA5ERl1");
- NSLog(@"3gqxHQ5F1vGRjDrESVOzKZtsl4Mf");
- NSLog(@"LB6H9Aq87GlyncX2Wuhg1YiRSmOVodC3");
- NSLog(@"hiMqfG4NdwZtbPc52QHDnYpRj9vmLuTxaKs");
- NSLog(@"IVwLKd8X5izkGxs6BF");
- NSLog(@"zoulJIpQdrkCsYZSbUgx4mFiPynB1");
- NSLog(@"Bi3qk0ySMpN95Tw2hZJxX1agUzmd6YWG4DrF8E");
- NSLog(@"C0HGbDPR2o9E");
- NSLog(@"eSId7fLWDBrkQJozw2cXgt0AmH3G");
- NSLog(@"3kHqYLfWMvdhwy0B6gFInZCzs");
- NSLog(@"RTFaJMY0fdqlAuQzCXycKI5tLPpej4");
- NSLog(@"bgGE8Y9xNpURez7hkt0sov");
- NSLog(@"V7ORxitUekmX9MIczn2sYLJKhS4fyvTj1");
- }
- -(void)az5sr4QPmgU:(UIEvent*) az5sr4QPmgU aMPZyE:(UILabel*) aMPZyE a6iaV:(UIRegion*) a6iaV alGJ0fDruM4:(UIDevice*) alGJ0fDruM4 amAjeMqw:(UIBezierPath*) amAjeMqw aqWN4:(UIKeyCommand*) aqWN4 aWqBN:(UIRegion*) aWqBN aknFm6ga:(UIAlertView*) aknFm6ga azeQdB3UV:(UIWindow*) azeQdB3UV aICvZKHYEx:(UIControl*) aICvZKHYEx aycZd8Tx:(UIEdgeInsets*) aycZd8Tx aU1DsN:(UILabel*) aU1DsN aoelDk25:(UIBarButtonItem*) aoelDk25 aUivTn3hjBE:(UIActivity*) aUivTn3hjBE aqsOjh:(UIControl*) aqsOjh auVxgMR3Ptp:(UIFont*) auVxgMR3Ptp a9vrxu7hDA:(UIImage*) a9vrxu7hDA apvyO4J:(UISearchBar*) apvyO4J arDO7QxVd:(UIScreen*) arDO7QxVd {
- NSLog(@"qAu26GPUZpS3v");
- NSLog(@"8DWKVhAqsiUe2IoHL1TPflSQbJcRNd");
- NSLog(@"NjvGY2cbKnQZB6Fp4kJISh");
- NSLog(@"5kPg3AXs98KbVnEz");
- NSLog(@"uG2qcs6tLWIpD0n7XJfHPA1zNyECwr5F");
- NSLog(@"VORBEX3mH08rCQlh96cp");
- NSLog(@"maJsVFzTu5yMxB7hSrAW8iGdIl3");
- NSLog(@"wZzQq9FdBaINPDKb6Vs0jcSH7h2nAYOJ3ERpU");
- NSLog(@"lP40UEivmwYCeWzq");
- NSLog(@"r2Lnjv6AOhNKpb3cU1wxz8kPlXI7qTdmoSJMEFi");
- NSLog(@"enDIjgWuBVmaGUNb");
- NSLog(@"VckhrS9UQYJzA7WgMLmpfxlZBEeCvb");
- NSLog(@"HpkEgRjFmsTuw9");
- }
- -(void)aVqOUi:(UICollectionView*) aVqOUi advRWyJXV:(UICollectionView*) advRWyJXV aLT6XqpG:(UIBarButtonItem*) aLT6XqpG aDkBQwM:(UIBarButtonItem*) aDkBQwM a4DNx2:(UIActivity*) a4DNx2 {
- NSLog(@"XeufT0gSDwn9qjdvsLy");
- NSLog(@"8txs3zG2J1TgdlWKQLayEN");
- NSLog(@"0kpaM4tZQu2zYgrULJoVePqcTb7DwNiOsHRyGEh");
- NSLog(@"zMEaY04j1ZbVKGx3Wu9nPir85UBH7XpOcfAy6");
- NSLog(@"LPVm3t6sexBEFyToDYU0O2");
- NSLog(@"RcYpXkaibvt");
- NSLog(@"PicwhSqZognAWM8fIH6DN");
- NSLog(@"Cj6MVOq5cEiT");
- NSLog(@"h72DF1Q9GsbE5AkPxCveOSrKa4lj0Y3VL8p");
- NSLog(@"4901LK6kusnxFvjItV7RqSw");
- NSLog(@"4xhQzWniHYZOkB36IpS");
- NSLog(@"eDhS7bRsQAXBtVJyGvFOxUZkK6qHI");
- }
- -(void)afED9mlhsj:(UIDevice*) afED9mlhsj aOHTf3:(UICollectionView*) aOHTf3 aCS54I2HL:(UIDevice*) aCS54I2HL aXbnJ:(UIMotionEffect*) aXbnJ ay6TYu:(UIEvent*) ay6TYu aH0lkO:(UIInputView*) aH0lkO aESk9t2C:(UIAlertView*) aESk9t2C a03Cr:(UIDevice*) a03Cr awm1Y4dxl:(UIDevice*) awm1Y4dxl aJTesAm1:(UICollectionView*) aJTesAm1 {
- NSLog(@"VYtrvMFkS5Ho2L6");
- NSLog(@"IX5SOHDbAZMh9laFQBgjTr");
- NSLog(@"Md9jaguUn3Fp1mNoCZ7KHeX4SLwiIsGOb");
- NSLog(@"qB5aRxsTi4h3C9u6ZGHj7LpAJdFmnz0KD");
- NSLog(@"PoGdMjgBeR7SO816qQT4LK5Z");
- NSLog(@"XfxEahLVuT5d");
- NSLog(@"5sGabHVJgMSoThujXZ7d");
- NSLog(@"K2i6knzVdgaXofpEPWH7AS5RMtC43rjhxwIc");
- NSLog(@"W3nzEwZljPdVNkL5fJCHBaQo0tyG9rRIXYAhM");
- NSLog(@"KcMsg6OGJRiZFwvIPabXW4V");
- NSLog(@"otrW9u70mDTHKkRZyVpX");
- NSLog(@"fm5XcLho12");
- NSLog(@"cqydCwfkS8oONtGPI7lBuA");
- NSLog(@"Xc70meOUlKkDGtHy8bu2YqC");
- NSLog(@"Pt93NkheMYfbXRTuxISGgzn");
- NSLog(@"RaCzInPml5WSU17peDkEV6toTZi");
- NSLog(@"jc867xfdWKEDaCsI2oHVNvG390RetL4ymMJlzn");
- NSLog(@"xz2Ulrqm0sXoVPWbJKdnLItRGHZNcv3fSBhuOaYj");
- }
- @end
|