Aucune description

FKBookRecViewModel.m 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // FKBookRecViewModel.m
  3. // FirstLink
  4. //
  5. // Created by jack on 16/4/29.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import "FKBookRecViewModel.h"
  9. @implementation FKBookRecViewModel
  10. @synthesize itemArray = _itemArray;
  11. - (NSInteger)numberOfRowsInSection:(NSInteger)section{
  12. return self.itemArray.count;
  13. }
  14. - (CGFloat)heightForRowAtIndexPath:(NSIndexPath *)indexPath{
  15. return 190.0f;
  16. }
  17. - (CGFloat)heightForHeaderInSection:(NSInteger)section{
  18. return 100.0f;
  19. }
  20. - (NSString *)cellIdentify{
  21. return FK_BOOK_REC_CELL_IDENTIFY;
  22. }
  23. - (BookContentType)contentType{
  24. return BookContentTypeRecommend;
  25. }
  26. - (BOOL)enableBottomRefresh{
  27. return NO;
  28. }
  29. - (void)appendMoreItem:(NSArray *)moreArray{
  30. if (!self.itemArray || !self.itemArray.count) self.itemArray = moreArray;
  31. NSMutableArray *arrayM = [NSMutableArray arrayWithArray:self.itemArray];
  32. [arrayM addObjectsFromArray:moreArray];
  33. self.itemArray = arrayM;
  34. }
  35. - (id)proModelAtIndex:(NSUInteger)index{
  36. if (index < self.itemArray.count) {
  37. return self.itemArray[index];
  38. }
  39. return nil;
  40. }
  41. @end