relatedcode / ProgressHUD

ProgressHUD is a lightweight and easy-to-use HUD for iOS. Over 5000+ animations. ‼️
https://relatedcode.com
MIT License
2.83k stars 462 forks source link

Can I show a custom animation, like lottile's json file? #159

Open GengJian opened 1 year ago

GengJian commented 1 year ago

Existing methods are usually static Image or text, can you expose a method that allows a custom view to be passed in?

GengJian commented 1 year ago

lottie_iot_scan_radar.json

For example

{"v":"5.9.4","fr":25,"ip":0,"op":50,"w":735,"h":735,"nm":"搜索","ddd":0,"assets":[{"id":"image_0","w":735,"h":735,"u":"images/","p":"img_0.png","e":0}],"layers":[{"ddd":0,"ind":1,"ty":2,"nm":"搜索.png","cl":"png","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0],"e":[360]},{"t":49}],"ix":10},"p":{"a":0,"k":[367.5,367.5,0],"ix":2,"l":2},"a":{"a":0,"k":[367.5,367.5,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ip":0,"op":50,"st":0,"bm":0}],"markers":[]}

devahmedshendy commented 4 months ago

@GengJian Would you be able to show lottie animation?

hubin97 commented 2 months ago

It would be better if an interface was exposed for custom animations After looking at the source code, if you want to support Lotties, you can only fork it and modify or customize it yourself

hubin97 commented 6 days ago

support Lotties https://github.com/hubin97/ProgressHUD

GengJian commented 6 days ago

Good news

On Thu, 21 Nov 2024 at 16:14, Hubin_Huang @.***> wrote:

support Lotties https://github.com/hubin97/ProgressHUD

— Reply to this email directly, view it on GitHub https://github.com/relatedcode/ProgressHUD/issues/159#issuecomment-2490340999, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADFD4ZKZ6NEUBYZKGBLKJW32BWI5TAVCNFSM6AAAAABKUOAHBKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJQGM2DAOJZHE . You are receiving this because you were mentioned.Message ID: @.***>