RQCommonCollecttionItemViewModel.m 699 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // RQCommonCollecttionItemViewModel.m
  3. // YueXueChe
  4. //
  5. // Created by 张嵘 on 2018/12/19.
  6. // Copyright © 2018 lee. All rights reserved.
  7. //
  8. #import "RQCommonCollecttionItemViewModel.h"
  9. @implementation RQCommonCollecttionItemViewModel
  10. + (instancetype)itemViewModelWithTitle:(NSString *)title icon:(NSString *)icon {
  11. RQCommonCollecttionItemViewModel *item = [[self alloc] init];
  12. item.title = title;
  13. item.icon = icon;
  14. return item;
  15. }
  16. - (instancetype)init
  17. {
  18. self = [super init];
  19. if (self) {
  20. _itemSize = CGSizeMake(RQ_SCREEN_WIDTH / 4.f, RQ_SCREEN_WIDTH / 4.f);
  21. _delegate = self;
  22. }
  23. return self;
  24. }
  25. - (NSString *)itemClassName {
  26. return @"RQCommonCollectionViewCell";
  27. }
  28. @end