tags:

views:

140

answers:

2

I'm currently trying to get a UISlider to work.

I'm trying to set the strings value as 8 to start off with on view load.

Then when the slider changes value I want the string to update with that number, and then later on I can use the value in the string for a setDuration:## later on in another action.

Any ideas?

+2  A: 

To update the string you just get the value and do:

NSString *myString = [NSString stringWithFormat:@"%f", [slider value]];

To get the string value back as a float you just do:

float myValue = [myString floatValue];
Martin Pilkington
A: 

I ended up using CAFloat..

Domness