B4i Library GifView (FLAnimatedImage)

Based on https://github.com/Flipboard/FLAnimatedImage
Not so powerful as Lottie, but more simple.

Installation: Library.zip.
Source code (for whom is interesting) - XCode.zip.

How to use ...
Declare an object Private gif As GifView and intialize it, for example, gif.Initialize (File.DirAssets, "MyGif.Gif", Page1.RootPanel, 100, 100, 500, 300, True)
If you want to replace a picture, initialize again with another parameters. If you want to free resources only, use Release method.

Simple Demo --

To change a picture, rotate a phone.
 

Attachments

  • XCode (source).zip
    100.4 KB · Views: 7
  • Library.zip
    141.4 KB · Views: 19
Last edited:

ilan

Expert
Licensed User
Longtime User
hi , i tried your lib but i am getting a crash:

Error occurred on line: 3057 (Main)
Method not found: Initialize::, target: <iGifView: (null)>
Stack Trace: (
CoreFoundation __exceptionPreprocess + 350
libobjc.A.dylib objc_exception_throw + 48
CoreFoundation +[NSException raise:format:] + 188
result +[B4I runDynamicMethod:method:throwErrorIfMissing:args:] + 386
result -[B4IShell runVoidMethod] + 202
result -[B4IShell raiseEventImpl:method:args::] + 1933
result -[B4IShellBI raiseEvent:event:params:] + 1357
result -[B4IDebugResumableSub resume::] + 370
result __21-[B4ICommon Sleep:::]_block_invoke + 55
libdispatch.dylib _dispatch_call_block_and_release + 12
libdispatch.dylib _dispatch_client_callout + 8
libdispatch.dylib _dispatch_main_queue_callback_4CF + 1212
CoreFoundation __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
CoreFoundation __CFRunLoopRun + 2329
CoreFoundation CFRunLoopRunSpecific + 438
GraphicsServices GSEventRunModal + 65
UIKitCore UIApplicationMain + 1621
result main + 112
libdyld.dylib start + 1
)

any idea what i should do?
 

Semen Matusovskiy

Well-Known Member
Licensed User
Could be variants.

1) Three days ago I made some changes in initial release. Probably, something mixed on your PC.
To be sure, please download Library.zip and Example.zip again.

Method not found: Initialize::, target: <iGifView: (null)>

confuses me a little. Latest release uses 8 input parameters (directory, filename, parent view, Left/Top/Width/Height, keep_aspect_ratio)
In initial release were 2 parameters only..

2) Error occurred on line: 3057 (Main) - as I understand, you use inside your app.
Does my sample work with your GIF ?

3) I checked in simulators
- iPhone 11 Max (IOS 13.3),
- iPhone 5s (IOS 11.4)
and physical iPhone 6s (IOS 13.3).

Please, describe your conditions (simulator or IPhone, which OS, MinorVersion). I'll try to check in simulators.
 
Last edited:
Top