public class UISlider extends UIControl
NoIntrinsicMetric| Constructor and Description |
|---|
UISlider()
Constructs a default slider object located at (0,0) with 0 weight and 0
height.
|
UISlider(CGRect rect)
Constructs a slider object initialized with the dimensions and position
specified in the frame parameter.
|
| Modifier and Type | Method and Description |
|---|---|
UIImage |
currentMaximumTrackImage()
Returns the maximum track image that is currently used.
|
UIImage |
currentMinimumTrackImage()
Returns the current minimum track image
|
UIImage |
currentThumbImage()
Returns the thumb image that is associated with the current active
control state.
|
void |
drawRect(CGRect rect)
This method is implicitly called when a view is first displayed or when
an event occurs that invalidates a visible part of the view and the view
needs to be redrawn.
|
boolean |
isContinuous()
Returns a Boolean that shows whether change of the slider value causes
immediate update event.
|
UIImage |
maximumTrackImageForState(int UIControlState)
Returns the maximum track image that is used in the specified control
state.
|
UIColor |
maximumTrackTintColor()
Returns the color of standard maximum track images.
|
float |
maximumValue()
Returns the maximum value of the control.
|
UIImage |
maximumValueImage()
Returns the image that is depicted on the side of the slider and
represents the maximum value of the control.
|
UIImage |
minimumTrackImageForState(int UIControlState)
Returns the minimum track image that is used in the specified control
state.
|
UIColor |
minimumTrackTintColor()
Returns the color of track images.
|
float |
minimumValue()
Returns the minimum value of the control.
|
UIImage |
minimumValueImage()
Returns the image that is depicted on the side of the slider and
represents the minimum value of the control.
|
void |
setContinuous(boolean continuous)
Sets a Boolean that shows whether change of the slider value causes
immediate update event.
|
void |
setMaximumTrackImage(UIImage image,
int UIControlState)
Sets the specified maximum thumb image to be used in the specified
control state.
|
void |
setMaximumTrackTintColor(UIColor maximumTrackTintColor)
Sets the color of standard maximum track images.
|
void |
setMaximumValue(float max)
Sets the maximum value of the control.
|
void |
setMaximumValueImage(UIImage maximumValueImage)
Sets the image that will be depicted on the side of the slider and
represents the maximum value of the control.
|
void |
setMinimumTrackImage(UIImage image,
int UIControlState)
Sets the specified minimum thumb image to be used in the specified
control state.
|
void |
setMinimumTrackTintColor(UIColor minimumTrackTintColor)
Sets the color of standard minimum track images.
|
void |
setMinimumValue(float min)
Sets the minimum value of the control.
|
void |
setMinimumValueImage(UIImage minimumValueImage)
Sets the image that will be depicted on the side of the slider and
represents the minimum value of the control.
|
void |
setThumbImage(UIImage image,
int UIControlState)
Sets the specified thumb image to be used in the specified control state.
|
void |
setThumbTintColor(UIColor thumbTintColor)
Sets the color of the thumb images.
|
void |
setValue(float val)
Sets the current value for the control.
|
void |
setValue(float val,
boolean animated)
Sets the current value of the control using animation or not.
|
UIImage |
thumbImageForState(int UIControlState)
Returns the thumb image for the specified control state.
|
UIColor |
thumbTintColor()
Returns the color of the thumb images.
|
void |
touchesBegan(Set<UITouch> touches,
UIEvent event)
Sent to this responder when one or more fingers touched the screen.
|
void |
touchesCancelled(Set<UITouch> touches,
UIEvent event)
Sent to this responder when touch event has been canceled.
|
void |
touchesEnded(Set<UITouch> touches,
UIEvent event)
Sent to this responder when one or more fingers were lifted from the
screen.
|
void |
touchesMoved(Set<UITouch> touches,
UIEvent event)
Sent to this responder when one or more fingers move on the screen.
|
float |
value()
Returns the current value of the control.
|
addTarget, allTargets, contentHorizontalAlignment, contentVerticalAlignment, hitTest, isEnabled, isHighlighted, isSelected, removeTarget, sendActionsForControlEvents, setContentHorizontalAlignment, setContentVerticalAlignment, setEnabled, setHighlighted, setSelected, stateaccessibilityIdentifier, addConstraint, addConstraints, addGestureRecognizer, addLayoutGuide, addSubview, alpha, animateWithDuration, animateWithDuration, animateWithDuration, areAnimationsEnabled, autoresizesSubviews, autoresizingMask, backgroundColor, bottomAnchor, bounds, bringSubviewToFront, center, centerXAnchor, centerYAnchor, clipsToBounds, constraints, contentCompressionResistancePriorityForAxis, contentHuggingPriorityForAxis, contentMode, convertPointFromView, convertPointToView, convertRectFromView, convertRectToView, didAddSubview, didMoveToSuperview, didMoveToWindow, frame, gestureRecognizers, heightAnchor, insertSubview, insetsLayoutMarginsFromSafeArea, intrinsicContentSize, invalidateIntrinsicContentSize, isHidden, isMultipleTouchEnabled, isOpaque, isUserInteractionEnabled, layer, layoutIfNeeded, layoutMargins, layoutMarginsDidChange, layoutMarginsGuide, layoutSubviews, leadingAnchor, leftAnchor, maskView, needsUpdateConstraints, nextResponder, overrideUserInterfaceStyle, pointInside, preservesSuperviewLayoutMargins, removeConstraint, removeConstraints, removeFromSuperview, removeGestureRecognizer, removeLayoutGuide, requiresConstraintBasedLayout, restorationIdentifier, rightAnchor, safeAreaInsets, safeAreaLayoutGuide, sendSubviewToBack, setAccessibilityIdentifier, setAlpha, setAnimationBeginsFromCurrentState, setAnimationCurve, setAnimationDelay, setAnimationDuration, setAnimationRepeatAutoreverses, setAnimationRepeatCount, setAnimationsEnabled, setAnimationStartDate, setAutoresizesSubviews, setAutoresizingMask, setBackgroundColor, setBounds, setCenter, setClearsContextBeforeDrawing, setClipsToBounds, setContentCompressionResistancePriority, setContentHuggingPriority, setContentMode, setFrame, setGestureRecognizers, setHidden, setInsetsLayoutMarginsFromSafeArea, setLayoutMargins, setMaskView, setMultipleTouchEnabled, setNeedsDisplay, setNeedsLayout, setNeedsUpdateConstraints, setOpaque, setOverrideUserInterfaceStyle, setPreservesSuperviewLayoutMargins, setRestorationIdentifier, setTag, setTintAdjustmentMode, setTintColor, setTransform, setTranslatesAutoresizingMaskIntoConstraints, setUserInteractionEnabled, sizeThatFits, sizeToFit, subviews, superview, tag, tintAdjustmentMode, tintColor, tintColorDidChange, topAnchor, toString, trailingAnchor, transform, transitionWithView, translatesAutoresizingMaskIntoConstraints, updateConstraints, updateConstraintsIfNeeded, userInterfaceLayoutDirection, viewForFirstBaselineLayout, viewForLastBaselineLayout, widthAnchor, willMoveToSuperview, willMoveToWindow, willRemoveSubview, windowbecomeFirstResponder, isFirstResponder, resignFirstResponderaddObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKeypublic UISlider()
public UISlider(CGRect rect)
rect - CGRect that defines dimension and position of the slider.public void touchesBegan(Set<UITouch> touches, UIEvent event)
UIRespondertouchesBegan in class UIControltouches - The set touches to which the touch or touches belongs.event - The event to which the touches belong.public void touchesMoved(Set<UITouch> touches, UIEvent event)
UIRespondertouchesMoved in class UIControltouches - The set touches to which the touch or touches belongs.event - The event to which the touches belong.public void touchesEnded(Set<UITouch> touches, UIEvent event)
UIRespondertouchesEnded in class UIControltouches - The set touches to which the touch or touches belongs.event - The event to which the touches belong.public void touchesCancelled(Set<UITouch> touches, UIEvent event)
UIRespondertouchesCancelled in class UIControltouches - The set touches to which the touch belongs.event - The event to which the touches belong.public void setValue(float val)
val - The current value for the control.public void setValue(float val,
boolean animated)
val - The current value for the control.animated - TRUE if animation will be used for the change.public float value()
public void setMinimumValue(float min)
min - The minimum value of the control.public float minimumValue()
public void setMaximumValue(float max)
max - The maximum value of the control.public float maximumValue()
public boolean isContinuous()
public void setContinuous(boolean continuous)
continuous - TRUE means immediate continuous updates.public UIImage maximumValueImage()
public void setMaximumValueImage(UIImage maximumValueImage)
maximumValueImage - The image that will be depicted on the side of
the slider and represents the maximum value of the control.public UIImage minimumValueImage()
public void setMinimumValueImage(UIImage minimumValueImage)
minimumValueImage - The image that will be depicted on the side of
the slider and represents the minimum value of the control.public UIImage currentMinimumTrackImage()
public UIImage minimumTrackImageForState(int UIControlState)
UIControlState - The control state for which the image is requested.public void setMinimumTrackImage(UIImage image, int UIControlState)
image - The specified minimum thumb image to be used in the
specified control state.UIControlState - The control state associated with the image.public UIImage currentMaximumTrackImage()
public UIImage maximumTrackImageForState(int UIControlState)
UIControlState - The control state for which the image is requested.public void setMaximumTrackImage(UIImage image, int UIControlState)
image - The specified maximum thumb image to be used in the
specified control state.UIControlState - The control state associated with the image.public UIImage currentThumbImage()
public UIImage thumbImageForState(int UIControlState)
UIControlState - The control state for which the image is requested.public void setThumbImage(UIImage image, int UIControlState)
image - The thumb image to be used in the specified control state.UIControlState - The control state associated with the image.public UIColor minimumTrackTintColor()
public void setMinimumTrackTintColor(UIColor minimumTrackTintColor)
minimumTrackTintColor - The color of standard minimum track images.public UIColor maximumTrackTintColor()
public void setMaximumTrackTintColor(UIColor maximumTrackTintColor)
maximumTrackTintColor - The color of standard maximum track images.public UIColor thumbTintColor()
public void setThumbTintColor(UIColor thumbTintColor)
thumbTintColor - The color of the thumb images.Copyright © 2020. All rights reserved.