// // FKRecommendPageViewModel.m // FirstLink // // Created by jack on 15/12/9. // Copyright © 2015年 FirstLink. All rights reserved. // #import "FKRecommendPageViewModel.h" #import "FKRecommendController.h" #import "FKRecommendReform.h" @implementation FKRecommendPageViewModel - (FKRecommendPageItem *)pageItemAtIndex:(NSInteger)index{ if (index >= 0 && index < self.pageItemArray.count) { return self.pageItemArray[index]; } return nil; } - (NSArray *)sectionTitlesArray { if (self.pageItemArray.count == 0) { return @[@"精选"]; } NSMutableArray *mutableArray = [NSMutableArray arrayWithObject:@"精选"]; for (FKRecommendPageItem *item in self.pageItemArray) { [mutableArray addObject:item.pageName]; } return mutableArray; } @end