UISwitch 设置颜色和大小

// 显示的颜色
_switch0.onTintColor = [UIColor colorWithRed:0.984 green:0.478 blue:0.224 alpha:1.000];
// 控件大小,不能设置frame,设置UISwitch的frame大小不管用,只能用缩放比例,
_switch0.transform = CGAffineTransformMakeScale(0.75, 0.75);

你可能感兴趣的:(UISwitch 设置颜色和大小)