SOF
SOF

Reputation: 457

Getting problem for picker view

I am implementing picker view with double component Toggle with Celsius and Fahrenheit two picker views by selecting toggle button. Both the picker view is loading my app and getting toggle . But i am missing my components values ., please help me , here i attached my picker project.

http://www.ziddu.com/download/13259414/TemperaturePicker.zip.html

Upvotes: 1

Views: 273

Answers (1)

Felix
Felix

Reputation: 35394

I've found two problems in your code:

  • In the method updateLabel you should reload the pickerview:

    [pickerView reloadAllComponents];

  • Your NSObject-Classes Celsius and Fahrenheit are not ViewControllers, which means that viewDidLoad won't be executed and the array containing the data will not be initialized.

Better you write an initializer like this:

- (id)init {        
       /* initialize data-arrays here */
       return self;             
}

Upvotes: 2

Related Questions