Juanpe / SkeletonView

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting
MIT License
12.53k stars 1.1k forks source link

Delay the presentation of the skeletons #411

Closed Juanpe closed 3 years ago

Juanpe commented 3 years ago

Summary

Fixes #379

If using SkeletonView for views that are mostly updated quickly, the SkeletonView transition looks like a short flashing of the view.

The solution was to create two methods to delay the skeleton transition. So, now you can delay the presentation of the skeleton if the views update quickly.

func showSkeleton(usingColor: UIColor,
                  animated: Bool,
                  delay: TimeInterval,
                  transition: SkeletonTransitionStyle)
func showGradientSkeleton(usingGradient: SkeletonGradient,
                          animated: Bool,
                          delay: TimeInterval,
                          transition: SkeletonTransitionStyle)

Requirements

github-actions[bot] commented 3 years ago
Warnings
:warning: Consider **also** updating the README for other languages.

Generated by :no_entry_sign: Danger Swift against 254bf99f74485da0002a602625148c1bcc6ab9e7