// // KBMonthShowTipView.m // YouHuiProject // // Created by jcymac on 2018/6/8. // Copyright © 2018年 kuxuan. All rights reserved. // #import "KBMonthShowTipView.h" @interface KBMonthShowTipView() @property (weak, nonatomic) IBOutlet UILabel *titleOne; @property (weak, nonatomic) IBOutlet UILabel *contentOne; @property (weak, nonatomic) IBOutlet UILabel *titleTwo; @property (weak, nonatomic) IBOutlet UILabel *contentTwo; @property (weak, nonatomic) IBOutlet UIView *centerView; @end @implementation KBMonthShowTipView - (void)awakeFromNib{ [super awakeFromNib]; [self otherOP]; } -(void)otherOP{ UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(hidenAction:)]; tap.numberOfTapsRequired=1; [self addGestureRecognizer:tap]; } - (IBAction)hidenAction:(id)sender { self.hidden=YES; } - (void)setType:(NSInteger)type{ NSString *typeStr=@""; if (type==1) { typeStr=@"结算"; self.contentOne.text=@"本月内所有确认收货的订单收益\n下个月25日结算后,转入到余额中"; self.contentTwo.text=@"上月内所有确认收货的订单收益\n本月25日结算后,转入到余额中"; }else{ typeStr=@"预估"; self.contentOne.text=@"\n本月内创建的所有订单收益"; self.contentTwo.text=@"\n上个月内创建的所有订单收益"; } self.titleOne.text=[NSString stringWithFormat:@"-本月%@收入-",typeStr]; self.titleTwo.text=[NSString stringWithFormat:@"-上月%@收入-",typeStr]; } @end