У меня есть этот UISwitch внутри моей сцены Cocos2d, как и я:
switchCtl = [[UISwitch alloc] initWithFrame:CGRectMake(130, 110, 125,50)];
[switchCtl setOn:YES];
// [switchCtl addTarget: self action: @selector (switchAction) forControlEvents: UIControlEventValueChanged];
switchCtl.backgroundColor = [UIColor clearColor];
switchCtl.transform = CGAffineTransformMakeRotation( M_PI / 2.0 );
[[[CCDirector sharedDirector] openGLView] addSubview:switchCtl];
В моем .h файле: UISwitch * switchCtl;
Я удаляю его с помощью:
[switchCtl removeFromSuperview];
[switchCtl release];
switchCtl = nil;
CCLOG(@"did removed.");
В журнале написано "удалено", но нетснято с экрана.Почему это?