Andrew H
Andrew H

Reputation: 522

Reading NSSlider always returns 0

G'day, I have been reading about NSSliders for the last hour. Why does NSLog(@"%f",[mySlider doubleValue]) always return zero? Reading the value from the slider into a variable should be straight forward but for some reason it doesn't. Thanks, Andrew.

Upvotes: 2

Views: 178

Answers (1)

Jonathan del Strother
Jonathan del Strother

Reputation: 2572

Have you tried NSLog(@"%@", mySlider) ? It's entirely possible that mySlider is nil at the point you're reading it.

Upvotes: 2

Related Questions