ios-UISwitch常用属性设置

  • UISwitch常用属性使用如下(未完,待补充......)
// 设置switch开关默认为开
        [notificationSwitch setOn:YES];
        // 设置switch开关打开时显示的颜色
        notificationSwitch.onTintColor = [UIColor colorWithHexString:@"#1A9FF7"];
        // 设置关闭状态是,边边线条的颜色,也是关闭时过渡动画的颜色
        notificationSwitch.tintColor = [UIColor colorWithHexString:@"#1A9FF7"];

你可能感兴趣的:(ios-UISwitch常用属性设置)