UITableView+LoadPageIndex.m 508 B

1234567891011121314151617181920212223
  1. //
  2. // UITableView+LoadPageIndex.m
  3. // HCQuanfangtong
  4. //
  5. // Created by qft_Ios_03 on 2018/4/25.
  6. // Copyright © 2018年 qft_Ios_03. All rights reserved.
  7. //
  8. #import "UITableView+LoadPageIndex.h"
  9. #import <objc/runtime.h>
  10. @implementation UITableView (LoadPageIndex)
  11. - (void)setPageIndex:(NSInteger)pageIndex{
  12. objc_setAssociatedObject(self, @"pageIndex", @(pageIndex), OBJC_ASSOCIATION_RETAIN);
  13. }
  14. - (NSInteger)pageIndex{
  15. return [objc_getAssociatedObject(self, @"pageIndex") integerValue];
  16. }
  17. @end