iOS——UISwitch
来源:互联网 发布:orange软件下载 编辑:程序博客网 时间:2024/06/06 00:06
一、概述
1. UISwitch 是开发中常用的一个控件,较简单
2. UISwitch 控件的的长宽是默认不变的,也就是说,用 initWithFrame: 初始化时,不管传入的 frame 是多少,只会影响 x、y坐标,不会影响 width、height
二、属性
1. 设置开关开启时的颜色
@property(nullable,nonatomic, strong)UIColor *onTintColor;
2. 设置开关闭是时的边框颜色,当开关开启时,颜色全部变为开启时设置的颜色
@property(null_resettable,nonatomic, strong)UIColor *tintColor;
3. 设置开关的按钮颜色
@property(nullable,nonatomic, strong)UIColor *thumbTintColor;
4. 设置开关的开启状态;YES 为开启,NO 为关闭
@property(nonatomic,getter=isOn)BOOL on;
5. 设置开关的开启状态并设置动画效果
- (void)setOn:(BOOL)on animated:(BOOL)animated;
6. 设置开关的开启图片;在 iOS 7 中没有用
@property(nullable,nonatomic, strong)UIImage *onImage;
7. 设置开关的关闭图片;在 iOS 7 中没有用
@property(nullable,nonatomic, strong)UIImage *offImage;
0 0
- iOS——UISwitch
- ios系列UI篇——UISwitch
- UISwitch 开关控件—IOS开发
- UISwitch 开关控件—IOS开发
- UISwitch 开关控件—IOS开发
- UISwitch 开关控件—IOS开发
- UISwitch 开关控件—IOS开发
- UISwitch 开关控件—IOS开发
- iOS开发之基础视图— UISwitch
- iOS学习笔记-013.UISwitch——开关控件
- IOS开发之UI篇—UISwitch(开关按钮)
- iOS-UISwitch
- IOS UISwitch
- cocoa touch——UISwitch
- iOS开发——基本控件(UIButton,UILabel,UITextField,UISwitch,UISlider,UISegmentedControl)
- IOS之自定义UISwitch
- IOS之自定义UISwitch
- iOS 控件之 UISwitch
- 虚拟机内存
- js中typeof的用法详解
- java求两个数的最大公约数
- 【APIO2014T1】回文串-回文自动机(PAM)模板题
- 三维扫描仪[6]——常用软件及开发环境
- iOS——UISwitch
- Adobe Flash Builder 4.7破解方法(绝对可用)
- Intellij Idea 中Java文件太长导致无法识别问题
- 负载均衡1.5--案例(中)
- JS中对时间的基本操作测试
- 如何在Rancher Catalog中使用VMware Harbor
- 【OpenCV3】图像翻转——cv::flip()详解
- nginx之location
- 简单工厂模式