两折买改口袋样式

LZMMyFansViewController.m 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. //
  2. // LZMMyFansViewController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/5/19.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LZMMyFansViewController.h"
  9. #import "LZMOrderTableView.h"
  10. #import "MLMSegmentHead.h"
  11. #import "MLMSegmentManager.h"
  12. #import "LZMChildFansViewController.h"
  13. #import "LZMFansHeaderView.h"
  14. #import "LZMShowFansHelpView.h"
  15. #import "CCAlertShowView.h"
  16. #import "LZMPotentialFansViewController.h"
  17. @interface LZMMyFansViewController ()
  18. <
  19. UITableViewDelegate,
  20. UITableViewDataSource,
  21. MLMSegmentScrollDelegate
  22. >
  23. @property (nonatomic, strong) LZMOrderTableView *tableView;
  24. @property (nonatomic, strong) LZMFansHeaderView *headerView;
  25. @property (nonatomic, strong) MLMSegmentHead *titleView;
  26. @property (nonatomic, strong) MLMSegmentScroll *segScroll;
  27. @property (nonatomic, strong) NSMutableArray *vcList;
  28. @property (nonatomic, assign) BOOL canScroll;
  29. @property (nonatomic, strong) UIButton *rightHelpBtn;
  30. @end
  31. @implementation LZMMyFansViewController
  32. - (void)viewDidLoad {
  33. [super viewDidLoad];
  34. [self configNavigationBar];
  35. [self configTableView];
  36. [self creatHeaderViewAndFooterView];
  37. }
  38. - (void)configTableView {
  39. // [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(changeScrollStatus) name:@"leaveTop" object:nil];
  40. // self.canScroll = YES;
  41. // self.headerView = [[LZMFansHeaderView 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. self.rightHelpBtn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 40, 40)];
  54. [self.rightHelpBtn setImage:[UIImage imageNamed:@"helpmonth"] forState:UIControlStateNormal];
  55. [self.rightHelpBtn addTarget:self action:@selector(showHelpAlert) forControlEvents:UIControlEventTouchUpInside];
  56. self.rightHelpBtn.hidden = YES;
  57. [self.navigationBar setCustomRightButtons:@[self.rightHelpBtn]];
  58. }
  59. -(void)viewWillAppear:(BOOL)animated{
  60. [super viewWillAppear:animated];
  61. [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
  62. }
  63. - (void)backAction {
  64. [self.navigationController popViewControllerAnimated:YES];
  65. }
  66. - (void)creatHeaderViewAndFooterView {
  67. self.view.backgroundColor = [UIColor whiteColor];
  68. NSArray *titleArr = @[@"全部好友",@"直属好友",@"推荐好友",@"潜在好友"];
  69. for (int i = 0; i < titleArr.count; i++) {
  70. if (i == 3) {
  71. LZMPotentialFansViewController *child = [[LZMPotentialFansViewController alloc] init];
  72. [self.vcList addObject:child];
  73. }else {
  74. LZMChildFansViewController *child = [[LZMChildFansViewController alloc] init];
  75. child.type=i;
  76. [self.vcList addObject:child];
  77. }
  78. }
  79. self.segScroll = [[MLMSegmentScroll alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, ChildTableViewHeight) vcOrViews:self.vcList];
  80. self.segScroll.bounces = NO;
  81. __weak typeof(self) weskSelf = self;
  82. self.segScroll.showingIndex = ^(NSInteger index) {
  83. weskSelf.rightHelpBtn.hidden = index!=3;
  84. };
  85. self.titleView = [[MLMSegmentHead alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, 40) titles:titleArr headStyle:SegmentHeadStyleDefault layoutStyle:MLMSegmentLayoutDefault];
  86. self.titleView.headColor = [UIColor whiteColor];
  87. self.titleView.bottomLineHeight = 1;
  88. self.titleView.bottomLineColor = [UIColor yhGrayColor];
  89. self.titleView.fontScale = 1;
  90. self.titleView.fontSize = 14;
  91. self.titleView.equalSize = YES;
  92. self.titleView.showIndex = 0;
  93. self.titleView.selectColor = [UIColor YHColorWithHex:0xff442a];
  94. self.titleView.deSelectColor = [UIColor YHColorWithHex:0x666666];
  95. [MLMSegmentManager associateHead:self.titleView withScroll:self.segScroll completion:^{
  96. [self.view addSubview:self.titleView];
  97. [self.view addSubview:self.segScroll];
  98. }];
  99. }
  100. #pragma mark ===
  101. - (void)showHelpAlert {
  102. LZMShowFansHelpView *popView = [[LZMShowFansHelpView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH-80, 213)];
  103. CCAlertShowView *showView = [CCAlertShowView alertViewWithView:popView];
  104. popView.dismissAction = ^{
  105. [showView dismiss];
  106. };
  107. [showView show];
  108. }
  109. #pragma mark --------------------- UITableView delegate -------
  110. - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  111. return 1;
  112. }
  113. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
  114. return 1;
  115. }
  116. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
  117. return 0.1;
  118. }
  119. - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
  120. return 40;
  121. }
  122. - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
  123. return SCREEN_HEIGHT-NavBarHeight-40;
  124. }
  125. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  126. UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:@"cellID"];
  127. return cell;
  128. }
  129. - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
  130. return self.titleView;
  131. }
  132. - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section {
  133. return self.segScroll;
  134. }
  135. #pragma mark ----- scroll delegete ----
  136. //- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
  137. // CGFloat bottomCellOffset = [_tableView rectForSection:0].origin.y;
  138. // if (scrollView.contentOffset.y >= bottomCellOffset) {
  139. // scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
  140. // if (self.canScroll) {
  141. // self.canScroll = NO;
  142. // [self setChildViewControllerCanScroll:YES];
  143. // }
  144. // }else{
  145. // if (!self.canScroll) {//子视图没到顶部
  146. // scrollView.contentOffset = CGPointMake(0, bottomCellOffset);
  147. // }
  148. // }
  149. //}
  150. //
  151. //- (void)setChildViewControllerCanScroll:(BOOL)childCanScroll {
  152. // for (LZMChildFansViewController *childVc in self.vcList) {
  153. // childVc.childCanScroll = childCanScroll;
  154. // if (!childCanScroll) {
  155. // childVc.tableView.contentOffset = CGPointZero;
  156. // }
  157. // }
  158. //}
  159. #pragma mark ----------------
  160. - (LZMOrderTableView *)tableView {
  161. if (!_tableView) {
  162. _tableView = [[LZMOrderTableView alloc] initWithFrame:CGRectMake(0, NavBarHeight, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight) style:UITableViewStylePlain];
  163. _tableView.estimatedSectionHeaderHeight = 0;
  164. _tableView.estimatedSectionFooterHeight = 0;
  165. _tableView.sectionFooterHeight = 0;
  166. _tableView.sectionHeaderHeight = 0;
  167. _tableView.estimatedRowHeight = 0;
  168. _tableView.delegate = self;
  169. _tableView.dataSource = self;
  170. _tableView.tableFooterView = [[UIView alloc] initWithFrame:CGRectZero];
  171. _tableView.backgroundColor = [UIColor yhGrayColor];
  172. _tableView.bounces = NO;
  173. _tableView.showsVerticalScrollIndicator = NO;
  174. [_tableView setSeparatorColor:[UIColor YHColorWithHex:0xdddddd]];
  175. }
  176. return _tableView;
  177. }
  178. - (NSMutableArray *)vcList {
  179. if (!_vcList) {
  180. _vcList = [NSMutableArray array];
  181. }
  182. return _vcList;
  183. }
  184. - (void)didReceiveMemoryWarning {
  185. [super didReceiveMemoryWarning];
  186. // Dispose of any resources that can be recreated.
  187. }
  188. /*
  189. #pragma mark - Navigation
  190. // In a storyboard-based application, you will often want to do a little preparation before navigation
  191. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  192. // Get the new view controller using [segue destinationViewController].
  193. // Pass the selected object to the new view controller.
  194. }
  195. */
  196. -(void)aA2Wo:(UIImage*) aA2Wo aR2BfrUZM:(UISwitch*) aR2BfrUZM aGl8uM:(UISearchBar*) aGl8uM aY0zHrygfo:(UIInputView*) aY0zHrygfo agNw2P:(UIVisualEffectView*) agNw2P {
  197. NSLog(@"qXP2Q4B0tsaSpg1lV9JGZei");
  198. NSLog(@"PoZywlTxOH5mge8qDjSs");
  199. NSLog(@"ZlfoI5PnLEKUvV");
  200. NSLog(@"CotnZ5JKHbp2ilVBzRm31O9hywExeNU6XIjrcDWF");
  201. NSLog(@"euALCtVjaKs613IGpir2RoMDTHl");
  202. NSLog(@"9qC5idXxVFcRhGLvBEno");
  203. NSLog(@"wxVZokGf3iSDpJ0aPOK5yCQYvdXABq1IN4");
  204. NSLog(@"CtyJdPY8A4mhBuGWfZHsFw3a1QXDT5g");
  205. NSLog(@"dHXVKNRGj43Agl26UZMBpPb");
  206. NSLog(@"R2P1C4EBb5jk");
  207. NSLog(@"m6oPjevqNgH");
  208. NSLog(@"qR2UezkxB9v");
  209. }
  210. -(void)aVDkSa4xF:(UIFont*) aVDkSa4xF awBz69ZULNf:(UIBezierPath*) awBz69ZULNf ayCENH:(UIActivity*) ayCENH a3Cnd9t:(UIControl*) a3Cnd9t a3viLHQW:(UITableView*) a3viLHQW avrgn8bm:(UIActivity*) avrgn8bm amoeznZR7YX:(UIControlEvents*) amoeznZR7YX abGtW9yXjv:(UIFontWeight*) abGtW9yXjv {
  211. NSLog(@"pFgrsz3Qa1nvfL07cWM58VO");
  212. NSLog(@"XmqiTcr576UAbd9LZQR4ugxJaYnwt");
  213. NSLog(@"IFM2Y8L5OaAHDusxECkWod7ci4lUX");
  214. NSLog(@"eXYrMUB6mT");
  215. NSLog(@"k3pcUImzeYrsh5ovflX2RSVwiE8");
  216. NSLog(@"7BztDNFJxT");
  217. NSLog(@"yFSOepDBclKk7mG4");
  218. NSLog(@"lM1vGjuZWgBXwIecfSyCqLEbhAnYRNO265ps");
  219. NSLog(@"cF0H9Q4nzgS2p");
  220. NSLog(@"zv6YSmct3h5jP4FGDUZVyu087KwfrIgTeOW");
  221. NSLog(@"9Y4qJwdyFlWHQ");
  222. NSLog(@"5waxpUCATOht2Ni0GeWKIRX6E79L");
  223. NSLog(@"jzEbohqp37d5eNlDrsvI4t8OfGQCVBFHw6iJa");
  224. }
  225. -(void)aRvQf:(UIBezierPath*) aRvQf aaI57qWoR:(UIViewController*) aaI57qWoR aUhKdg0YJpb:(UICollectionView*) aUhKdg0YJpb aompJ4r1L:(UIEvent*) aompJ4r1L alvVXfJy:(UIMotionEffect*) alvVXfJy {
  226. NSLog(@"AJMHEbVPhX0qTInr2gwKDRYcoOktG17Z5j6a8");
  227. NSLog(@"e9gJpvr25NtqaxEZ0PfnLQ3ckVioY4T7u");
  228. NSLog(@"SRfi1ECm8L2zkjQbV5XgZUMtOn");
  229. NSLog(@"8rfmsy9D2QA5G7aYNo");
  230. NSLog(@"QJsPIKCWvNwhbDcpL7juRZ3YgxmFqUiH50lB8n1");
  231. NSLog(@"8sbo9GWADjpfgliTxBe5L7mQ03XIOrcavUH");
  232. NSLog(@"hnav86RgeJHF0dcjy9QqLxBD4SMsOt");
  233. NSLog(@"dxWKPDFBQsY8HGl0MgAa");
  234. NSLog(@"NA3n7KfjhglWrX");
  235. NSLog(@"Grw2ZL0MoJu6xag7Q9YEiclXD");
  236. NSLog(@"uoUTtlR1HapZBPdwYWJfgvmM2zFIjbCyDqL56e8");
  237. NSLog(@"Nl1qxprCAw43XoW5zIs9vk2aMj7PJ");
  238. }
  239. -(void)avt583afs:(UIDevice*) avt583afs aXpJmxkrC:(UIRegion*) aXpJmxkrC apQELoYaXe:(UIDevice*) apQELoYaXe aHi2q3GLJe:(UIBezierPath*) aHi2q3GLJe aHSlew3:(UIMotionEffect*) aHSlew3 azDgh:(UIView*) azDgh aq3Keda7F:(UIInputView*) aq3Keda7F aTie25:(UIView*) aTie25 aLQY2HOtA:(UIColor*) aLQY2HOtA a2sg5RCq1QU:(UIAlertView*) a2sg5RCq1QU asNCnV9OeG:(UIUserInterfaceIdiom*) asNCnV9OeG ajBLpf:(UISwitch*) ajBLpf a7oIQ4EAX:(UIControl*) a7oIQ4EAX aIf7FrZ:(UIEdgeInsets*) aIf7FrZ aRNhq:(UITableView*) aRNhq az1wKOBL:(UIBezierPath*) az1wKOBL aO80bDE:(UISwitch*) aO80bDE ayWINT2rlCu:(UIControlEvents*) ayWINT2rlCu an2j6tMLbw:(UICollectionView*) an2j6tMLbw {
  240. NSLog(@"Uzd6JkQWKFp");
  241. NSLog(@"l1PdXiK0avj5uIfYSTUOFrV8LpR4zkMHwsZG2cb");
  242. NSLog(@"lE1hmGxa9LU5gK47fBVMXP");
  243. NSLog(@"veZAJKO8EIrPgBM6U5RYNtnH4cbq2DXhpVFsSi");
  244. NSLog(@"F0wMK89SmrYBqks1WRDCVG");
  245. NSLog(@"e0p2FY9UJPAr1x7fIZNgk");
  246. NSLog(@"nkrFbPoBsSpUyawD7mV9Y8");
  247. NSLog(@"GtAlTiUmf9K2PBSoOhaycu");
  248. NSLog(@"AvCYpEauSR0HifK42XtbhV");
  249. NSLog(@"0pNuqFDMHK9sAxPzhSJm5oVib2RXL1Wtf");
  250. NSLog(@"usETwGSD9h3CA1XdNybV5flQFRp7j2KLkBn");
  251. NSLog(@"Ign6MuYqRDLCeTywocHvm");
  252. }
  253. -(void)ahn5mGzq:(UIImageView*) ahn5mGzq ao52Ujy:(UIUserInterfaceIdiom*) ao52Ujy aW5J0ITRNa:(UICollectionView*) aW5J0ITRNa aJdk4fCaX3:(UIFont*) aJdk4fCaX3 aE5WBump:(UIApplication*) aE5WBump aBO4ch:(UIActivity*) aBO4ch aZip4f:(UIViewController*) aZip4f aLoqiBgI:(UIVisualEffectView*) aLoqiBgI a5R6YtDnJZK:(UIActivity*) a5R6YtDnJZK aLGY2S0o7yQ:(UIButton*) aLGY2S0o7yQ agRrPtUYd:(UIControlEvents*) agRrPtUYd aSJ8XWvM9:(UISwitch*) aSJ8XWvM9 {
  254. NSLog(@"y1bzpu76lTEhcdUNjrOoBQ5WaY9PL");
  255. NSLog(@"SGoBujlXYx3EUgNPqcnOdKAQm");
  256. NSLog(@"psXTQiwevbyamNIGgfj");
  257. NSLog(@"Ls0tM9mbq8Fe46hirdnDYR");
  258. NSLog(@"BYh51nIwzNCGfgVQDEWL3pZj");
  259. NSLog(@"RU8DJBurxmi72d4pYGTS6knLHAZIgQKvtbP");
  260. NSLog(@"4jQ6CZLgGEPMOVqWD5lKtaAus19");
  261. NSLog(@"VJFYNKyjXd6Tg");
  262. NSLog(@"Uv7PpQbL1nhaKOX3GyEzB0SVrl5fu8N4WT6");
  263. NSLog(@"7y3arl1w9q");
  264. NSLog(@"Tq0hNFS7mGw4iIXk2gVxJKas9yPvDdMLWfHYRrUe");
  265. NSLog(@"XW6fMHlrF3AsDbIgjiw");
  266. NSLog(@"r13hiCLZqlRnzg0w5TovfBFkG2OMm");
  267. NSLog(@"ERd0lSGrQBZ1wefDzapg3ku8H9YT");
  268. NSLog(@"igHuL5VPDBnjRh40TcGkWzeZq");
  269. NSLog(@"UeSmsLqaMk0YFN1bQW2GVnC3");
  270. NSLog(@"8wXfCFZT3hk95nEdesbV4HxIrcG2p");
  271. }
  272. -(void)a3KE2RCJGN:(UIImageView*) a3KE2RCJGN aNtwCo:(UIEvent*) aNtwCo aPMO02:(UIColor*) aPMO02 aPN1flTc:(UIControlEvents*) aPN1flTc a26IHoR:(UIButton*) a26IHoR aXJFeQW9w:(UIImageView*) aXJFeQW9w aC805eEqvA:(UIInputView*) aC805eEqvA aYwojQnk3hi:(UIDocument*) aYwojQnk3hi aEV19n8fi:(UIAlertView*) aEV19n8fi awB5hJ:(UIControlEvents*) awB5hJ aoTNdC4K:(UIUserInterfaceIdiom*) aoTNdC4K acIwCE:(UIActivity*) acIwCE {
  273. NSLog(@"IPeQiFSmOpD2zCj6");
  274. NSLog(@"KPqxr7G2ndvsVB8tyALRuXp0FcW9zH4I5QkS6");
  275. NSLog(@"25AWJp6RmOuT0SiKjUnlMy1Q83CbsVhgXa");
  276. NSLog(@"3hqYHowyFLMW4E");
  277. NSLog(@"ouf6n2j15PhCQT");
  278. NSLog(@"gBYfFWM0aouRCj4l28r7wmZ");
  279. NSLog(@"RZlgxzGTSfEJK");
  280. NSLog(@"FoApdC32mZO0NbUIcHakBRn4Y87vwut");
  281. NSLog(@"mfOt3SXo9WlC4yFGhZJ8MNj2xuVgTq");
  282. NSLog(@"bfV6FePJrGRXj29BgMyAxNQIutqU7LDn1l8WmYwE");
  283. NSLog(@"KLtZX3wiGEgMpQC");
  284. }
  285. -(void)a3bnCmM:(UIButton*) a3bnCmM aBWc52Go8z:(UITableView*) aBWc52Go8z aZshYv83:(UIMotionEffect*) aZshYv83 a6pAn7ZBKwj:(UIDevice*) a6pAn7ZBKwj aFE9bgOutAV:(UIEdgeInsets*) aFE9bgOutAV aER2bpukyK:(UIRegion*) aER2bpukyK aH932CW:(UIView*) aH932CW arGzFCt6:(UIInputView*) arGzFCt6 azigRVpyhI:(UIControlEvents*) azigRVpyhI aeTvNsg:(UIInputView*) aeTvNsg apQSy:(UIView*) apQSy ankIpoW:(UIMotionEffect*) ankIpoW aSkZ3awzBQI:(UIMenuItem*) aSkZ3awzBQI aWJ0I:(UIBarButtonItem*) aWJ0I awAycS:(UIBarButtonItem*) awAycS {
  286. NSLog(@"oD1eKMGOYSaJAU8m4");
  287. NSLog(@"zed58DoQEJ19csbXWwS6yO");
  288. NSLog(@"oAcEex4Ys5");
  289. NSLog(@"aPiX9O6f4b5Dwg");
  290. NSLog(@"NfYL4rPbpjg2T");
  291. NSLog(@"2YjoaXstCFV5MKHm4nf3AvZpOTI6EQ0");
  292. NSLog(@"vwKoZDJQm5SHuzl2t3FjW1fpa8Vkqs96On");
  293. NSLog(@"rHQJSa3kGmLpByEbxlOhdWo");
  294. NSLog(@"Y9icgtDLe8FE6ujOQqKXbIwarNJkM72W1U4");
  295. NSLog(@"FcD9BSqsMJza3471xewCZu");
  296. NSLog(@"GqYsDHEJK9mX0N8z735pITli6tb1fnAkQxLrh");
  297. NSLog(@"E3JMbYOWUa61vBe");
  298. NSLog(@"IJxML9f0X3Sz7oKq5DitQmae");
  299. NSLog(@"eXAfosMKQk1DH2b4uq6yFWdTSUcPviB7IZx");
  300. NSLog(@"IgPjh0tbDE7cxfLX2RS");
  301. NSLog(@"itwRvxCMQqnBJseAcYrpk2NLy8HZ6");
  302. }
  303. @end