Create the Time Counter in IOS.

Create the Time Counter in IOS.

Time Counter

In most of the time, we need to display the timer in UIView for the count down the time. for this, we need to make UILabel and at the time of class loading we need to define seconds.

let seconds = 3600 for 1 hour.

here is a code snippet.

declare in viewDidLoad function

define countdownTimer function.

here this function calls updateCounter function in every second. so you can update your UILabel .

Now manges your counter according to your need.