-
Notifications
You must be signed in to change notification settings - Fork 421
CASwitch
switch control that is able to implement similarly switch effect.
CAControl
Access modifier |
Attribute name |
Description |
protected |
OnImage |
switch image in on condition |
protected |
OffImage |
switch image in off condition |
protected |
ThumTintImage |
switch’s background image |
protected |
On |
switch is in on condition or not |
Access modifier |
Method name |
Description |
public |
addTarget |
add click event |
public |
removeTarget |
remove click event |
OnImage
Type: CAImage*
Descripiton: image in on condition, get/set{}.
OffImage
Type: CAImage*
Descripiton: image in off condition, get/set{}.
ThumTintImage
Type: CAImage*
Descripiton: background image, get/set{}.
On
Type: bool
Descripiton: read-only property, it’s used to judge switch button is in on condition or not.
void addTarget(CAObject target, SEL_CAControl selector)*
Return value: void
Type |
Parameter name |
Description |
CAObject* |
target |
current object |
SEL_CAControl |
selector |
function callback |
void removeTarget(CAObject target, SEL_CAControl selector)*
Return value: void
Descripiton: remove switch’s click event