UISwitch
2015-09-24 19:16
489 查看
switch有一个属性on 是一个bool类型 表示当前开关的状态 YES为开NO为关
UISwitch 只能响应UIControlEventValueChanged事件
定制UISwitch
设置镂空颜色 这个设置之后可以看到switch 周围变成黄色
sw.tintColor = [UIColor yellowColor];
设置滑块颜色
sw.thumbTintColor = [UIColor magentaColor];
设置当前状态
sw.on = YES;
UISwitch 只能响应UIControlEventValueChanged事件
定制UISwitch
设置镂空颜色 这个设置之后可以看到switch 周围变成黄色
sw.tintColor = [UIColor yellowColor];
设置滑块颜色
sw.thumbTintColor = [UIColor magentaColor];
设置当前状态
sw.on = YES;
相关文章推荐
- UICollectionViewFlowLayout 设置九宫格的大小间距
- UI_UIScrollView(滚动视图)的图文理解
- 关于MIUI悬浮窗权限问题的解决方案的一点补充
- simplified build configuration
- UI - UIPageControl
- UI - UIScrollView
- SimpleGUICS2Pygame替代simplegui_经验分享
- 前后台使用ajax传list的时候,用value[] 获取值
- UITableView性能-圆角图片
- UI - UIImageViewAndSlider
- Run as ant build每次都执行两次-问题解决
- UI - UISegmentedControl
- apue-intro
- UI - UIImageViewAndUISwipeGestureRecognizer
- UI - Delegate模式
- easyui表单验证easyui-validatebox
- ZOJ.2481 Unique Ascending Array【子集】 2015/09/24
- 设计模式 - 建造者模式(Builder)
- UITableView 频繁刷新 闪屏现象及解决方法
- UI - TargetAction模式