Class: UIStepper

Inherits:
UIControl show all

Overview

A stepper control provides a user interface for incrementing or decrementing a value.

Instance Attribute Summary (collapse)

Attributes inherited from UIControl

#contentHorizontalAlignment, #contentVerticalAlignment, #enabled, #highlighted, #selected, #state, #touchInside, #tracking

Attributes inherited from UIView

#alpha, #autoresizesSubviews, #autoresizingMask, #backgroundColor, #bounds, #center, #clearsContextBeforeDrawing, #clipsToBounds, #contentMode, #contentScaleFactor, #exclusiveTouch, #frame, #gestureRecognizers, #hidden, #layer, #multipleTouchEnabled, #opaque, #restorationIdentifier, #subviews, #superview, #tag, #transform, #userInteractionEnabled, #window

Attributes inherited from UIResponder

#inputAccessoryView, #inputView, #undoManager

Instance Method Summary (collapse)

Methods inherited from UIControl

#actionsForTarget:forControlEvent:, #addTarget:action:forControlEvents:, #allControlEvents, #allTargets, #beginTrackingWithTouch:withEvent:, #cancelTrackingWithEvent:, #continueTrackingWithTouch:withEvent:, #endTrackingWithTouch:withEvent:, #removeTarget:action:forControlEvents:, #sendAction:to:forEvent:, #sendActionsForControlEvents:

Methods inherited from UIView

#addConstraint:, #addConstraints:, #addGestureRecognizer:, #addSubview:, #alignmentRectForFrame:, #alignmentRectInsets, animateWithDuration:animations:, animateWithDuration:animations:completion:, animateWithDuration:delay:options:animations:completion:, areAnimationsEnabled, beginAnimations:context:, #bringSubviewToFront:, commitAnimations, #constraints, #constraintsAffectingLayoutForAxis:, #contentCompressionResistancePriorityForAxis:, #contentHuggingPriorityForAxis:, #convertPoint:fromView:, #convertPoint:toView:, #convertRect:fromView:, #convertRect:toView:, #decodeRestorableStateWithCoder:, #didAddSubview:, #didMoveToSuperview, #didMoveToWindow, #drawRect:, #drawRect:forViewPrintFormatter:, #encodeRestorableStateWithCoder:, #endEditing:, #exchangeSubviewAtIndex:withSubviewAtIndex:, #exerciseAmbiguityInLayout, #frameForAlignmentRect:, #gestureRecognizerShouldBegin:, #hasAmbiguousLayout, #hitTest:withEvent:, #initWithFrame:, #insertSubview:aboveSubview:, #insertSubview:atIndex:, #insertSubview:belowSubview:, #intrinsicContentSize, #invalidateIntrinsicContentSize, #isDescendantOfView:, layerClass, #layoutIfNeeded, #layoutSubviews, #needsUpdateConstraints, #pointInside:withEvent:, #removeConstraint:, #removeConstraints:, #removeFromSuperview, #removeGestureRecognizer:, requiresConstraintBasedLayout, #sendSubviewToBack:, setAnimationBeginsFromCurrentState:, setAnimationCurve:, setAnimationDelay:, setAnimationDelegate:, setAnimationDidStopSelector:, setAnimationDuration:, setAnimationRepeatAutoreverses:, setAnimationRepeatCount:, setAnimationStartDate:, setAnimationTransition:forView:cache:, setAnimationWillStartSelector:, setAnimationsEnabled:, #setContentCompressionResistancePriority:forAxis:, #setContentHuggingPriority:forAxis:, #setNeedsDisplay, #setNeedsDisplayInRect:, #setNeedsLayout, #setNeedsUpdateConstraints, #setTranslatesAutoresizingMaskIntoConstraints:, #sizeThatFits:, #sizeToFit, #systemLayoutSizeFittingSize:, transitionFromView:toView:duration:options:completion:, transitionWithView:duration:options:animations:completion:, #translatesAutoresizingMaskIntoConstraints, #updateConstraints, #updateConstraintsIfNeeded, #viewForBaselineLayout, #viewPrintFormatter, #viewWithTag:, #willMoveToSuperview:, #willMoveToWindow:, #willRemoveSubview:

Methods inherited from UIResponder

#becomeFirstResponder, #canBecomeFirstResponder, #canPerformAction:withSender:, #canResignFirstResponder, #isFirstResponder, #motionBegan:withEvent:, #motionCancelled:withEvent:, #motionEnded:withEvent:, #nextResponder, #reloadInputViews, #remoteControlReceivedWithEvent:, #resignFirstResponder, #touchesBegan:withEvent:, #touchesCancelled:withEvent:, #touchesEnded:withEvent:, #touchesMoved:withEvent:

