TimerLabel.m 449 B

1234567891011121314151617181920
  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. NSLog(@"~~~~~~~~~~~~~~~~~~~~:%@", self.text);
  15. }
  16. @end