PLPickerView.m 1001 B

123456789101112131415161718192021
  1. #import "PLPickerView.h"
  2. #import "UIKit+hook.h"
  3. @implementation PLPickerView
  4. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  5. {
  6. UITableViewCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath];
  7. //cell.imageView.image = [(id<PLPickerViewDelegate>)self.delegate pickerView:self imageForRow:indexPath.row forComponent:indexPath.section];
  8. cell.imageView.frame = CGRectMake(0, 0, 40, 40);
  9. cell.imageView.isSizeFixed = YES;
  10. cell.imageView.layer.magnificationFilter = kCAFilterNearest;
  11. [(id<PLPickerViewDelegate>)self.delegate pickerView:self enumerateImageView:cell.imageView forRow:indexPath.row forComponent:indexPath.section];
  12. return cell;
  13. }
  14. - (UIImage *)imageAtRow:(NSInteger)row column:(NSInteger)column {
  15. NSIndexPath *indexPath = [NSIndexPath indexPathForRow:row inSection:column];
  16. return [self tableView:[self tableViewForColumn:0] cellForRowAtIndexPath:indexPath].imageView.image;
  17. }
  18. @end