Methods inherited from NSObject

#!, #!=, #!~, #<=>, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Instance Attribute Details

- (Boolean) autorepeat

The automatic vs. nonautomatic repeat state of the stepper. If YES, the user pressing and holding on the stepper repeatedly alters value.The default value for this property is YES.

Returns:

  • (Boolean)

- (Boolean) continuous

The continuous vs. noncontinuous state of the stepper. If YES, value change events are sent immediately when the value changes during user interaction. If NO, a value change event is sent when user interaction ends.The default value for this property is YES.

Returns:

  • (Boolean)

- (Float) maximumValue

The highest possible numeric value for the stepper. Must be numerically greater than minimumValue. If you attempt to set a value equal to or lower than minimumValue, the system raises an NSInvalidArgumentException exception.The default value of this property is 100.

Returns:

- (Float) minimumValue

The lowest possible numeric value for the stepper. Must be numerically less than maximumValue. If you attempt to set a value equal to or greater than maximumValue, the system raises an NSInvalidArgumentException exception.The default value for this property is 0.

Returns:

- (Float) stepValue

The step, or increment, value for the stepper. Must be numerically greater than 0. If you attempt to set this property’s value to 0 or to a negative number, the system raises an NSInvalidArgumentException exception.The default value for this property is 1.

Returns:

- (UIColor) tintColor

The tint color for the stepper control. The value of this property is nil by default.

Returns:

- (Float) value

The numeric value of the stepper. When the value changes, the stepper sends the UIControlEventValueChanged flag to its target (see addTarget:action:forControlEvents:). Refer to the description of the continuous property for information about whether value change events are sent continuously or when user interaction ends.The default value for this property is 0. This property is clamped at its lower extreme to minimumValue and is clamped at its upper extreme to maximumValue.

Returns:

- (Boolean) wraps

The wrap vs. no-wrap state of the stepper. If YES, incrementing beyond maximumValue sets value to minimumValue; likewise, decrementing below minimumValue sets value to maximumValue. If NO, the stepper does not increment beyond maximumValue nor does it decrement below minimumValue but rather holds at those values.The default value for this property is NO.

Returns:

  • (Boolean)

Instance Method Details

- (UIImage) backgroundImageForState(state)

Returns the background image associated with the specified control state.

Parameters:

  • state (UIControlState)

    The control state in which the image is displayed.

Returns:

  • (UIImage)

    The background image used by the control when it is in the specified state.

- (UIImage) decrementImageForState(state)

Returns the image used for the decrement glyph of the control.

Parameters:

  • state (UIControlState)

    The control state in which the image is displayed.

Returns:

  • (UIImage)

    The image used for the decrement glyph of the control.

- (UIImage) dividerImageForLeftSegmentState(leftState, rightSegmentState:rightState)

Returns the divider image for the given combination of left and right states.

Parameters:

  • leftState (UIControlState)

    The state of the left side of the control.

  • rightState (UIControlState)

    The state of the right side of the control.

Returns:

  • (UIImage)

    The image used for the specified combination of left and right states.

- (UIImage) incrementImageForState(state)

Returns the image used for the increment glyph of the control.

Parameters:

  • state (UIControlState)

    The control state in which the image is displayed.

Returns:

  • (UIImage)

    The image used for the increment glyph of the control.

- (Object) setBackgroundImage(image, forState:state)

Sets the background image for the control when it is in the specified state. For good results, image must be a stretchable image.

Parameters:

  • image (UIImage)

    The background image to use for the specified state.

  • state (UIControlState)

    The control state in which you want to display the image.

Returns:

- (Object) setDecrementImage(image, forState:state)

Sets the image to use for the decrement glyph of the control. The image you specify is composited on top of the control’s background to create the final control. If you do not specify a custom image, a minus (-) glyph is used.

Parameters:

  • image (UIImage)

    The image to use for the decrement glyph.

  • state (UIControlState)

    The control state in which you want to display the image.

Returns:

- (Object) setDividerImage(image, forLeftSegmentState:leftState, rightSegmentState:rightState)

Sets the image to use for the given combination of left and right states.

Parameters:

  • image (UIImage)

    The divider image to use.

  • leftState (UIControlState)

    The state of the left side of the control.

  • rightState (UIControlState)

    The state of the right side of the control.

Returns:

- (Object) setIncrementImage(image, forState:state)

Sets the image to use for the increment glyph of the control The image you specify is composited on top of the control’s background to create the final control. If you do not specify a custom image, a plus (+) glyph is used.

Parameters:

  • image (UIImage)

    The image to use for the increment glyph.

  • state (UIControlState)

    The control state.

Returns: