*I have a timer in my main. storyboard I have a link to a title where I need it to show the minutes and seconds like 25:52 how can I show the minute and seconds?
here is my code for the timer.*
timer3 = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(UIOutlitsViewController.action), userInfo: nil, repeats: true)
}
@objc func action() {
time += 1
timeView1.text = String(time)
if time == 5.0 {
btnPressed1.titleLabel?.textColor = UIColor.red
btnPressed1.isUserInteractionEnabled = true
let url = Bundle.main.url(forResource: "mixkit-alarm-clock-beep-988", withExtension: "wav")
player = try! AVAudioPlayer(contentsOf: url!)
player.play()
timer3.invalidate()
}
}