首页 > 代码库 > 更改UISwitch大小

更改UISwitch大小

UISwitch大小总是改不了...找了一个简便方法.

?mySwitch = [[UISwitch alloc] initWithFrame: CGRectMake( width - 55, height * .5 - 15, 100, 20)];
            [mySwitch setOn: YES animated: YES];
            mySwitch.transform = CGAffineTransformMakeScale( .75, .75);
            mySwitch.onTintColor = RGBACOLOR( 99, 155, 0, 1);?