Do some setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
currentValue = 50;
}
The viewDidLoad message is sent by UIKit as soon as the view controller loads its user interface from the nib file. At this point, the view controller isn't visible yet, so it's a good place to set instance variables to their proper initial values.
In this case, set the currentValue to 50, which should be the same value as the slider's initial position.