RQCommonItemViewModel.m 782 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // RQCommonItemViewModel.m
  3. // RQCommon
  4. //
  5. // Created by 张嵘 on 2018/11/27.
  6. // Copyright © 2018 张嵘. All rights reserved.
  7. //
  8. #import "RQCommonItemViewModel.h"
  9. @implementation RQCommonItemViewModel
  10. + (instancetype)itemViewModelWithTitle:(NSString *)title icon:(NSString *)icon{
  11. RQCommonItemViewModel *item = [[self alloc] init];
  12. item.title = title;
  13. item.icon = icon;
  14. return item;
  15. }
  16. + (instancetype)itemViewModelWithTitle:(NSString *)title{
  17. return [self itemViewModelWithTitle:title icon:nil];
  18. }
  19. - (instancetype)init
  20. {
  21. self = [super init];
  22. if (self) {
  23. _selectionStyle = UITableViewCellSelectionStyleGray;
  24. _rowHeight = RQ_FIT_HORIZONTAL(60.0f);
  25. _delegate = self;
  26. }
  27. return self;
  28. }
  29. - (NSString *)itemClassName {
  30. return @"RQCommonCell";
  31. }
  32. @end