CellDataAdapter.m 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // CellDataAdapter.m
  3. // MACProject
  4. //
  5. // Created by MacKun on 16/8/4.
  6. // Copyright © 2016年 com.mackun. All rights reserved.
  7. //
  8. #import "CellDataAdapter.h"
  9. @implementation CellDataAdapter
  10. + (CellDataAdapter *)cellDataAdapterWithCellReuseIdentifier:(NSString *)cellReuseIdentifiers data:(id)data
  11. cellHeight:(CGFloat)cellHeight cellType:(NSInteger)cellType {
  12. CellDataAdapter *adapter = [[self class] new];
  13. adapter.cellReuseIdentifier = cellReuseIdentifiers;
  14. adapter.data = data;
  15. adapter.cellHeight = cellHeight;
  16. adapter.cellType = cellType;
  17. return adapter;
  18. }
  19. + (CellDataAdapter *)cellDataAdapterWithCellReuseIdentifier:(NSString *)cellReuseIdentifiers data:(id)data
  20. cellHeight:(CGFloat)cellHeight cellWidth:(CGFloat)cellWidth
  21. cellType:(NSInteger)cellType {
  22. CellDataAdapter *adapter = [[self class] new];
  23. adapter.cellReuseIdentifier = cellReuseIdentifiers;
  24. adapter.data = data;
  25. adapter.cellHeight = cellHeight;
  26. adapter.cellWidth = cellWidth;
  27. adapter.cellType = cellType;
  28. return adapter;
  29. }
  30. + (CellDataAdapter *)collectionCellDataAdapterWithCellReuseIdentifier:(NSString *)cellReuseIdentifiers data:(id)data cellType:(NSInteger)cellType {
  31. CellDataAdapter *adapter = [[self class] new];
  32. adapter.cellReuseIdentifier = cellReuseIdentifiers;
  33. adapter.data = data;
  34. adapter.cellType = cellType;
  35. return adapter;
  36. }
  37. @end