暂无描述

LFWCollectionViewController.m 10.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. //
  2. // LFWCollectionViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/1/24.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LFWCollectionViewController.h"
  9. #import "LFWTypeButtonHeader.h"
  10. #import "LFWCollectionTicketController.h"
  11. #import "LFWCollectionGoodsController.h"
  12. #import "MLMSegmentHead.h"
  13. #import "MLMSegmentManager.h"
  14. @interface LFWCollectionViewController ()<UIScrollViewDelegate,MLMSegmentHeadDelegate>
  15. @property (nonatomic, strong) UIScrollView *scrollView;
  16. @property (nonatomic, strong) MLMSegmentHead *titleView;
  17. @property (nonatomic, strong) NSArray *childVCArr;
  18. @property (nonatomic, assign) NSInteger currentIndex;
  19. @end
  20. @implementation LFWCollectionViewController
  21. - (void)viewWillAppear:(BOOL)animated {
  22. [super viewWillAppear:animated];
  23. [self.view bringSubviewToFront:self.navigationBar];
  24. }
  25. - (void)viewDidLoad {
  26. [super viewDidLoad];
  27. [self configNavigtionBar];
  28. [self configChildViewController];
  29. }
  30. - (void)configNavigtionBar {
  31. // UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
  32. // [leftBtn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
  33. // [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
  34. // [self.navigationBar setCustomLeftButtons:@[leftBtn]];
  35. self.navigationBar.showNavigationBarBottomLine = YES;
  36. NSArray *list = @[@"收藏的券",@"收藏的商品"];
  37. self.titleView = [[MLMSegmentHead alloc] initWithFrame:CGRectMake(50, NavBarHeight-44, SCREEN_WIDTH-100, 44) titles:list headStyle:SegmentHeadStyleLine layoutStyle:MLMSegmentLayoutCenter];
  38. self.titleView.headColor = [UIColor clearColor];
  39. self.titleView.fontScale = 1;
  40. self.titleView.fontSize = 14;
  41. self.titleView.lineScale = .8;
  42. self.titleView.equalSize = YES;
  43. self.titleView.bottomLineHeight = 0;
  44. self.titleView.lineColor = [UIColor homeRedColor];
  45. self.titleView.delegate = self;
  46. self.titleView.selectColor = [UIColor homeRedColor];
  47. self.titleView.deSelectColor = [UIColor YHColorWithHex:0x666666];
  48. [MLMSegmentManager associateHead:self.titleView withScroll:nil completion:^{
  49. [self.navigationBar addSubview:self.titleView];
  50. self.titleView.centerX = self.navigationBar.centerX;
  51. }];
  52. }
  53. - (void)configChildViewController {
  54. LFWCollectionTicketController *ticket = [[LFWCollectionTicketController alloc] init];
  55. [self.view addSubview:ticket.view];
  56. [self addChildViewController:ticket];
  57. ticket.view.y = NavBarHeight;
  58. LFWCollectionGoodsController *goods = [[LFWCollectionGoodsController alloc] init];
  59. [self.view insertSubview:goods.view belowSubview:ticket.view];
  60. [self addChildViewController:goods];
  61. goods.view.y = NavBarHeight;
  62. self.currentIndex = 0;
  63. self.childVCArr = @[ticket,goods];
  64. }
  65. - (void)backAction {
  66. [self.navigationController popViewControllerAnimated:YES];
  67. }
  68. #pragma mark --------------------- MLMSegmentHeadDelegate ---------
  69. - (void)didSelectedIndex:(NSInteger)index {
  70. [self transitionFromViewController:self.childVCArr[self.currentIndex] toViewController:self.childVCArr[index] duration:0.3 options:UIViewAnimationOptionCurveEaseOut animations:nil completion:^(BOOL finished) {
  71. self.currentIndex = index;
  72. }];
  73. }
  74. #pragma mark ------
  75. - (UIScrollView *)scrollView {
  76. if (!_scrollView) {
  77. _scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight)];
  78. _scrollView.delegate = self;
  79. _scrollView.pagingEnabled = YES;
  80. }
  81. return _scrollView;
  82. }
  83. - (void)didReceiveMemoryWarning {
  84. [super didReceiveMemoryWarning];
  85. // Dispose of any resources that can be recreated.
  86. }
  87. /*
  88. #pragma mark - Navigation
  89. // In a storyboard-based application, you will often want to do a little preparation before navigation
  90. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  91. // Get the new view controller using [segue destinationViewController].
  92. // Pass the selected object to the new view controller.
  93. }
  94. */
  95. -(void)aaG1Dl:(UIControlEvents*) aaG1Dl aJrP0u3U:(UIControlEvents*) aJrP0u3U an5cjw:(UIAlertView*) an5cjw aWJe1:(UIViewController*) aWJe1 ajypI:(UIBarButtonItem*) ajypI aLg7j5QF:(UIWindow*) aLg7j5QF an5Alxwzb6:(UIButton*) an5Alxwzb6 aS4TepCB8ng:(UIAlertView*) aS4TepCB8ng akzHVa:(UIView*) akzHVa aUvngK7:(UIInputView*) aUvngK7 a9A4oFm:(UIView*) a9A4oFm aw7pU0zOr6:(UIAlertView*) aw7pU0zOr6 adaSelORcJ:(UIFont*) adaSelORcJ azGJ0kpObf:(UIFont*) azGJ0kpObf {
  96. NSLog(@"NqmiERkLK5u47jIgOD");
  97. NSLog(@"Vjx75GKNJIErD");
  98. NSLog(@"JlXySL5YfEKM6wp9vikRDGmoOxC1VABZFenqNH38");
  99. NSLog(@"EL8abQS9ZuPiIDfe");
  100. NSLog(@"v7gfC2AR53EiI8xYUeZO");
  101. NSLog(@"sdLpDWqxoT16ImN4AQGljZJE9B5YOzf2FC8ny");
  102. NSLog(@"I7xEwBz2yZ6VeJicMmQno");
  103. NSLog(@"hWaq6C4efZ");
  104. NSLog(@"uzg1IlCYePTWUqs5nvJ89m6Df3yxBXphEAt");
  105. NSLog(@"z7S0VRLjZAra");
  106. NSLog(@"LbG3pwuXBEWs0NKT8kJ1yVRQa76A");
  107. NSLog(@"HnMlPBpAqrWI4eb0o7FXdK9Vfmgza");
  108. NSLog(@"cHgQSUuPy0oh3JzMdTK1nfRFkG28aLD4VAqZtpO");
  109. NSLog(@"6v3OCYGxmKMpNBSf9I5DZRhXzAWnHQ4P7LcreT8s");
  110. NSLog(@"jOTZBmnc3PuW5UYaQr6xASHC2FeRJXKEpyq");
  111. NSLog(@"Vitz9nKqZNoS840x5vL3");
  112. NSLog(@"TzyjFwvOt63HEeoxhD4rnbmMiBpuUJa85W0sqZ");
  113. }
  114. -(void)ai3vUtS:(UIColor*) ai3vUtS atYcbSlU:(UIWindow*) atYcbSlU aSVfFW:(UIFont*) aSVfFW a7C9G84tab:(UIBarButtonItem*) a7C9G84tab aCb17:(UISearchBar*) aCb17 akPRlHu:(UISwitch*) akPRlHu akRI1:(UIActivity*) akRI1 aVtQp4:(UIFontWeight*) aVtQp4 aCgySXhpd:(UIMenuItem*) aCgySXhpd aKeQGHI:(UIAlertView*) aKeQGHI aSF7VYs:(UIApplication*) aSF7VYs aNDgzatI:(UIBezierPath*) aNDgzatI aTgBX:(UIBarButtonItem*) aTgBX a0Vwp26GC:(UIControlEvents*) a0Vwp26GC a1nXlywMJhL:(UIViewController*) a1nXlywMJhL {
  115. NSLog(@"hFAOIsPVUjdq9Yal0ZTi3n4e");
  116. NSLog(@"YOFgQCpEoa");
  117. NSLog(@"QWhA38H5ICcFzYRgyqutMDLldipn7ZEGr0USo");
  118. NSLog(@"BUrQeKyzlSfHYEkoDwmu8CdR");
  119. NSLog(@"Mj7UbsHfmG0O1XFLK8plYq");
  120. NSLog(@"wxQt9N652RZy08zqn");
  121. NSLog(@"AFJ4sPHt0di1WkQ7qvuG");
  122. NSLog(@"qOsojFaVegEbR5If1upiS6Dk");
  123. NSLog(@"l4iwK5qzY2b3");
  124. NSLog(@"y8FLSbkExczlf");
  125. NSLog(@"i0Rf1FhI8HKg9VDu");
  126. NSLog(@"5BqwJtKNaCvdY9S1A");
  127. NSLog(@"X58u1mIOhnboQPe4vC2ZqGAy");
  128. NSLog(@"vwhWuOndH149");
  129. NSLog(@"pqWk9iAEY6LnBrfNxuRbJUtmQlywF08Zs");
  130. NSLog(@"PmQcEk2CbhzXnBJeG16ZaUgAy");
  131. NSLog(@"MPTEv19kXxgf4U");
  132. NSLog(@"7YWcFwqzEV");
  133. NSLog(@"4W6A9JQN8tUoeScEHraYBiVKpFIlugGM0OPsZ");
  134. NSLog(@"wZzF7Kmf46lNBdYuPDAIgWQo");
  135. }
  136. -(void)aqF4bErRNW:(UIVisualEffectView*) aqF4bErRNW abGa4PO:(UISwitch*) abGa4PO adG3LOC1R:(UIDocument*) adG3LOC1R azLIvdte:(UIMotionEffect*) azLIvdte ateYUd3p:(UIKeyCommand*) ateYUd3p aTOnx:(UICollectionView*) aTOnx aTbfP:(UIEvent*) aTbfP aSlDY:(UIImage*) aSlDY aylPF:(UISwitch*) aylPF a8A6PyQjoW:(UIActivity*) a8A6PyQjoW ayeJM:(UIFont*) ayeJM a07CKMul9:(UIInputView*) a07CKMul9 aF4VWN5J:(UIControl*) aF4VWN5J aGvUJrwD:(UIUserInterfaceIdiom*) aGvUJrwD {
  137. NSLog(@"IfxOpDTLl6nQU7iqV4t2");
  138. NSLog(@"mzUa3Y9CPqJSsLp0jfNyoZdVIFb5kHDQtnwG68Ov");
  139. NSLog(@"QJVbdUI4gnwWBqzj6O1vhH8oZxt0E");
  140. NSLog(@"osr7C5lmRGuyW9AYL0Pq3zdgEwvbFt4peN6h82MD");
  141. NSLog(@"tNUBwgPDpz9");
  142. NSLog(@"0eCjfXbQmUk");
  143. NSLog(@"nz7W0pgNxFsYo9H2Ac4VtbUIdwOmGR1DKTM");
  144. NSLog(@"AXT6BneEwR3");
  145. NSLog(@"YJomue7W4NxUkZIwlLCjHrGnTzM9Qi");
  146. NSLog(@"o4jy1lhYUCHPJEtzA79e");
  147. }
  148. -(void)az6Qyk7oXxj:(UIImage*) az6Qyk7oXxj a6DQg:(UIInputView*) a6DQg aev07AacUr4:(UIEdgeInsets*) aev07AacUr4 a9GwSEMRuvg:(UIButton*) a9GwSEMRuvg azuPGWFg:(UISearchBar*) azuPGWFg acG0usXHPF:(UIDevice*) acG0usXHPF aODqWL:(UIFont*) aODqWL aOIoEcyJi:(UIApplication*) aOIoEcyJi auyBz1:(UIMenuItem*) auyBz1 aXu53ai:(UIRegion*) aXu53ai aVqCK:(UIBezierPath*) aVqCK abBof3h:(UIViewController*) abBof3h aOFLua:(UITableView*) aOFLua aRkzVJB:(UIImage*) aRkzVJB a42rZ7XW:(UISwitch*) a42rZ7XW aAy4khZ:(UIMenuItem*) aAy4khZ {
  149. NSLog(@"gJqtldCAsMQm54o0Zz27cbpfYR8GUS3w9Tky");
  150. NSLog(@"wDEjiHTPxSlgnrI6zs30G");
  151. NSLog(@"MhBgG2s7OnyFEIS3ZlutAmNxjWXrCVTa1d8Yc9k");
  152. NSLog(@"2qLGnDxVCQH3yz6Bklhu1Imi");
  153. NSLog(@"kW2mArsdn0zXYg9Lw6CfIBi4oJRqVNOhPTpEK");
  154. NSLog(@"lwHdy28Ngn4fF7hQY0KWbCJqBLaTAvtZP9I");
  155. NSLog(@"EQO0q4v5mWG");
  156. NSLog(@"wxF5s4JjKGIkAQdPy6ro");
  157. NSLog(@"dg6M0aPqbIzHpouVy5w8GrskLcNOXn9imx7Ah1");
  158. NSLog(@"YVlSGh814EgWI");
  159. NSLog(@"ufFqX34zhWRaiC");
  160. NSLog(@"2htsFpcubC6xdKyg8kYXWPnl3m1NQwrBUzf");
  161. }
  162. -(void)a1she:(UICollectionView*) a1she adNMI1g03E:(UIWindow*) adNMI1g03E aGUOM:(UICollectionView*) aGUOM aFVan04e:(UIControlEvents*) aFVan04e agZMy:(UILabel*) agZMy ashJpr9bXkO:(UIFontWeight*) ashJpr9bXkO aTHI0VZMP:(UIWindow*) aTHI0VZMP aqbOadsm2:(UIFont*) aqbOadsm2 a8z9TPSrlNA:(UIDocument*) a8z9TPSrlNA a2IJrB:(UIButton*) a2IJrB aimTs:(UIEvent*) aimTs {
  163. NSLog(@"j86ZzXNWqL");
  164. NSLog(@"bQkmvZAxVN7Mg");
  165. NSLog(@"Wwo9qymPEhpk2N0Y1XgCxZJ");
  166. NSLog(@"o82ACmPU0ILxlh569VWYrf7wc3JKse");
  167. NSLog(@"ECkvNItzWLqgyfD76VcliTRjSnh3w8uYFaBO");
  168. NSLog(@"gtHbYXdmDyK");
  169. NSLog(@"z27BeYQKZNOrAS1Hk");
  170. NSLog(@"Z94kr78czCShFvjKLJg3HG");
  171. NSLog(@"c6jd8utYFGLlesnaoKPTh");
  172. NSLog(@"MJeodXn3xkV7mjbl8pagEDcFSUQ");
  173. NSLog(@"wQuyYKxln4X");
  174. NSLog(@"5Isp6wPU2oO");
  175. NSLog(@"QyGr09devoKiMmaflq52LDnWJz3s8S7FOXuBUCjR");
  176. NSLog(@"wXIYpc5jmB81CrQMVKxFedlnfEURSGt");
  177. NSLog(@"p0cJKbuUqZ7D4");
  178. NSLog(@"GLFC6TgBm2hq7rRj");
  179. NSLog(@"82P0wHLo9nRyYO");
  180. NSLog(@"wRivT7DNUoGfh21W45czJHAaejg6S8QOmqC");
  181. }
  182. -(void)aVPInEwY:(UIButton*) aVPInEwY a9zA2w85KV:(UITableView*) a9zA2w85KV aA5xNfV4:(UIDocument*) aA5xNfV4 aTcNwev8mI:(UIImage*) aTcNwev8mI awkY0dezas:(UIAlertView*) awkY0dezas aMNBtq:(UIRegion*) aMNBtq aKhZ2bJm:(UIFont*) aKhZ2bJm auSh7xX21Z:(UIImage*) auSh7xX21Z aqxGI6K:(UIMotionEffect*) aqxGI6K aIY1d7l6Nm:(UIFontWeight*) aIY1d7l6Nm agwIBrFluUq:(UIControlEvents*) agwIBrFluUq aHcKBqk:(UIBarButtonItem*) aHcKBqk {
  183. NSLog(@"CQMHnuVBwXORv3tx8KAYj2");
  184. NSLog(@"fZSkEJ0B79sRULvahiqTo8wGdKPe5txpzN");
  185. NSLog(@"TPAF2aiuEGp0gZ68NkCxHe5ntI");
  186. NSLog(@"ic5CnDZF3hLJrs7HkKx8z0ljPGQBMI");
  187. NSLog(@"tL0WxpUf2gbeyDo");
  188. NSLog(@"SH7v29ILAXpf");
  189. NSLog(@"z6psnly83NGRQx7hOWo2CDvEe1Z");
  190. NSLog(@"3l0fNAJ7VwjcTXaySqik4shCPYeUWLHD6zonMr");
  191. NSLog(@"fIdNCm04erE2Jyhz8q3c");
  192. NSLog(@"WZuqwEOr51oS7xDH0UbasILc4");
  193. NSLog(@"SMHmavjKcTNPWBY");
  194. NSLog(@"nkPmiDMYXZ8Vd7gl0OLSzp");
  195. NSLog(@"muYGOXtbFsci");
  196. NSLog(@"qRNBiyQxc38u5Mh0YI6OzjJloSFKa4Zw");
  197. NSLog(@"0k7oNqgYDzF9HQ1VntW");
  198. NSLog(@"m1O0G23sCcRi5vPj6wxbLeBMqAWpkuSHIEJXzZ7D");
  199. NSLog(@"AJQj78F5LgPyH34oOalr0zZqiB");
  200. }
  201. @end