PingLunCell.m 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // PingLunCell.m
  3. // model
  4. //
  5. // Created by MUMEI on 2018/8/6.
  6. // Copyright © 2018年 Mine. All rights reserved.
  7. //
  8. #import "PingLunCell.h"
  9. @implementation PingLunCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. }
  14. - (void)setModel:(PingLunModel *)model{
  15. _model = model;
  16. self.dateLabel.text = model.idate;
  17. self.name.text = model.pet;
  18. self.intro.text = model.intro;
  19. self.iconImage.layer.cornerRadius = 20;
  20. self.iconImage.layer.masksToBounds= YES;
  21. [self.iconImage sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",imageURl,model.hphoto]] placeholderImage:[UIImage imageNamed:@"touxiang_wait"]];
  22. [self.deleteButton addTarget:self action:@selector(deletePinglun) forControlEvents:UIControlEventTouchUpInside];
  23. }
  24. -(void)deletePinglun{
  25. [self.delegate deletePingLun:_model.pk];
  26. }
  27. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  28. [super setSelected:selected animated:animated];
  29. // Configure the view for the selected state
  30. }
  31. @end