Simple loading dots view, light and quite configurable.
let dotsView = LoadingDotsView()
dotsView.translatesAutoresizingMaskIntoConstraints = false
addSubview(dotsView)
NSLayoutConstraint.activate([
dotsView.centerXAnchor.constraint(equalTo: centerXAnchor),
dotsView.centerYAnchor.constraint(equalTo: centerYAnchor)
])
- Number of dots
- Dot radius: Actually, it is the dot diameter.
- Dot separation: Separation between dots.
- Colors: Background color of the dots. If the array containts more than one color, a gradient will be added with those colors. If contains one color, no gradient will be created, just the color.
- Animation: The desired animation from the available options.