AppleImageView - UBogun/Xojo-iosLib GitHub Wiki

Inherits from AppleView
Memory leak check: not yet done.
Status: completed.

This is an implementation of UIImageView, a UIView subclass made for handling images. Unlike the Xojo iOSImageView which is the Xojo representative of this class, UIImageView features properties for highlighted images (which means images to display in highlighted state) and animation images for both states in form of an array of UIImages.

The DrawRect event of UIView is not available here.
A UIImageView does not respond to user events unless you set UserInteractionEnabled to True.

General information

UIVIew Basics

Xojo integration

Many of the properties and methods built into AppleImageView are forwarded transparently and converted to Xojo classes by the iOSimageViewExtension of iOSLib that integrates into each Xojo iosImageView. See the remarks about integration in the AppleView class too.
For full access to events too, use the iOSLibImageView custom control.

Constructors

Constructor (anImage As AppleImage / iOSImage): Creates an ImageView with the dimensions and content of the passed image.

Constructor (anImage As AppleImage / iOSImage, HighLightedimage As AppleImage / iOSImage): Creates an ImageView with the dimensions and content of the passed image and the corresponding highlightedImage.

Properties

Animating As Boolean (read-only): True when the view plays an animation.

AnimationDuration As Double: The amount of time in seconds it takes to go through one cycle of the images.

AnimationImages As AppleArray Of AppleImages: An array of UIImage objects to use for an animation.

AnimationRepeatCount As Integer: The number of times to repeat the animation.

Highlighted As Boolean: Determines whether the image is highlighted.

HighlightedAnimationImages As AppleArray Of AppleImages: An array of UIImage objects to use for an animation when the control is in highlighted state.

HighlightedImage As AppleImage: The highlighted image displayed in the image view.

Image As AppleImage: The image displayed in the image view.

Methods

StartAnimating(): Starts animating the images in the control with the first image.

StopAnimating(): Stops animating the images in the control.

Events

All the events inherited from AppleView are available, with the exception of DrawRect.