SignInfoCell.m 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // SignInfoCell.m
  3. // 千模
  4. //
  5. // Created by MUMEI on 2018/5/31.
  6. // Copyright © 2018年 MUMEI. All rights reserved.
  7. //
  8. #import "SignInfoCell.h"
  9. @implementation SignInfoCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. self.phone.keyboardType = UIKeyboardTypeNumberPad;
  13. self.intNum=0;
  14. self.num.text = [NSString stringWithFormat:@"%d",self.intNum];
  15. // Initialization code
  16. }
  17. - (IBAction)jian:(id)sender {
  18. if (self.intNum>0) {
  19. self.intNum--;
  20. self.num.text = [NSString stringWithFormat:@"%d",self.intNum];
  21. }
  22. self.totoalPrice.text = [NSString stringWithFormat:@"%d元",[_model.meprice charValue]*self.intNum];
  23. }
  24. - (IBAction)jia:(id)sender {
  25. self.intNum++;
  26. self.num.text = [NSString stringWithFormat:@"%d",self.intNum];
  27. self.totoalPrice.text = [NSString stringWithFormat:@"%d元",[_model.meprice charValue]*self.intNum];
  28. }
  29. - (void)setModel:(ActivityModel *)model{
  30. _model = model;
  31. self.price.text = [NSString stringWithFormat:@"%d元/人",[model.meprice charValue]];
  32. self.captionLabel.text = model.caption;
  33. }
  34. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  35. [super setSelected:selected animated:animated];
  36. }
  37. @end