You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to implement a system where a GIFImageView will load a lead-in GIF, and then after the first GIF has played fully it will reset the GIFImageView to loop a secondary GIF indefinitely.
Currently, I have to implement the functions as follows:
I have to do it this way because in the following code, the variable gifLoopDuration will always be 0 if the 'prepareForAnimation()' method is called inside the extension:
The reason why it is always set to 0 is because all of the frame loading is offloaded to an internal queue in FrameLoader.swift, and there is no way to access that queue from outside the Animator class.
What I would like to be changed is have a method (possibly inside GIFImageView) that will return the animation time for a loaded GIF in a closure, so that all the frames can still be loaded asynchronously but we still can have the knowledge of how long the loaded GIF will take.
The text was updated successfully, but these errors were encountered:
I am trying to implement a system where a GIFImageView will load a lead-in GIF, and then after the first GIF has played fully it will reset the GIFImageView to loop a secondary GIF indefinitely.
Currently, I have to implement the functions as follows:
And in my ViewController:
I have to do it this way because in the following code, the variable gifLoopDuration will always be 0 if the 'prepareForAnimation()' method is called inside the extension:
The reason why it is always set to 0 is because all of the frame loading is offloaded to an internal queue in FrameLoader.swift, and there is no way to access that queue from outside the Animator class.
What I would like to be changed is have a method (possibly inside GIFImageView) that will return the animation time for a loaded GIF in a closure, so that all the frames can still be loaded asynchronously but we still can have the knowledge of how long the loaded GIF will take.
The text was updated successfully, but these errors were encountered: