Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CGFloat usage = 0.0;
- if ([partMaintenance.thresholdUnit isEqualToString:@"Months"]) {
- usage = [robotPart.months floatValue];
- } else if ([partMaintenance.thresholdUnit isEqualToString:@"Distance"]) {
- usage = [robotPart.distance floatValue];
- } else if ([partMaintenance.thresholdUnit isEqualToString:@"Runtime"]) {
- usage = [robotPart.runtime floatValue];
- }
- robotPartCell.progress.progress = [partMaintenance.threshold floatValue] > 0.0 ? usage / [partMaintenance.threshold floatValue] : 0.0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement