1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // FKBookRecViewModel.m
- // FirstLink
- //
- // Created by jack on 16/4/29.
- // Copyright © 2016年 FirstLink. All rights reserved.
- //
- #import "FKBookRecViewModel.h"
- @implementation FKBookRecViewModel
- @synthesize itemArray = _itemArray;
- - (NSInteger)numberOfRowsInSection:(NSInteger)section{
- return self.itemArray.count;
- }
- - (CGFloat)heightForRowAtIndexPath:(NSIndexPath *)indexPath{
- return 190.0f;
- }
- - (CGFloat)heightForHeaderInSection:(NSInteger)section{
- return 100.0f;
- }
- - (NSString *)cellIdentify{
- return FK_BOOK_REC_CELL_IDENTIFY;
- }
- - (BookContentType)contentType{
- return BookContentTypeRecommend;
- }
- - (BOOL)enableBottomRefresh{
- return NO;
- }
- - (void)appendMoreItem:(NSArray *)moreArray{
- if (!self.itemArray || !self.itemArray.count) self.itemArray = moreArray;
-
- NSMutableArray *arrayM = [NSMutableArray arrayWithArray:self.itemArray];
- [arrayM addObjectsFromArray:moreArray];
- self.itemArray = arrayM;
- }
- - (id)proModelAtIndex:(NSUInteger)index{
- if (index < self.itemArray.count) {
- return self.itemArray[index];
- }
- return nil;
- }
- @end
|