UISwitch
开关控件。通过 new UISwitch(frame) 创建(必须传入 frame 参数)。用 addTargetActionForControlEvents(self, 'switchAction:', 1<<12) 监听值变化(1<<12 为 ValueChanged)。
实例成员 (Instance members)
Section titled “实例成员 (Instance members)”属性(常用)
Section titled “属性(常用)”| 属性 | 类型 | 说明 |
|---|---|---|
on | boolean | 是否开启。 |
类成员 (Class members)
Section titled “类成员 (Class members)”当前运行时未额外暴露 UISwitch 的类成员。
- UIControl(同属 Control,绑定方式类似)