Tuya iOS Smart Life App SDK 5.15.0
<ThingEncryptAnimatedImage> Protocol Reference

#import <ThingEncryptAnimatedImageView.h>

Inheritance diagram for <ThingEncryptAnimatedImage>:
ThingEncryptDynamicImage ThingEncryptDynamicImage ThingEncryptDynamicImage ThingEncryptDynamicImage ThingEncryptFrameImage ThingEncryptFrameImage ThingEncryptFrameImage ThingEncryptFrameImage ThingEncryptSpriteSheetImage ThingEncryptSpriteSheetImage ThingEncryptSpriteSheetImage ThingEncryptSpriteSheetImage

Instance Methods

(NSUInteger) - animatedImageFrameCount
 
(NSUInteger) - animatedImageLoopCount
 Animation loop count, 0 means infinite looping. More...
 
(NSUInteger) - animatedImageBytesPerFrame
 Bytes per frame (in memory). It may used to optimize memory buffer size. More...
 
(nullable UIImage *) - animatedImageFrameAtIndex:
 
(NSTimeInterval) - animatedImageDurationAtIndex:
 
(CGRect) - animatedImageContentsRectAtIndex:
 
(NSUInteger) - animatedImageFrameCount
 
(NSUInteger) - animatedImageLoopCount
 Animation loop count, 0 means infinite looping. More...
 
(NSUInteger) - animatedImageBytesPerFrame
 Bytes per frame (in memory). It may used to optimize memory buffer size. More...
 
(nullable UIImage *) - animatedImageFrameAtIndex:
 
(NSTimeInterval) - animatedImageDurationAtIndex:
 
(CGRect) - animatedImageContentsRectAtIndex:
 
(NSUInteger) - animatedImageFrameCount
 
(NSUInteger) - animatedImageLoopCount
 Animation loop count, 0 means infinite looping. More...
 
(NSUInteger) - animatedImageBytesPerFrame
 Bytes per frame (in memory). It may used to optimize memory buffer size. More...
 
(nullable UIImage *) - animatedImageFrameAtIndex:
 
(NSTimeInterval) - animatedImageDurationAtIndex:
 
(CGRect) - animatedImageContentsRectAtIndex:
 
(NSUInteger) - animatedImageFrameCount
 
(NSUInteger) - animatedImageLoopCount
 Animation loop count, 0 means infinite looping. More...
 
(NSUInteger) - animatedImageBytesPerFrame
 Bytes per frame (in memory). It may used to optimize memory buffer size. More...
 
(nullable UIImage *) - animatedImageFrameAtIndex:
 
(NSTimeInterval) - animatedImageDurationAtIndex:
 
(CGRect) - animatedImageContentsRectAtIndex:
 

Detailed Description

The ThingEncryptAnimatedImage protocol declares the required methods for animated image display with ThingEncryptAnimatedImageView.

Subclass a UIImage and implement this protocol, so that instances of that class can be set to ThingEncryptAnimatedImageView.image or ThingEncryptAnimatedImageView.highlightedImage to display animation.

Definition at line 21 of file ThingEncryptAnimatedImageView.h.

Method Documentation

◆ animatedImageBytesPerFrame [1/4]

- (NSUInteger) animatedImageBytesPerFrame
required

Bytes per frame (in memory). It may used to optimize memory buffer size.

◆ animatedImageBytesPerFrame [2/4]

- (NSUInteger) animatedImageBytesPerFrame
required

Bytes per frame (in memory). It may used to optimize memory buffer size.

◆ animatedImageBytesPerFrame [3/4]

- (NSUInteger) animatedImageBytesPerFrame
required

Bytes per frame (in memory). It may used to optimize memory buffer size.

◆ animatedImageBytesPerFrame [4/4]

- (NSUInteger) animatedImageBytesPerFrame
required

Bytes per frame (in memory). It may used to optimize memory buffer size.

◆ animatedImageContentsRectAtIndex: [1/4]

- (CGRect) animatedImageContentsRectAtIndex: (NSUInteger)  index
optional

A rectangle in image coordinates defining the subrectangle of the image that will be displayed. The rectangle should not outside the image's bounds. It may used to display sprite animation with a single image (sprite sheet).

◆ animatedImageContentsRectAtIndex: [2/4]

