NYClassRoomPeiCell.m 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // NYClassRoomPeiCell.m
  3. // jiaPei
  4. //
  5. // Created by Ning.ge on 2024/2/4.
  6. // Copyright © 2024 JCZ. All rights reserved.
  7. //
  8. #import "NYClassRoomPeiCell.h"
  9. #import "NYClassRoomPeiViewModel.h"
  10. @interface NYClassRoomPeiCell ()
  11. @property (nonatomic, readwrite, strong) NYClassRoomPeiViewModel *viewModel;
  12. @end
  13. @implementation NYClassRoomPeiCell
  14. #pragma mark - PublicMethods
  15. + (instancetype)cellWithCollectionView:(UICollectionView *)collectionView forIndexPath:(NSIndexPath *)indexPath {
  16. static NSString *ID = @"NYClassRoomPeiCell";
  17. [collectionView registerNib:[UINib nibWithNibName:ID bundle:nil] forCellWithReuseIdentifier:ID];
  18. NYClassRoomPeiCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:ID forIndexPath:indexPath];
  19. if (!cell) cell = [self rq_viewFromXib];
  20. return cell;
  21. }
  22. - (void)bindViewModel:(NYClassRoomPeiViewModel *)viewModel {
  23. self.viewModel = viewModel;
  24. }
  25. #pragma mark - SystemMethods
  26. - (void)awakeFromNib {
  27. [super awakeFromNib];
  28. self.contentView.backgroundColor = UIColor.clearColor;
  29. _px00_view.layer.shadowColor = RGBA_COLOR(124, 129, 136, 0.2).CGColor;
  30. _px01_view.layer.shadowColor = RGBA_COLOR(124, 129, 136, 0.2).CGColor;
  31. }
  32. @end