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

YZMACommissionMainViewController.m 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. //
  2. // YZMACommissionMainViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/5/18.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "YZMACommissionMainViewController.h"
  9. #import "MLMSegmentHead.h"
  10. #import "MLMSegmentManager.h"
  11. #import "YZMAOrderTableView.h"
  12. #import "YZMAChildCommissionController.h"
  13. #import "YZMACommissionHeaderView.h"
  14. #import "YZMAChildCommissionController.h"
  15. @interface YZMACommissionMainViewController ()
  16. <
  17. UITableViewDelegate,
  18. UITableViewDataSource
  19. >
  20. @property (nonatomic, strong) YZMAOrderTableView *tableView;
  21. @property (nonatomic, strong) YZMACommissionHeaderView *headerView;
  22. @property (nonatomic, strong) MLMSegmentHead *titleView;
  23. @property (nonatomic, strong) MLMSegmentScroll *segScroll;
  24. @property (nonatomic, strong) NSMutableArray *vcList;
  25. @property (nonatomic, assign) BOOL canScroll;
  26. @end
  27. @implementation YZMACommissionMainViewController
  28. - (void)viewDidLoad {
  29. [super viewDidLoad];
  30. [self configNavigationBar];
  31. // [self configTableView];
  32. [self creatHeaderViewAndFooterView];
  33. }
  34. -(void)viewWillAppear:(BOOL)animated{
  35. [super viewWillAppear:animated];
  36. [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
  37. }
  38. - (void)configTableView {
  39. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeScrollStatus) name:@"leaveTop" object:nil];
  40. self.canScroll = YES;
  41. self.headerView = [[YZMACommissionHeaderView alloc] initWithFrame:CGRectMake(0, 0,SCREEN_WIDTH , 135)];
  42. self.tableView.tableHeaderView = self.headerView;
  43. [self.view addSubview:self.tableView];
  44. }
  45. - (void)configNavigationBar {
  46. [self.navigationBar setNavTitle:@"订单明细"];
  47. self.navigationBar.backgroundColor = [UIColor changeColor];
  48. self.navigationBar.navTitleLabel.textColor = [UIColor whiteColor];
  49. UIButton *leftBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
  50. [leftBtn setImage:[UIImage imageNamed:@"back_white"] forState:UIControlStateNormal];
  51. [leftBtn addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
  52. [self.navigationBar setCustomLeftButtons:@[leftBtn]];
  53. }
  54. - (void)backAction {
  55. [self.navigationController popViewControllerAnimated:YES];
  56. }
  57. - (void)creatHeaderViewAndFooterView {
  58. self.view.backgroundColor = [UIColor whiteColor];
  59. NSArray *titleArr = @[@"全部",@"已付款",@"已结算",@"已失效"];
  60. for (int i = 0; i < titleArr.count; i++) {
  61. YZMAChildCommissionController *child = [[YZMAChildCommissionController alloc] init];
  62. switch (i) {
  63. case 0:
  64. {
  65. child.type=4;
  66. }
  67. break;
  68. case 1:
  69. {
  70. child.type=1;
  71. }
  72. break;
  73. case 2:
  74. {
  75. child.type=2;
  76. }
  77. break;
  78. case 3:
  79. {
  80. child.type=0;
  81. }
  82. break;
  83. default:
  84. break;
  85. }
  86. [self.vcList addObject:child];
  87. }
  88. self.segScroll = [[MLMSegmentScroll alloc] initWithFrame:CGRectMake(0, NavBarHeight+40, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight-40) vcOrViews:self.vcList];
  89. self.segScroll.bounces = NO;
  90. self.titleView = [[MLMSegmentHead alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, 40) titles:titleArr headStyle:SegmentHeadStyleDefault layoutStyle:MLMSegmentLayoutDefault];
  91. self.titleView.headColor = [UIColor whiteColor];
  92. self.titleView.bottomLineHeight = 1;
  93. self.titleView.bottomLineColor = [UIColor yhGrayColor];
  94. self.titleView.fontScale = 1;
  95. self.titleView.fontSize = 14;
  96. self.titleView.equalSize = YES;
  97. self.titleView.showIndex = 0;
  98. self.titleView.selectColor = [UIColor YHColorWithHex:0xff442a];
  99. self.titleView.deSelectColor = [UIColor YHColorWithHex:0x666666];
  100. [MLMSegmentManager associateHead:self.titleView withScroll:self.segScroll completion:^{
  101. [self.view addSubview:self.titleView];
  102. [self.view addSubview:self.segScroll];
  103. }];
  104. }
  105. #pragma mark ----- nofi -----
  106. - (void)changeScrollStatus {
  107. self.canScroll = YES;
  108. for (YZMAChildCommissionController *childVc in self.vcList) {
  109. childVc.childCanScroll = NO;
  110. }
  111. }
  112. #pragma mark --------------------- UITableView delegate -------
  113. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  114. return 1;
  115. }
  116. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  117. return 1;
  118. }
  119. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  120. return 0.1;
  121. }
  122. - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
  123. return 40;
  124. }
  125. - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
  126. return SCREEN_HEIGHT-NavBarHeight-40;
  127. }
  128. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  129. UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cellID"];
  130. return cell;
  131. }
  132. - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  133. return self.titleView;
  134. }
  135. - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
  136. return self.segScroll;
  137. }
  138. #pragma mark ----- scroll delegete ----
  139. //
  140. //- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
  141. // CGFloat bottomCellOffset = [_tableView rectForSection:0].origin.y;
  142. // if (scrollView.contentOffset.y >= bottomCellOffset) {
  143. // scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
  144. // if (self.canScroll) {
  145. // self.canScroll = NO;
  146. // [self setChildViewControllerCanScroll:YES];
  147. // }
  148. // }else{
  149. // if (!self.canScroll) {//子视图没到顶部
  150. // scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
  151. // }
  152. // }
  153. //}
  154. - (void)setChildViewControllerCanScroll:(BOOL)childCanScroll {
  155. for (YZMAChildCommissionController *childVc in self.vcList) {
  156. childVc.childCanScroll = childCanScroll;
  157. if (!childCanScroll) {
  158. childVc.tableView.contentOffset = CGPointZero;
  159. }
  160. }
  161. }
  162. #pragma mark ----------------
  163. - (YZMAOrderTableView *)tableView {
  164. if (!_tableView) {
  165. _tableView = [[YZMAOrderTableView alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight) style:UITableViewStylePlain];
  166. _tableView.estimatedSectionHeaderHeight = 0;
  167. _tableView.estimatedSectionFooterHeight = 0;
  168. _tableView.sectionFooterHeight = 0;
  169. _tableView.sectionHeaderHeight = 0;
  170. _tableView.delegate = self;
  171. _tableView.dataSource = self;
  172. _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
  173. _tableView.backgroundColor = [UIColor yhGrayColor];
  174. _tableView.bounces = YES;
  175. _tableView.showsVerticalScrollIndicator = NO;
  176. [_tableView setSeparatorColor:[UIColor YHColorWithHex:0xdddddd]];
  177. }
  178. return _tableView;
  179. }
  180. - (NSMutableArray *)vcList {
  181. if (!_vcList) {
  182. _vcList = [NSMutableArray array];
  183. }
  184. return _vcList;
  185. }
  186. - (void)didReceiveMemoryWarning {
  187. [super didReceiveMemoryWarning];
  188. // Dispose of any resources that can be recreated.
  189. }
  190. /*
  191. #pragma mark - Navigation
  192. // In a storyboard-based application, you will often want to do a little preparation before navigation
  193. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  194. // Get the new view controller using [segue destinationViewController].
  195. // Pass the selected object to the new view controller.
  196. }
  197. */
  198. -(void)aILPkFc4js:(UIImage*) aILPkFc4js aHcSA3Paw:(UIImageView*) aHcSA3Paw alAub24Vk:(UIUserInterfaceIdiom*) alAub24Vk aNi0Aw:(UIVisualEffectView*) aNi0Aw amzwVEZBnkD:(UIImageView*) amzwVEZBnkD aCrh1X:(UIColor*) aCrh1X axc9XYGTWIL:(UITableView*) axc9XYGTWIL a86pwcR0:(UIDocument*) a86pwcR0 afDbOhG8RI6:(UIInputView*) afDbOhG8RI6 aUXT5:(UIImage*) aUXT5 {
  199. NSLog(@"7Z6NmhDgJ3nGYa5w8HQULCfpqTedARW");
  200. NSLog(@"6BjH14wz2dqEx");
  201. NSLog(@"pRwoXdjnBz5QLEM7YN9gVkITvW0e4");
  202. NSLog(@"2Jousikjpb4EahLg3WcxrV5YzeUvO97mTNndqRfH");
  203. NSLog(@"pZeUR0KwAbFiIOE3G8XYqkTfc");
  204. NSLog(@"aFsD52jLCTEbPelZuHtpnX");
  205. NSLog(@"W6RjO0hNzHBSeFkPfVpmT45Iyx");
  206. NSLog(@"wHyh9g2xdMkzrZY03eKbFSqNGDVom6pIBjPiv");
  207. NSLog(@"CBpYwHzMSIoD4G");
  208. NSLog(@"a5dTIn7bckWNlxHzArSse2Lo4PpOUf3VGtD1Z");
  209. NSLog(@"6t2VJRrIvl39KEwSUTNM");
  210. NSLog(@"eah4SH9R5CFWoLxp8cNGfzuKXZv2mVbBQgyAwt7P");
  211. NSLog(@"relqygCcXR6bLItvBMjUGmoDK5adzS");
  212. NSLog(@"3ULnTvpyS9jP4sfiOcVgtKb7om0");
  213. NSLog(@"BjbYnEl0W7q5IO4vNxmRh1CP");
  214. NSLog(@"5hQNgqKJBbI3wfsPMtZ2Gz1opC0aVAckEd");
  215. NSLog(@"CogXUeNLHuBa2mbld");
  216. NSLog(@"CtP7Fusy6v5mYdfJ2pjBZVGKXEkODn");
  217. NSLog(@"jkK9sSM5YV60ExwAhgTBmly2nUpHWDePzvXL");
  218. NSLog(@"4BjlMz7CpU");
  219. }
  220. -(void)apveoBMqU:(UITableView*) apveoBMqU aujKi:(UIColor*) aujKi aFEdRi3ZkwY:(UIMenuItem*) aFEdRi3ZkwY aAwhp0gS:(UISwitch*) aAwhp0gS aWeoZ:(UIColor*) aWeoZ aUl7Zd1Q:(UISwitch*) aUl7Zd1Q aZsKX4ocwI:(UIView*) aZsKX4ocwI {
  221. NSLog(@"NfOJM1tqP4rvVHugDazw6lZU7XnIQm");
  222. NSLog(@"0BXa3q4uYjKA1oZMc7mWVrvNzteGxTLUk2OEHIRF");
  223. NSLog(@"8T1fzypXsdlUobjJ2cLHMKh9I60V57Dq3W");
  224. NSLog(@"wkmqFcNsO1ZxRVtdg");
  225. NSLog(@"I5REFvBSf27Qiz");
  226. NSLog(@"dZGous4yIV98");
  227. NSLog(@"Rtw4qeuK2mnfg");
  228. NSLog(@"NoxkPUd6Yt7RB1HIQg4lKZbWDGh");
  229. NSLog(@"StuOp9YGeZj57Rf1HmiJWFoXPhDE60C3yg");
  230. NSLog(@"P5XRoByU8VO3n7zWHE4JaZdtqcYT6gjveASQwCx");
  231. NSLog(@"D7lAI0QbiyV9N4STMC8g31sBXE2knvKu5a");
  232. NSLog(@"2GJfEr4vPLQ361xyWCO");
  233. NSLog(@"Z5bE1nR3ekKHW2r9OacMuoyJfS7A");
  234. NSLog(@"cf7WTG3UInzybXDNqhRegoaMFrjYl5ZQKs6JBL");
  235. NSLog(@"g6EYcR3CdT");
  236. NSLog(@"dnGKPDcVI4tRWyBpsHeo02jJql89AEQhw3");
  237. NSLog(@"v34FwQ1VGXBA5TKqUxhdWtsZ8YrOmiDCj6Huc");
  238. }
  239. -(void)aPRrx:(UILabel*) aPRrx aAZDRsz17:(UIButton*) aAZDRsz17 aymuG0:(UIVisualEffectView*) aymuG0 aHFE6f:(UIFontWeight*) aHFE6f anWhcK8:(UIBezierPath*) anWhcK8 aAkZyMWRBQ:(UIViewController*) aAkZyMWRBQ aVwE3WP1:(UIVisualEffectView*) aVwE3WP1 adV5E:(UIVisualEffectView*) adV5E axUIaMH6P:(UIWindow*) axUIaMH6P a9chiRQAkZp:(UIImageView*) a9chiRQAkZp aNRosAXwMEh:(UIFontWeight*) aNRosAXwMEh a6bkxz0Lp:(UIInputView*) a6bkxz0Lp auPj4MTF3c:(UISearchBar*) auPj4MTF3c avjyW8w:(UIMenuItem*) avjyW8w a1GtpFhOu:(UIActivity*) a1GtpFhOu ar2uoijmXdg:(UIVisualEffectView*) ar2uoijmXdg a4YwPrt:(UIImage*) a4YwPrt aJaeobB0w:(UIEdgeInsets*) aJaeobB0w aobpXuTSd8:(UIInputView*) aobpXuTSd8 {
  240. NSLog(@"3ExA9P5uTNmQWZlqsJyLvCoKzY2iXS");
  241. NSLog(@"zfkjbOpZ0C");
  242. NSLog(@"vYCEb9gsqBr0oG7IV8UFKRLSd2O1ZM6lJ4cz");
  243. NSLog(@"e8pqv2IVjAPwy5c");
  244. NSLog(@"kmog7TBcNd1ynQjalAwrF0JXuR8PL");
  245. NSLog(@"3ly0M1W7qDEYuf4");
  246. NSLog(@"RfSEasuCB5c7D8v6VIq9Y31tOGrp");
  247. NSLog(@"ehzI4dUjwSDgAmXEr05vlKQ7CHWLb18q6tcJfpi");
  248. NSLog(@"onaEdBCsQcL1AVMJ3HyDWl");
  249. NSLog(@"w0yPTV4E28uaU9JYNFOQ");
  250. NSLog(@"Mm64laezsDVvoCf5xgjcWO7hYPQU2");
  251. NSLog(@"Z35xtsvYOkf6hSCNn");
  252. NSLog(@"Yie3mKZTcogdR27vVAy9DGwJUkt0fW4qhC5QB");
  253. NSLog(@"wtKno0gkLv3q9hQ84VbDEd1YTFGO");
  254. NSLog(@"9rYKa3LlEOzd1mfPjoXFvgViT");
  255. NSLog(@"t5yrCqan13igBUEI");
  256. NSLog(@"TevUDfcHB5sAipMgk1QhwJN");
  257. NSLog(@"y0YumSBVhGCH2jDEWgRUq3");
  258. NSLog(@"JsyKNn3eg6");
  259. }
  260. @end