public class UIControl extends UIView
NoIntrinsicMetric
Constructor and Description |
---|
UIControl()
Constructs a default UIControl object located at (0,0) with 0 weight and
0 height.
|
UIControl(CGRect rect)
Constructs a UIControl object initialized with the dimensions and
position specified in the rect parameter.
|
Modifier and Type | Method and Description |
---|---|
void |
addTarget(UIControlDelegate delegate,
int UIControlEvents)
Relates the specified UIControlEvents with the corresponding delegate.
|
Set<UIControlDelegate> |
allTargets()
Returns all the objects that relate to with this control.
|
int |
contentHorizontalAlignment()
Returns an integer that represents the horizontal alignment of the
content within the control.
|
int |
contentVerticalAlignment()
Returns an integer that represents the vertical alignment of the content
within the control.
|
UIView |
hitTest(CGPoint point,
UIEvent event)
Return the view that contains the point parameter and is remotest one in
the view hierarchy tree.
|
boolean |
isEnabled()
Returns a Boolean that shows whether the control is enabled or not.
|
boolean |
isHighlighted()
Returns a Boolean that shows whether the control is highlighted or not.
|
boolean |
isSelected()
Returns a Boolean that shows whether this control is in selected state.
|
void |
removeTarget(UIControlDelegate delegate,
int UIControlEvents) |
void |
sendActionsForControlEvents(int UIControlEvents)
Send evens for this control for the provided event mask
|
void |
setContentHorizontalAlignment(int UIControlContentHorizontalAlignment)
Sets an integer that represents the horizontal alignment of the content
within the control.
|
void |
setContentVerticalAlignment(int contentVerticalAlignment)
Sets an integer that represents the vertical alignment of the content
within the control.
|
void |
setEnabled(boolean enabled)
Sets a Boolean that defines whether the control is enabled or not.
|
void |
setHighlighted(boolean highlighted)
Sets the control to highlighted state according to the Boolean parameter.
|
void |
setSelected(boolean selected)
Sets this control to selected state or not according to Boolean
parameter.
|
int |
state()
Returns an integer that represents the state of the control.
|
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.
|
accessibilityIdentifier, 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, drawRect, 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, window
becomeFirstResponder, isFirstResponder, resignFirstResponder
addObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKey
public UIControl()
public UIControl(CGRect rect)
rect
- CGRect that defines dimension and position of UIControlpublic boolean isSelected()
public void setSelected(boolean selected)
selected
- A Boolean that defines whether this control is in
selected state.public void addTarget(UIControlDelegate delegate, int UIControlEvents)
delegate
- The delegate handing the event.UIControlEvents
- The event associated to the delegate.public void removeTarget(UIControlDelegate delegate, int UIControlEvents)
public Set<UIControlDelegate> allTargets()
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- A Boolean that defines whether the control is enabled or
not.public UIView hitTest(CGPoint point, UIEvent event)
UIView
public boolean isHighlighted()
public void setHighlighted(boolean highlighted)
highlighted
- A Boolean that defines whether the control is
highlighted or not.public int contentHorizontalAlignment()
public void setContentHorizontalAlignment(int UIControlContentHorizontalAlignment)
UIControlContentHorizontalAlignment
- An integer that represents the
horizontal alignment of the content within the control.public int contentVerticalAlignment()
public void setContentVerticalAlignment(int contentVerticalAlignment)
contentVerticalAlignment
- An integer that represents the vertical
alignment of the content within the control.public int state()
UIControlState
public void sendActionsForControlEvents(int UIControlEvents)
UIControlEvents
- The bit-mask of the events to send, as defined in UIControlEvents
public void touchesBegan(Set<UITouch> touches, UIEvent event)
UIResponder
touchesBegan
in class UIResponder
touches
- 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)
UIResponder
touchesMoved
in class UIResponder
touches
- 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)
UIResponder
touchesEnded
in class UIResponder
touches
- 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)
UIResponder
touchesCancelled
in class UIResponder
touches
- The set touches to which the touch belongs.event
- The event to which the touches belong.Copyright © 2020. All rights reserved.