Advertisement
Guest User

Untitled

a guest
Jan 27th, 2015
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.             CGFloat usage = 0.0;
  2.             if ([partMaintenance.thresholdUnit isEqualToString:@"Months"]) {
  3.                 usage = [robotPart.months floatValue];
  4.             } else if ([partMaintenance.thresholdUnit isEqualToString:@"Distance"]) {
  5.                 usage = [robotPart.distance floatValue];
  6.             } else if ([partMaintenance.thresholdUnit isEqualToString:@"Runtime"]) {
  7.                 usage = [robotPart.runtime floatValue];
  8.             }
  9.            
  10.             robotPartCell.progress.progress = [partMaintenance.threshold floatValue] > 0.0 ? usage / [partMaintenance.threshold floatValue] : 0.0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement