Bellow is the code i am calling when i press a button. The button will call the method bellow. But i get a "unrecognized selector sent to instance" error. What am i doing wrong? The objects have been declared in another method before this one is called. I have also tried hiding the buttons but they also crash. Someone please help.
-(void) clearControlPannel{
[buttCheck removeFromSuperview];
[buttBet removeFromSuperview];
[buttCall removeFromSuperview];
[buttRaise removeFromSuperview];
[buttFold removeFromSuperview];
[betLabel removeFromSuperview];
[betSlider removeFromSuperview];
}
The crash is:
Thread 1: EXC_BAD_ACCESS" on the [buttCheck removeFromSuper]; line
-[__NSCFDictionary removeFromSuperview]: unrecognized selector sent to instance 0x686b020 2012-06-24 19:08:12.175 HeadsUp[59630:f803] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFDictionary removeFromSuperview]: unrecognized selector sent to instance 0x686b020'