I have a NSSlider that is attempting to convert a regular float into a CGFloat. The code that I am using:
CGFloat testing = [mainSlider floatValue];
However this simply makes the testing variable “0.00” when I attempt to log it.
NSLog(@"%f", testing);
Does anyone have any ideas as to why this would happen? Thanks for any help.
try this just in case (can’t remember if CGFloat is a double or not):NSLog(@”%f”, (double)testing);
Check that the variable isn’t being shadowed like this: