MainControllerView -> ProtectionViewController as childview -> BackupViewController (as subview) -> UISwitch (as subview)
If you put a UISwitch on ProtectionViewController, it works. Remove the target for the switch, clicked as innocent.
PS Target is present :) Debazhil, to him, even the transition is not carried out.
CGRect switchRect = CGRectMake(self.view.frame.size.width - 65, 110, 25, 10); self.switchButton = [[UISwitch alloc] initWithFrame:switchRect]; self.switchButton.on = NO; [self.switchButton addTarget:self action:@selector(switchToggled) forControlEvents:UIControlEventValueChanged]; [self.view addSubview:self.switchButton];