IPhone SDK : Add UISlider and UISwitch in a table view only crash when touch slider?

UPDATE After the comments, here is a general selector you should use Note: you will need to call addTarget only once using this selector.

UPDATE After the comments, here is a general selector you should use. Note: you will need to call addTarget only once using this selector. -(void)generalSelector:(id)sender{ if (sender isKindOfClass:UISlider class){ UISlider *slider = (UISlider *)sender; NSLog(@"Slider value %f",slider.

Value); }else{ UISwitch *temp = (UISwitch *)sender; NSLog(@"Switch is %@",temp. On? @"ON":@"OFF"); } }.

Yes I did ,just missing type here! – WebberLai Oct 20 '10 at 8:07 ok lets backup, when are you exactly calling the isOn on the "slider"? It's not showing in your code snippets.

– medopal Oct 20 '10 at 8:14 I never call the isOn on slider ,only let it call when switch is toggled. – WebberLai Oct 20 '10 at 8:43 but somehow .......the slider call it maybe here is repeat addTarget:self? – WebberLai Oct 20 '10 at 8:44 1 You better use (UIControl *)cell.acc...., since UIControl is the parent of both UISlider and UISwitch – medopal Oct 20 '10 at 11:08.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions