UISwitch旧版本

时间:2013-02-06 06:48:47

标签: iphone ios ipad uiswitch

想要将此类切换添加到我的应用程序而不是圆角。因为从iOS 5.0开始不可用。

1 个答案:

答案 0 :(得分:1)

Use this link of source code 获取Square Switch 并使用

创建
TSwitch *switch = [[TTSwitch alloc] initWithFrame:(CGRect){ CGPointZero, { 76.0f, 27.0f } }];
switch.trackImage = [UIImage imageNamed:@"square-switch-track"];
switch.thumbOffsetY = -3.0f;
相关问题