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
/// - action: The action to perform. The first arg is the loaded image, the second arg is the loaded image data, the third arg is the cache type loaded from. If `action` is `nil`, the call has no effect.
263
296
/// - Returns: A view that triggers `action` when this image load successes.
/// - action: The action to perform. The first arg is the received size, the second arg is the total size, all in bytes. If `action` is `nil`, the call has no effect.
272
305
/// - Returns: A view that triggers `action` when this image load successes.
/// - Note: This is useful for some cases, for example, always specify NSDefaultRunLoopMode, if you want to pause the animation when user scroll (for Mac user, drag the mouse or touchpad)
363
394
/// - Parameter runLoopMode: The runLoopMode for animation
/// Whether or not to pause the animation (keep current frame), instead of stop the animation (frame index reset to 0). When `isAnimating` binding value changed to false. Defaults is true.
370
401
/// - Note: For some of use case, you may want to reset the frame index to 0 when stop, but some other want to keep the current frame index.
371
402
/// - Parameter pausable: Whether or not to pause the animation instead of stop the animation.
372
403
publicfunc pausable(_ pausable:Bool)->WebImage{
373
-
varresult=self
374
-
result.pausable = pausable
375
-
return result
404
+
self.imageConfiguration.pausable = pausable
405
+
returnself
376
406
}
377
407
378
408
/// Whether or not to clear frame buffer cache when stopped. Defaults is false.
379
409
/// Note: This is useful when you want to limit the memory usage during frequently visibility changes (such as image view inside a list view, then push and pop)
380
410
/// - Parameter purgeable: Whether or not to clear frame buffer cache when stopped.
381
411
publicfunc purgeable(_ purgeable:Bool)->WebImage{
382
-
varresult=self
383
-
result.purgeable = purgeable
384
-
return result
412
+
self.imageConfiguration.purgeable = purgeable
413
+
returnself
385
414
}
386
415
387
416
/// Control the animation playback rate. Default is 1.0.
@@ -392,14 +421,14 @@ extension WebImage {
392
421
/// `< 0.0` is not supported currently and stop animation. (may support reverse playback in the future)
393
422
/// - Parameter playbackRate: The animation playback rate.
0 commit comments