-
Notifications
You must be signed in to change notification settings - Fork 421
CAStepper
Its functionality is similar with slider and supports fine tuning operation, including left and right part, stepper also is step-by-step, left part is plus, right part is minus.
CAControl
Access modifier |
Attribute name |
Description |
protected |
Continuous |
continuous trigger CAControlEventTouchValueChanged or not |
protected |
AutoRepeat |
support long-press to change value or not |
protected |
Wraps |
cycle between max and min value or not |
protected |
Value |
current stepper value |
protected |
MinValue |
min stepper value |
protected |
MaxValue |
max stepper value |
protected |
StepValue |
step-by-step value |
public |
BackgroundImage |
stepper background |
public |
IncrementImage |
added part’s background of right part |
public |
DecrementImage |
reduced part’s backgournd of left part |
public |
DividerImage |
divider of left and right part |
public |
TouchEffect |
start touch effect or not |
Access modifier |
Method name |
Description |
public |
addTarget |
callback event |
public |
removeTarget |
remove callback event |
Continuous
Type: bool
Descripiton: continuous trigger CAControlEventTouchValueChanged event or not when long pressing stepper, if we set it as false, then only trigger CAControlEventTouchValueChanged event after long-press ends, true by default, get/set{}.
AutoRepeat
Type: bool
Descripiton: whether to support long-press event to auto add or reduce event, true by default, support long-press event, get/set{}.
Wraps
Type: bool
Descripiton: whether to cycle between max and min value, if we set it as true, then when the value reachs min point, it will start to reduce from max point if it continue to reduce, and vice versa, get/set{}.
Value
Type: double
Descripiton: stepper current value, get/set{}.
MinValue
Type: double
Descripiton: min stepper value, get/set{}.
MaxValue
Type: double
Descripiton: max stepper value, get/set{}.
StepValue
Type: double
Descripiton: stepper’s step-by-step value, namely the added or reduced value of each time, get/set{}.
BackgroundImage
Type: CAImage*
Descripiton: stepper background, get/set{}.
IncrementImage
Type: CAImage*
Descripiton: right part background, get/set{}.
DecrementImage
Type: CAImage*
Descripiton: left part background, get/set{}.
DividerImage
Type: CAImage*
Descripiton: separator, get/set{}.
TouchEffect
Type: bool
Descripiton: start touch effect or not, false by default, get/set{}.
virtual void addTarget(CAObject target, SEL_CAControl selector)*
Return value: void
Parameter:
Type |
Parameter name |
Description |
CAObject* |
target |
current object |
SEL_CAControl |
selector |
function callback |
virtual void removeTarget (CAObject target, SEL_CAControl selector)*
Return value: void
Parameter:
Type |
Parameter name |
Description |
CAObject* |
target |
current object |
SEL_CAControl |
selector |
function callback |