我在从 BOOL 设置 UISwitch 的状态时遇到问题。这可能很简单,所以如果有人可以提供帮助,我将不胜感激。这是我的代码,它不起作用,但它可能会更清楚。
RoutingController *routingController = [[RoutingController alloc] initWithNibName:@"RoutingController" bundle:nil];
routingController.routingDelegate = self;
if (audioController->oscOneLFObool == YES) {
routingController.oscOneLFOOneSwitch.on = YES;
} else {
routingController.oscOneLFOOneSwitch.on = NO;
}
routingController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:routingController animated:YES];