《省钱达人》与《猎豆优选》UI相同版。域名tbk

DRMonthShowTipView.m 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. //
  2. // DRMonthShowTipView.m
  3. // YouHuiProject
  4. //
  5. // Created by jcymac on 2018/6/8.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "DRMonthShowTipView.h"
  9. @interface DRMonthShowTipView()
  10. @property (weak, nonatomic) IBOutlet UILabel *titleOne;
  11. @property (weak, nonatomic) IBOutlet UILabel *contentOne;
  12. @property (weak, nonatomic) IBOutlet UILabel *titleTwo;
  13. @property (weak, nonatomic) IBOutlet UILabel *contentTwo;
  14. @property (weak, nonatomic) IBOutlet UIView *centerView;
  15. @end
  16. @implementation DRMonthShowTipView
  17. - (void)awakeFromNib{
  18. [super awakeFromNib];
  19. [self otherOP];
  20. }
  21. -(void)otherOP{
  22. UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hidenAction:)];
  23. tap.numberOfTapsRequired=1;
  24. [self addGestureRecognizer:tap];
  25. }
  26. - (IBAction)hidenAction:(id)sender {
  27. self.hidden=YES;
  28. }
  29. - (void)setType:(NSInteger)type{
  30. NSString *typeStr=@"";
  31. if (type==1) {
  32. typeStr=@"结算";
  33. self.contentOne.text=@"本月内所有确认收货的订单收益\n下个月25日结算后,转入到余额中";
  34. self.contentTwo.text=@"上月内所有确认收货的订单收益\n本月25日结算后,转入到余额中";
  35. }else{
  36. typeStr=@"预估";
  37. self.contentOne.text=@"\n本月内创建的所有订单收益";
  38. self.contentTwo.text=@"\n上个月内创建的所有订单收益";
  39. }
  40. self.titleOne.text=[NSString stringWithFormat:@"-本月%@收入-",typeStr];
  41. self.titleTwo.text=[NSString stringWithFormat:@"-上月%@收入-",typeStr];
  42. }
  43. @end