public class UIImageView extends UIView
NoIntrinsicMetric| Constructor and Description |
|---|
UIImageView()
Constructs a default UIImageView object located at (0,0) with 0 weight
and 0 height.
|
UIImageView(CGRect rect)
Constructs a UIImageView object initialized with the dimensions and
position specified in the rect parameter.
|
| Modifier and Type | Method and Description |
|---|---|
List<UIImage> |
animationImages()
Returns the list of images that is used as an animation.
|
void |
didMoveToWindow()
Informs this view that its window changed.
|
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.
|
List<UIImage> |
highlightedAnimationImages()
Returns the list of images that is used as an animation when the view is
highlighted.
|
UIImage |
highlightedImage()
Returns the image that is displayed when this view is highlighted.
|
UIImage |
image()
Returns the image that is displayed in this image view.
|
boolean |
isAnimating()
Returns a Boolean that shows whether the animation is running.
|
boolean |
isHighlighted()
Returns a Boolean that shows whether the image is highlighted.
|
void |
setAnimationImages(List<UIImage> animationImages)
Sets a list of images to be used as an animation effect.
|
void |
setHighlighted(boolean highlighted)
Sets a Boolean that defines whether the image is highlighted.
|
void |
setHighlightedAnimationImages(List<UIImage> highlightedAnimationImages)
Sets a list of images to be used, when the view is highlighted, as an
animation effect.
|
void |
setHighlightedImage(UIImage highlightedImage)
Sets the image to be displayed when this view is highlighted.
|
void |
setImage(UIImage image)
Sets the image to be displayed in this image view.
|
CGSize |
sizeThatFits(CGSize size)
Returns a size for this view that fits the specified size in an optimal
way.
|
void |
startAnimating()
Starts animation of the images.
|
void |
stopAnimating()
Stops animation of the images.
|
void |
tintColorDidChange() |
void |
willMoveToWindow(UIWindow newWindow)
Informs this view that its window will change.
|
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, frame, gestureRecognizers, heightAnchor, hitTest, 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, sizeToFit, subviews, superview, tag, tintAdjustmentMode, tintColor, topAnchor, toString, trailingAnchor, transform, transitionWithView, translatesAutoresizingMaskIntoConstraints, updateConstraints, updateConstraintsIfNeeded, userInterfaceLayoutDirection, viewForFirstBaselineLayout, viewForLastBaselineLayout, widthAnchor, willMoveToSuperview, willRemoveSubview, windowbecomeFirstResponder, isFirstResponder, resignFirstResponder, touchesBegan, touchesCancelled, touchesEnded, touchesMovedaddObserver, observeValueForKeyPath, performSelector, performSelectorOnMainThread, release, removeObserver, removeObserver, retain, setValueForKey, setValueForUndefinedKey, valueForKey, valueForUndefinedKeypublic UIImageView()
public UIImageView(CGRect rect)
rect - CGRect that defines dimension and position of UIImageView.public void setImage(UIImage image)
image - The image to be displayed in this image view.public UIImage image()
public void setHighlightedImage(UIImage highlightedImage)
highlightedImage - The image to be displayed when this view is
highlighted.public UIImage highlightedImage()
public boolean isHighlighted()
public void setHighlighted(boolean highlighted)
highlighted - A Boolean that defines whether the image is
highlighted.public void startAnimating()
public void willMoveToWindow(UIWindow newWindow)
UIViewwillMoveToWindow in class UIViewnewWindow - The new window object of this view.Null parameter is
accepted.public void didMoveToWindow()
UIViewdidMoveToWindow in class UIViewpublic void stopAnimating()
public boolean isAnimating()
public void setAnimationImages(List<UIImage> animationImages)
animationImages - A list of images to be used as an animation
effect.public List<UIImage> animationImages()
public void setHighlightedAnimationImages(List<UIImage> highlightedAnimationImages)
highlightedAnimationImages - A list of images to be used, when the
view is highlighted, as an animation effect.public List<UIImage> highlightedAnimationImages()
public final void drawRect(CGRect rect)
UIViewpublic CGSize sizeThatFits(CGSize size)
UIViewsizeThatFits in class UIViewsize - The size for which the view should calculate its
optimal-fitting size.public void tintColorDidChange()
tintColorDidChange in class UIViewCopyright © 2020. All rights reserved.