- (CGRect) animatedImageContentsRectAtIndex: (NSUInteger)  index
optional

A rectangle in image coordinates defining the subrectangle of the image that will be displayed. The rectangle should not outside the image's bounds. It may used to display sprite animation with a single image (sprite sheet).

◆ animatedImageContentsRectAtIndex: [3/4]

- (CGRect) animatedImageContentsRectAtIndex: (NSUInteger)  index
optional

A rectangle in image coordinates defining the subrectangle of the image that will be displayed. The rectangle should not outside the image's bounds. It may used to display sprite animation with a single image (sprite sheet).

◆ animatedImageContentsRectAtIndex: [4/4]

- (CGRect) animatedImageContentsRectAtIndex: (NSUInteger)  index
optional

A rectangle in image coordinates defining the subrectangle of the image that will be displayed. The rectangle should not outside the image's bounds. It may used to display sprite animation with a single image (sprite sheet).

◆ animatedImageDurationAtIndex: [1/4]

- (NSTimeInterval) animatedImageDurationAtIndex: (NSUInteger)  index
required

Returns the frames's duration from a specified index.

Parameters
indexFrame index (zero based).

◆ animatedImageDurationAtIndex: [2/4]

- (NSTimeInterval) animatedImageDurationAtIndex: (NSUInteger)  index
required

Returns the frames's duration from a specified index.

Parameters
indexFrame index (zero based).

◆ animatedImageDurationAtIndex: [3/4]

- (NSTimeInterval) animatedImageDurationAtIndex: (NSUInteger)  index
required

Returns the frames's duration from a specified index.

Parameters
indexFrame index (zero based).

◆ animatedImageDurationAtIndex: [4/4]

- (NSTimeInterval) animatedImageDurationAtIndex: (NSUInteger)  index
required

Returns the frames's duration from a specified index.

Parameters
indexFrame index (zero based).

◆ animatedImageFrameAtIndex: [1/4]

- (nullable UIImage *) animatedImageFrameAtIndex: (NSUInteger)  index
required

Returns the frame image from a specified index. This method may be called on background thread.

Parameters
indexFrame index (zero based).

◆ animatedImageFrameAtIndex: [2/4]

- (nullable UIImage *) animatedImageFrameAtIndex: (NSUInteger)  index
required

Returns the frame image from a specified index. This method may be called on background thread.

Parameters
indexFrame index (zero based).

◆ animatedImageFrameAtIndex: [3/4]

- (nullable UIImage *) animatedImageFrameAtIndex: (NSUInteger)  index
required

Returns the frame image from a specified index. This method may be called on background thread.

Parameters
indexFrame index (zero based).

◆ animatedImageFrameAtIndex: [4/4]

- (nullable UIImage *) animatedImageFrameAtIndex: (NSUInteger)  index
required

Returns the frame image from a specified index. This method may be called on background thread.

Parameters
indexFrame index (zero based).

◆ animatedImageFrameCount [1/4]

- (NSUInteger) animatedImageFrameCount
required

Total animated frame count. If the frame count is less than 1, then the methods below will be ignored.

◆ animatedImageFrameCount [2/4]

- (NSUInteger) animatedImageFrameCount
required

Total animated frame count. If the frame count is less than 1, then the methods below will be ignored.

◆ animatedImageFrameCount [3/4]

- (NSUInteger) animatedImageFrameCount
required

Total animated frame count. If the frame count is less than 1, then the methods below will be ignored.

◆ animatedImageFrameCount [4/4]

- (NSUInteger) animatedImageFrameCount
required

Total animated frame count. If the frame count is less than 1, then the methods below will be ignored.

◆ animatedImageLoopCount [1/4]

- (NSUInteger) animatedImageLoopCount
required

Animation loop count, 0 means infinite looping.

◆ animatedImageLoopCount [2/4]

- (NSUInteger) animatedImageLoopCount
required

Animation loop count, 0 means infinite looping.

◆ animatedImageLoopCount [3/4]

- (NSUInteger) animatedImageLoopCount
required

Animation loop count, 0 means infinite looping.

◆ animatedImageLoopCount [4/4]

- (NSUInteger) animatedImageLoopCount
required

Animation loop count, 0 means infinite looping.


The documentation for this protocol was generated from the following files: