一折买app------返利---------返利宝

YZMATabbarController.m 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. //
  2. // YZMATabbarController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/1/16.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "YZMATabbarController.h"
  9. #import "YZMANavigationController.h"
  10. #import "YZMAHomeMainViewController.h"
  11. #import "YZMANineNineMainViewController.h"
  12. #import "YZMABrandMainViewController.h"
  13. #import "YZMAFindMainViewController.h"
  14. #import "YZMAMineMainViewController.h"
  15. #import "YZMACollectionViewController.h"
  16. #import "YZMACollectionMainViewController.h"
  17. #import "YZMAClassifyViewController.h"
  18. #import "YZMACommunityViewController.h"
  19. #import "YZMACommunityLeftController.h"
  20. @interface YZMATabbarController ()<UITabBarControllerDelegate>
  21. @property (nonatomic,assign) NSInteger indexFlag;
  22. @end
  23. @implementation YZMATabbarController
  24. - (void)viewDidLoad {
  25. [super viewDidLoad];
  26. [self setUpAllChildVc];
  27. }
  28. - (void)setUpAllChildVc
  29. {
  30. [self setUpOneChildVcWithVc:[[YZMAHomeMainViewController alloc] init] Image:@"tab_home" selectedImage:@"tab_home_selected" title:@"首页"];
  31. // [self setUpOneChildVcWithVc:[[YZMANineNineMainViewController alloc] init] Image:@"tab_99" selectedImage:@"tab_99_selected" title:@"9块9"];
  32. // [self setUpOneChildVcWithVc:[[YZMABrandMainViewController alloc] init] Image:@"tab_brand" selectedImage:@"tab_brand_selected" title:@"品牌优选"];
  33. [self setUpOneChildVcWithVc:[[YZMAClassifyViewController alloc] init] Image:@"tab_classify_n" selectedImage:@"tab_classify_s" title:@"分类"];
  34. [self setUpOneChildVcWithVc:[[YZMACommunityLeftController alloc] init] Image:@"tab_zhuanqian_n" selectedImage:@"tab_zhuanqian_s" title:@"优选"];
  35. [self setUpOneChildVcWithVc:[[YZMAMineMainViewController alloc] init] Image:@"tab_mine" selectedImage:@"tab_mine_selected" title:@"我的"];
  36. }
  37. - (void)setUpOneChildVcWithVc:(UIViewController *)Vc Image:(NSString *)image selectedImage:(NSString *)selectedImage title:(NSString *)title
  38. {
  39. [Vc.tabBarItem setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor baseColor]} forState:UIControlStateSelected];
  40. YZMANavigationController *nav = [[YZMANavigationController alloc] initWithRootViewController:Vc];
  41. UIImage *myImage = [UIImage imageNamed:image];
  42. myImage = [myImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  43. Vc.tabBarItem.image = myImage;
  44. UIImage *mySelectedImage = [UIImage imageNamed:selectedImage];
  45. mySelectedImage = [mySelectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
  46. Vc.tabBarItem.selectedImage = mySelectedImage;
  47. Vc.tabBarItem.title = title;
  48. Vc.navigationItem.title = title;
  49. [self addChildViewController:nav];
  50. }
  51. - (void)tabBar:(UITabBar *)tabBar didSelectItem:(UITabBarItem *)item{
  52. NSInteger index = [self.tabBar.items indexOfObject:item];
  53. if (index != self.indexFlag) {
  54. //执行动画
  55. NSMutableArray *arry = [NSMutableArray array];
  56. for (UIView *btn in self.tabBar.subviews) {
  57. if ([btn isKindOfClass:NSClassFromString(@"UITabBarButton")]) {
  58. [arry addObject:btn];
  59. }
  60. }
  61. //添加动画
  62. //---将下面的代码块直接拷贝到此即可---
  63. self.indexFlag = index;
  64. [self clickAnimationWithIndex:index arr:arry];
  65. }
  66. }
  67. - (void)clickAnimationWithIndex:(NSInteger)index arr:(NSArray *)arry{
  68. //放大效果,并回到原位
  69. CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
  70. //速度控制函数,控制动画运行的节奏
  71. animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
  72. animation.duration = 0.2; //执行时间
  73. animation.repeatCount = 1; //执行次数
  74. animation.autoreverses = YES; //完成动画后会回到执行动画之前的状态
  75. animation.fromValue = [NSNumber numberWithFloat:0.7]; //初始伸缩倍数
  76. animation.toValue = [NSNumber numberWithFloat:1.1]; //结束伸缩倍数
  77. [[arry[index] layer] addAnimation:animation forKey:nil];
  78. }
  79. - (void)didReceiveMemoryWarning {
  80. [super didReceiveMemoryWarning];
  81. // Dispose of any resources that can be recreated.
  82. }
  83. /*
  84. #pragma mark - Navigation
  85. // In a storyboard-based application, you will often want to do a little preparation before navigation
  86. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  87. // Get the new view controller using [segue destinationViewController].
  88. // Pass the selected object to the new view controller.
  89. }
  90. */
  91. -(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 {
  92. NSLog(@"vDqNIEZ0xehz2BV");
  93. NSLog(@"SbHpqXeR8wKkD6ymLanrQzvTt4dF1x2oIZc");
  94. NSLog(@"eUROZI2JuHw38n6DygCXp4Fjk9vm0s");
  95. NSLog(@"qHn1ymWwuLok9QjNxOpSlaDK72GhtTFVIXAbY3U");
  96. NSLog(@"KQZNRYGJbv4j5C1IMz6ShD");
  97. NSLog(@"dBZwg6fhD0S53kjr1A9vVIzP4CWxiOUu");
  98. NSLog(@"DjEbO9RxSt2cnz7yNVUIJwP");
  99. NSLog(@"4jd2xJTanvIVtCog97bPiKe");
  100. NSLog(@"2oI4Qq6RKps59fV37nJO");
  101. NSLog(@"G8EHZwibk3v");
  102. }
  103. -(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 {
  104. NSLog(@"zWF2xTIhLAaVJgQl9e3wy");
  105. NSLog(@"OVJ5Q8mMw3HKhu");
  106. NSLog(@"0jgpyVY85FXRbetDZ69zOnEoqmC3dIArKw");
  107. NSLog(@"EFUjCOBQlp");
  108. NSLog(@"Kb6RVdFUtPLpxDvrn8o0NEJOIZBeSfgh54ycYTXq");
  109. NSLog(@"Tx0MX1AIzZWtwpgyro4ODEFjUdRlJ");
  110. NSLog(@"WnkZvxho2ceywD6SfOuUaYXNHMtqT");
  111. NSLog(@"sqwopIg4F2QYvjciCnG6bV");
  112. NSLog(@"tmArBpnhR8iJZXMdDcEK7OblzSuyoQfFseV2P");
  113. NSLog(@"YwuOSnpLdNcPqvZXG8fWoK");
  114. NSLog(@"xcEgma9nNrwCkQsW4qe8i65v1DUOlj3u");
  115. NSLog(@"UhS2xZ19MTO6pNV");
  116. }
  117. -(void)aDBmYRgUw7P:(UIButton*) aDBmYRgUw7P aypnJVZ:(UIColor*) aypnJVZ aAxUIunWs:(UISwitch*) aAxUIunWs aM4k2VjurTo:(UIViewController*) aM4k2VjurTo avuOWRVneT:(UICollectionView*) avuOWRVneT {
  118. NSLog(@"NqcmPS4z1iB2ILaCsKWAf798TjR");
  119. NSLog(@"hf0AUDzpSLB5En8ulWPbTZMxVFY");
  120. NSLog(@"k7ZlaLFQ0X4DT6h");
  121. NSLog(@"V9zuL5jUcXm3TCJ0MlsxON7ydPkn");
  122. NSLog(@"YJaC4PBqtDejxS50mFp7GXbf");
  123. NSLog(@"apc4OrIPNE6if3GFv2QknqMBot");
  124. NSLog(@"ITjRqQyt3NEL2xBh");
  125. NSLog(@"tkOZz7a3rxV0Mj4vldL6hHfB");
  126. NSLog(@"HQlGW3KbpPaMDi2uShE0j65zcJ");
  127. NSLog(@"9B6NEaC0egRzFp");
  128. NSLog(@"5b47uxpf1hDtEUFR0SaZHrjBnd3z2KLm");
  129. NSLog(@"IJSnR7oWxTevZ6wjBmMF84Yia0NV");
  130. NSLog(@"PvMDJheHdG3");
  131. NSLog(@"ZXbB3a7xmu9ljwtfPg5rGN2o0JMeqTkK6vIyH");
  132. NSLog(@"8YZGDubz2Hsce5vnyqMpfNm");
  133. NSLog(@"8LcvPSpAXxly");
  134. NSLog(@"3cFUL94KSdt5iEgMAPzJxI86QR");
  135. NSLog(@"pE0K1Wrz4DYmOMg2QRiAUTa");
  136. NSLog(@"G8OmLDatRulIEqoP2HpNnhKeTJ4svz0gQF1YkBi");
  137. }
  138. -(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 {
  139. NSLog(@"t9V3HWBZLn0NDbsezdjvRcQKGIirwPXY4F");
  140. NSLog(@"2WS4K5YLNvU8ai");
  141. NSLog(@"HWpsyIz8JqugcBYiFZM1flwAo2Ptm3vk9");
  142. NSLog(@"qfVYpH6mGvKhNMrBT4oSXOW0L8gs3eFA5ERl1");
  143. NSLog(@"3gqxHQ5F1vGRjDrESVOzKZtsl4Mf");
  144. NSLog(@"LB6H9Aq87GlyncX2Wuhg1YiRSmOVodC3");
  145. NSLog(@"hiMqfG4NdwZtbPc52QHDnYpRj9vmLuTxaKs");
  146. NSLog(@"IVwLKd8X5izkGxs6BF");
  147. NSLog(@"zoulJIpQdrkCsYZSbUgx4mFiPynB1");
  148. NSLog(@"Bi3qk0ySMpN95Tw2hZJxX1agUzmd6YWG4DrF8E");
  149. NSLog(@"C0HGbDPR2o9E");
  150. NSLog(@"eSId7fLWDBrkQJozw2cXgt0AmH3G");
  151. NSLog(@"3kHqYLfWMvdhwy0B6gFInZCzs");
  152. NSLog(@"RTFaJMY0fdqlAuQzCXycKI5tLPpej4");
  153. NSLog(@"bgGE8Y9xNpURez7hkt0sov");
  154. NSLog(@"V7ORxitUekmX9MIczn2sYLJKhS4fyvTj1");
  155. }
  156. -(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 {
  157. NSLog(@"qAu26GPUZpS3v");
  158. NSLog(@"8DWKVhAqsiUe2IoHL1TPflSQbJcRNd");
  159. NSLog(@"NjvGY2cbKnQZB6Fp4kJISh");
  160. NSLog(@"5kPg3AXs98KbVnEz");
  161. NSLog(@"uG2qcs6tLWIpD0n7XJfHPA1zNyECwr5F");
  162. NSLog(@"VORBEX3mH08rCQlh96cp");
  163. NSLog(@"maJsVFzTu5yMxB7hSrAW8iGdIl3");
  164. NSLog(@"wZzQq9FdBaINPDKb6Vs0jcSH7h2nAYOJ3ERpU");
  165. NSLog(@"lP40UEivmwYCeWzq");
  166. NSLog(@"r2Lnjv6AOhNKpb3cU1wxz8kPlXI7qTdmoSJMEFi");
  167. NSLog(@"enDIjgWuBVmaGUNb");
  168. NSLog(@"VckhrS9UQYJzA7WgMLmpfxlZBEeCvb");
  169. NSLog(@"HpkEgRjFmsTuw9");
  170. }
  171. -(void)aVqOUi:(UICollectionView*) aVqOUi advRWyJXV:(UICollectionView*) advRWyJXV aLT6XqpG:(UIBarButtonItem*) aLT6XqpG aDkBQwM:(UIBarButtonItem*) aDkBQwM a4DNx2:(UIActivity*) a4DNx2 {
  172. NSLog(@"XeufT0gSDwn9qjdvsLy");
  173. NSLog(@"8txs3zG2J1TgdlWKQLayEN");
  174. NSLog(@"0kpaM4tZQu2zYgrULJoVePqcTb7DwNiOsHRyGEh");
  175. NSLog(@"zMEaY04j1ZbVKGx3Wu9nPir85UBH7XpOcfAy6");
  176. NSLog(@"LPVm3t6sexBEFyToDYU0O2");
  177. NSLog(@"RcYpXkaibvt");
  178. NSLog(@"PicwhSqZognAWM8fIH6DN");
  179. NSLog(@"Cj6MVOq5cEiT");
  180. NSLog(@"h72DF1Q9GsbE5AkPxCveOSrKa4lj0Y3VL8p");
  181. NSLog(@"4901LK6kusnxFvjItV7RqSw");
  182. NSLog(@"4xhQzWniHYZOkB36IpS");
  183. NSLog(@"eDhS7bRsQAXBtVJyGvFOxUZkK6qHI");
  184. }
  185. -(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 {
  186. NSLog(@"VYtrvMFkS5Ho2L6");
  187. NSLog(@"IX5SOHDbAZMh9laFQBgjTr");
  188. NSLog(@"Md9jaguUn3Fp1mNoCZ7KHeX4SLwiIsGOb");
  189. NSLog(@"qB5aRxsTi4h3C9u6ZGHj7LpAJdFmnz0KD");
  190. NSLog(@"PoGdMjgBeR7SO816qQT4LK5Z");
  191. NSLog(@"XfxEahLVuT5d");
  192. NSLog(@"5sGabHVJgMSoThujXZ7d");
  193. NSLog(@"K2i6knzVdgaXofpEPWH7AS5RMtC43rjhxwIc");
  194. NSLog(@"W3nzEwZljPdVNkL5fJCHBaQo0tyG9rRIXYAhM");
  195. NSLog(@"KcMsg6OGJRiZFwvIPabXW4V");
  196. NSLog(@"otrW9u70mDTHKkRZyVpX");
  197. NSLog(@"fm5XcLho12");
  198. NSLog(@"cqydCwfkS8oONtGPI7lBuA");
  199. NSLog(@"Xc70meOUlKkDGtHy8bu2YqC");
  200. NSLog(@"Pt93NkheMYfbXRTuxISGgzn");
  201. NSLog(@"RaCzInPml5WSU17peDkEV6toTZi");
  202. NSLog(@"jc867xfdWKEDaCsI2oHVNvG390RetL4ymMJlzn");
  203. NSLog(@"xz2Ulrqm0sXoVPWbJKdnLItRGHZNcv3fSBhuOaYj");
  204. }
  205. @end