DocAsh59
DocAsh59

Reputation: 400

How Do I Set A UISlider To A Number In A UILabel?

I would like to know how to set UISlider to a number in the UILabel.

What i've tried:
size = UISlider
sizetxt = UILabel

[size setValue:[NSString stringWithFormat:@"%@", sizetxt]];


All I get is a failed build saying:

Sending 'NSString *' to parameter to incompatible type 'float'


Any help would be appriceated.

Upvotes: 0

Views: 74

Answers (1)

Antonio MG
Antonio MG

Reputation: 20410

Convert it to float:

[size setValue:[sizeTxt floatValue]];

Upvotes: 2

Related Questions