TimerLabel.m 399 B

12345678910111213141516171819
  1. //
  2. // TimerLabel.m
  3. // LenzCameraNativeModuleForRN
  4. //
  5. // Created by 王昭威 on 2023/1/31.
  6. //
  7. #import "TimerLabel.h"
  8. @implementation TimerLabel
  9. - (void)updateWith:(NSInteger)seconds{
  10. NSInteger hours = seconds / 3600;
  11. NSInteger minutes = seconds / 60 % 60;
  12. NSInteger sec = seconds % 60;
  13. self.text = [NSString stringWithFormat:@"%02ld:%02ld:%02ld", hours, minutes, sec];
  14. }
  15. @end