스플래시 페이지 추가

This commit is contained in:
Yu Sung
2023-08-09 16:52:36 +09:00
parent 058c907609
commit 84d3dd61ca
27 changed files with 932 additions and 6 deletions

View File

@@ -0,0 +1,32 @@
//
// IntExtension.swift
// yozm
//
// Created by klaus on 2022/06/21.
//
import Foundation
extension Int64 {
func durationText() -> String {
let duration = self
let convertedTime = Int(duration / 1000)
let hour = Int(convertedTime / 3600)
let minute = Int(convertedTime / 60) % 60
let second = Int(convertedTime % 60)
// update UI
var timeText = [String]()
if hour > 0 {
timeText.append(String(hour))
timeText.append(String(format: "%02d", minute))
} else {
timeText.append(String(format: "%02d", minute))
timeText.append(String(format: "%02d", second))
}
return timeText.joined(separator: ":")
}
}