| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- //
- // ApexDriverUploadCell.m
- // Apex And Drivers
- //
- // Created by Jack on 2018/6/6.
- // Copyright © 2018年 USAI. All rights reserved.
- //
- #import "ApexDriverUploadCell.h"
- @interface ApexDriverUploadCell ()
- @property (strong, nonatomic) IBOutlet UILabel *orderNoLabel;
- @property (strong, nonatomic) IBOutlet UILabel *actionLabel;
- @property (strong, nonatomic) IBOutlet UILabel *dateLabel;
- @property (strong, nonatomic) IBOutlet UILabel *statusLabel;
- @property (strong, nonatomic) IBOutlet UILabel *progressLabel;
- @property (strong, nonatomic) IBOutlet UILabel *tipsLabel;
- @property (strong, nonatomic) IBOutlet UIProgressView *progressView;
- @end
- @implementation ApexDriverUploadCell
- - (void)awakeFromNib {
- [super awakeFromNib];
- // Initialization code
-
- [self reset];
- }
- - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- // Configure the view for the selected state
- }
- - (void)prepareForReuse {
- [super prepareForReuse];
-
- [self reset];
- }
- - (void)reset {
- self.orderID = nil;
- self.action = nil;
- self.datetime = nil;
- self.progress = 0;
- self.status = nil;
- self.errMsg = nil;
- }
- - (void)setProgress:(float)progress {
- if (progress < 0) {
- progress = 0.0f;
- }
- if (progress > 1) {
- progress = 1.0f;
- }
- _progress = progress;
- self.progressView.progress = progress;
- progress = progress * 100;
- self.progressLabel.text = [NSString stringWithFormat:@"%.1f%%",progress];
- }
- - (void)setStatus:(NSString *)status {
- _status = status;
- self.statusLabel.text = _status;
- }
- - (void)setErrMsg:(NSString *)errMsg {
- _errMsg = errMsg;
- if (errMsg.length) {
- self.tipsLabel.hidden = NO;
- self.tipsLabel.text = errMsg;
- } else {
- self.tipsLabel.hidden = YES;
- self.tipsLabel.text = nil;
- }
- }
- - (void)setOrderID:(NSString *)orderID {
- _orderID = orderID;
- self.orderNoLabel.text = orderID;
- }
- - (void)setAction:(NSString *)action {
- _action = action;
- self.actionLabel.text = action;
- }
- - (void)setDatetime:(NSString *)datetime {
- _datetime = datetime;
- self.dateLabel.text = datetime;
- }
- @end
|