- (void)controlsEnabled:(BOOL)enabled
{
self.onSwitch.enabled = enabled;
if (enabled)
{
NSLog(@"ON");
}
else
{
NSLog(@"OFF");
}
}
基本的に、別のView Controllerに影響を与えるこの関数を実装する必要があります。スイッチがオンの場合、別のView Controller内で特定のメソッドを実行します。