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

UICollectionView+MJRefreshAutoManger.m 5.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. //
  2. // UICollectionView+MJRefreshAutoManger.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/5/17.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "UICollectionView+MJRefreshAutoManger.h"
  9. #define NO_MORE_DATA_TEXT @"无更多数据了"
  10. @implementation UICollectionView (MJRefreshAutoManger)
  11. static char stateKey;
  12. - (void)setFootRefreshState:(MJFooterRefreshState)footRefreshState {
  13. UIWindow *window = [UIApplication sharedApplication].keyWindow;
  14. [RACObserve(self.mj_footer, frame)subscribeNext:^(id x) { //这里的意思是监视mj_footer的frame变化,可以使用kvo代替RACObserve
  15. CGPoint point = [self convertPoint:self.mj_footer.frame.origin toView:window];
  16. if (point.y < window.frame.size.height) {
  17. [(MJRefreshAutoNormalFooter *)self.mj_footer setTitle:@"" forState:MJRefreshStateIdle];
  18. }else {
  19. [(MJRefreshAutoNormalFooter *)self.mj_footer setTitle:@"点击或上拉加载更多" forState:MJRefreshStateIdle];
  20. [(MJRefreshAutoNormalFooter *)self.mj_footer resetNoMoreData];
  21. }
  22. }];
  23. [self handleFooterRefresh:footRefreshState];
  24. NSString *value = [NSString stringWithFormat:@"%ld", (long)footRefreshState];
  25. objc_setAssociatedObject(self, &stateKey, value, OBJC_ASSOCIATION_COPY_NONATOMIC);
  26. }
  27. - (MJFooterRefreshState)footRefreshState {
  28. NSString *refreshState = objc_getAssociatedObject(self, &stateKey);
  29. if ([refreshState isEqualToString:@"MJFooterRefreshStateLoadMore"]) {
  30. return MJFooterRefreshStateNoMore;
  31. }
  32. else {
  33. return MJFooterRefreshStateLoadMore;
  34. }
  35. }
  36. - (void)handleFooterRefresh: (MJFooterRefreshState)footRefreshState {
  37. MJRefreshAutoNormalFooter *footer = (MJRefreshAutoNormalFooter*)self.mj_footer;
  38. switch (footRefreshState) {
  39. case MJFooterRefreshStateNormal:
  40. {
  41. [footer setTitle:@"" forState:MJRefreshStateIdle];
  42. break;
  43. }
  44. case MJFooterRefreshStateLoadMore:
  45. {
  46. [self.mj_footer endRefreshing];
  47. break;
  48. }
  49. case MJFooterRefreshStateNoMore:
  50. {
  51. [footer setTitle:NO_MORE_DATA_TEXT forState:MJRefreshStateNoMoreData];
  52. [self.mj_footer endRefreshingWithNoMoreData];
  53. break;
  54. }
  55. default:
  56. break;
  57. }
  58. }
  59. -(void)apGagl:(UIFontWeight*) apGagl aPQhct:(UIScreen*) aPQhct a6MOeQlSu:(UIAlertView*) a6MOeQlSu aAiD6loMj0:(UIBarButtonItem*) aAiD6loMj0 aqGAh:(UIDevice*) aqGAh am67Yu:(UIWindow*) am67Yu aivfzKwr:(UIFontWeight*) aivfzKwr abu4PpRIQ:(UIUserInterfaceIdiom*) abu4PpRIQ amjqvt:(UIEdgeInsets*) amjqvt arZlPa:(UILabel*) arZlPa {
  60. NSLog(@"1OG2CUtEcqLZeg0");
  61. NSLog(@"NOZKCIwkoB2MqTbvAGt");
  62. NSLog(@"5hMnl6x34wid9DjcVOaXUYKkf0RG7ySvNBbsE");
  63. NSLog(@"YsVFOz4PoRK0");
  64. NSLog(@"uvzi98y6BRgs4Lb7XIOWYKjCQfh0mSJtnrcAlGwD");
  65. NSLog(@"y4eFPKhOD1QlupgYoajidN06tk2ZGr9zxwE8I");
  66. NSLog(@"BH1LvJinFwrmk2q");
  67. NSLog(@"oRT5vmkWJOfsrlBI4ELa");
  68. NSLog(@"5zY8vhN3nuo6pBVJEZRtxqKQUjbkm");
  69. NSLog(@"s0yzbYLgrwKfUV6px");
  70. }
  71. -(void)aY9xp0Cs:(UIBarButtonItem*) aY9xp0Cs a89xNft15P:(UISwitch*) a89xNft15P ajDqEMxXpf:(UIButton*) ajDqEMxXpf aT69qAYXpVa:(UIInputView*) aT69qAYXpVa aOFn2:(UIColor*) aOFn2 aVvRh0XBJ:(UIFont*) aVvRh0XBJ aGHKMgCbZ:(UIInputView*) aGHKMgCbZ aQ9uoFVYTr:(UITableView*) aQ9uoFVYTr a9uIbJwVtX:(UILabel*) a9uIbJwVtX {
  72. NSLog(@"yNPg3TYIMhWlAVjwFQkKme9a50");
  73. NSLog(@"0MvuDmCVXT");
  74. NSLog(@"M4oqtG60c8hIWkQ7CKfsyaYuVn");
  75. NSLog(@"08GLeoUFuIMYsEidrfbacXyl3HnSwq4ZWD");
  76. NSLog(@"Ly5pNsQuY1HBlwGIhR");
  77. NSLog(@"e1KrADua2Q4s8VwOUM3fzFvt5");
  78. NSLog(@"KjdPpaZDtE3RJnuO4r5gqNX");
  79. NSLog(@"08xjKMXBGzaJygReUOwP1nWs36FN7ctYVAb");
  80. NSLog(@"7Q0H1ODag8PTrnYftiMexJ6XZhAm3uER2");
  81. NSLog(@"Ngae0R92XP4QhCAyKxYrFHJzU3kDqv");
  82. NSLog(@"KEnybNBOJrV7hadP8YxS14X5iupGL3");
  83. NSLog(@"cobwRUQxu6Z1Pp3LhGWi0tKfjDOl5amXCFns");
  84. NSLog(@"oHjQnEF8OSGlCRZyvifkrYtsJ0KAI");
  85. NSLog(@"e3UYMGoczadEDn7m4k9igvxr");
  86. NSLog(@"RgusOcLSltIDk9hd14qaAZ3P87YFNJjyUQME");
  87. NSLog(@"KhmzUYdMq3GyRrBi6J8FsHwCVn9tIx7DZPufLg5e");
  88. }
  89. -(void)aAc6ydUwZ:(UIEdgeInsets*) aAc6ydUwZ aNEXRYU6DM:(UIBezierPath*) aNEXRYU6DM auXz4ZeBQp:(UIFont*) auXz4ZeBQp aNVZcr:(UIWindow*) aNVZcr axYnGJb93D:(UIWindow*) axYnGJb93D aOz4Hk:(UILabel*) aOz4Hk aQFkqiePgsW:(UIImageView*) aQFkqiePgsW ayCLZp:(UIAlertView*) ayCLZp aTDIohaKYSb:(UIBarButtonItem*) aTDIohaKYSb aghlTz:(UIMotionEffect*) aghlTz anse4dyqcx:(UIBarButtonItem*) anse4dyqcx avZuyiz6:(UIUserInterfaceIdiom*) avZuyiz6 {
  90. NSLog(@"JPWTuAXKfG3M2");
  91. NSLog(@"9apGQfDk2LEoBKRdwiAgOP15MtY6SXFcz0");
  92. NSLog(@"4gpOs8JzWCTaSbLeG7uYHd6yUmiI39vxtKX5rPl");
  93. NSLog(@"7ej6GKLEUyZpOlT0Wg4Rd");
  94. NSLog(@"AfEhGycq1oDvZI7pJm");
  95. NSLog(@"a5AwIQe3CyV4ksRu");
  96. NSLog(@"F4kzyZ3VrUaspwgqeY6oJIPHA7LlM8EKxic");
  97. NSLog(@"ZI62tWgsh39pxJjUDcGnYEiFdPXfB7e");
  98. NSLog(@"UOAHdQ95gp8YkEw6qomG");
  99. NSLog(@"tBNcnqQaiMIkbeP1mCrX9zYdJ0SALHKT");
  100. NSLog(@"ULF5h3g4270YQiHKba");
  101. NSLog(@"TCtBRO6HKnkJD0EFo28zsguGLNjhYS7eXxZ4y3");
  102. NSLog(@"m8KW5foHERs4cnb1Bv0LMTUZxN");
  103. NSLog(@"psL9cH6QOMn4RlZ81XtSuA2");
  104. }
  105. -(void)ajs5Wof7A:(UIActivity*) ajs5Wof7A aqbd13:(UIBarButtonItem*) aqbd13 aReTFp1XCmc:(UIEdgeInsets*) aReTFp1XCmc amh5ge:(UIBarButtonItem*) amh5ge ahFgQ:(UIMotionEffect*) ahFgQ aYiNS:(UIMotionEffect*) aYiNS aXxn9:(UIMenuItem*) aXxn9 aA7YK8:(UISwitch*) aA7YK8 an2JaWg:(UIEvent*) an2JaWg aN4PXKR:(UIFontWeight*) aN4PXKR {
  106. NSLog(@"f0gY7SCd2X4J");
  107. NSLog(@"YZyrp8kcKI0HOjQituMxBhl1F7wWgdGRVe62sAEJ");
  108. NSLog(@"ljNmrBREsKqzyDQpoxfJbYaw3cdHUGV5W");
  109. NSLog(@"M7PUreiOtET8cIDb9YB3Wlvf");
  110. NSLog(@"TtzIkp3AXouJPaUCf0jHd7Y6mEKsx1iyFGr5lnBe");
  111. NSLog(@"TqAQxmNCMBEV2Ltwg4pbX9roJifsODYc8");
  112. NSLog(@"NQL0owVtdfCc1zS4giErGU69");
  113. NSLog(@"fr5KUMP6kC");
  114. NSLog(@"gRkXwdb0f8qjuvzJ2hmSA");
  115. NSLog(@"ST1opyRhxJkAwa0nN5ZvfU29mClXbFEdiL");
  116. NSLog(@"1f4wzVFgG9dKZcs8MPivHA2Q");
  117. NSLog(@"13ZKHJvOeDF76xgiz5WMUTfRGL0juhCrb");
  118. NSLog(@"O6Qw7GspKa");
  119. NSLog(@"IEqKL8FHNQaJOtymACrwZgPG6xSDif0j3oUBYM4");
  120. }
  121. @end