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
/// Provide a max buffer size by bytes. This is used to adjust frame buffer count and can be useful when the decoding cost is expensive (such as Animated WebP software decoding). Default is nil.
306
+
///
307
+
/// `0` or nil means automatically adjust by calculating current memory usage.
308
+
/// `1` means without any buffer cache, each of frames will be decoded and then be freed after rendering. (Lowest Memory and Highest CPU)
309
+
/// `UInt.max` means cache all the buffer. (Lowest CPU and Highest Memory)
/// Whehter or not to enable incremental image load for animated image. See `SDAnimatedImageView` for detailed explanation for this.
318
+
/// - Note: If you are confused about this description, open Chrome browser to view some large GIF images with low network speed to see the animation behavior.
319
+
/// Default is true. Set to false to only render the static poster for incremental animated image.
320
+
/// - Parameter incrementalLoad: Whether or not to incremental load
/// The runLoopMode when animation is playing on. Defaults is `.common`
328
+
/// You can specify a runloop mode to let it rendering.
329
+
/// - 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)
330
+
/// - 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.
338
+
/// - 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.
339
+
/// - Parameter pausable: Whether or not to pause the animation instead of stop the animation.
340
+
publicfunc pausable(_ pausable:Bool)->WebImage{
341
+
varresult=self
342
+
result.pausable = pausable
343
+
return result
344
+
}
345
+
346
+
/// Whether or not to clear frame buffer cache when stopped. Defaults is false.
347
+
/// 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)
348
+
/// - Parameter purgeable: Whether or not to clear frame buffer cache when stopped.
349
+
publicfunc purgeable(_ purgeable:Bool)->WebImage{
350
+
varresult=self
351
+
result.purgeable = purgeable
352
+
return result
353
+
}
354
+
355
+
/// Control the animation playback rate. Default is 1.0.
356
+
/// `1.0` means the normal speed.
357
+
/// `0.0` means stopping the animation.
358
+
/// `0.0-1.0` means the slow speed.
359
+
/// `> 1.0` means the fast speed.
360
+
/// `< 0.0` is not supported currently and stop animation. (may support reverse playback in the future)
361
+
/// - Parameter playbackRate: The animation playback rate.
0 commit comments