Umair Afzal
Umair Afzal

Reputation: 5049

Animating Values in UILable IOS Swift

i want to display values 1-10 repeatedly in UILable with animation user should be able to see the fluctuation of the values slowly how can i achieve this functionality ?

Upvotes: 0

Views: 81

Answers (1)

Reshmi Majumder
Reshmi Majumder

Reputation: 961

You can use :

var timer : NSTimer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: "change_label", userInfo: nil, repeats: true)


func change_label()

{

count = count+1
label.text = String(format: "%d",count)

}

Upvotes: 1

Related Questions