Since

3.2.0

GifImage is used to store the gif data read from the filesystem. It can be set to UI objects' properties (e.g. UI.GifImageView.gifImage). GifImage's file should not be in images folder. You can use assets folder.

Example

import GifImage from '@smartface/native/ui/gifimage';
import GifImageView from '@smartface/native/ui/gifimageview';

const myGifImage = GifImage.createFromFile("assets://smartface.gif")
const myGifImageView = new GifImageView({
gifImage: myGifImage,
width: 200, height: 200
});

myPage.layout.addChild(myGifImageView);

Hierarchy

Properties

_nativeObject: any

Accessors

  • get nativeObject(): any
  • Returns any

  • set nativeObject(value: any): void
  • Parameters

    • value: any

    Returns void

  • get ios(): TProps["ios"]
  • Returns TProps["ios"]

  • get android(): TProps["android"]
  • Returns TProps["android"]

  • get android(): undefined | AndroidProps
  • Returns undefined | AndroidProps

  • get ios(): undefined | iOSProps
  • Returns undefined | iOSProps

  • get loopCount(): number
  • Gets/Sets the loopCount of gifImage. This property is readonly on iOS.

    Android

    Ios

    Since

    3.2.0

    Returns number

  • set loopCount(value: number): void
  • Gets/Sets the loopCount of gifImage. This property is readonly on iOS.

    Android

    Ios

    Since

    3.2.0

    Parameters

    • value: number

    Returns void

  • get frameCount(): number
  • Gets/Sets the frameCount of gifImage.

    Android

    Ios

    Since

    3.2.0

    Returns number

  • get instrinsicSize(): Size
  • Gets/Sets the instrinsicSize of gifImage.

    Android

    Ios

    Since

    3.2.0

    Returns Size

Methods

  • Parameters

    • Optional params: Partial<Record<string, any>>

    Returns void

  • Parameters

    Returns void

  • Creates an GifImage instance from given file path. GifImage's file should not be in images folder. You can use assets folder.

    Example

    import GifImage from '@smartface/native/ui/gifimage';
    const myGifImage = GifImage.createFromFile("assets://smartface.gif");

    Method

    createFromFile

    Returns

    An GifImage instance.

    Android

    Ios

    Static

    Since

    3.2.0

    Parameters

    • path: string

      GifImage file path

    • Optional width: number
    • Optional height: number

    Returns null | IGifImage

Constructors

Generated using TypeDoc