Why can't I store a float value - it's always zero!
- by just_another_coder
I have a view controller that is created by the app delegate - it's the first one shown in the app.
In its interface I declare
float lengthOfTime;
I also set it as a property:
@property (nonatomic) float lengthOfTime;
And in it's implemetation:
@synthesize lengthOfTime;
In the class viewDidLoad method, I set the value:
self.lengthOfTime = 3.0f;
However, after this, the value is always zero.
No errors, no compile warnings, nothing. Just zero.
The class is instantiated, it is showing in the view, so I'm pretty sure it's not a nil reference.
I've searched all over Google and can't figure it out.
What's going on?!?
:(