- December 17, 2024
- Mins Read
BPCircleActivityIndicator is a clean and easy-to-use Activity Indicator meant to display the progress of an ongoing task on iOS.
iOS 8.0
Swift 3.1
BPCircleActivityIndicator is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod “BPCircleActivityIndicator”
simply add the following line to your Cartfile:
github “ppth0608/BPCircleActivityIndicator”
Copy the folder Source/
to your project
Using BPCircleActivityIndicator isn’t difficult at all. There are two actual ways of implementing it in your project:
First, you’re about to add 1 UIViews to your Storyboard and setup custom classes (You can set custom classes in Identity Inspector) as it shown in the picture below
(When you set custom class BPCircleActivityIndicator, you can see how view looks like cuz @IBDesignable)
and, add Outlet in to your code
@IBOutlet weak var circleIndicator: BPCircleActivityIndicator!
if for some reason you’d like to setup BPCircleActivityIndicator manually you have to do the following step
var circleIndicator: BPCircleActivityIndicator!
override func viewDidLoad() {
super.viewDidLoad()
circleIndicator = BPCircleActivityIndicator(frame: CGRect(x: 0, y: 0, width: 30, height: 30))
view.addSubview(circleIndicator)
}
You can easily animate and stop animation
@IBAction func startButtonTapped(sender: UIButton) {
circleIndicator.animate()
}
@IBAction func stopButtonTapped(sender: UIButton) {
circleIndicator.stop()
}
if you want to setup rotate speed or interval, you can call methods as it shown in the code below (Custom color is not suppoerted yet)
@IBAction func startButtonTapped(sender: UIButton) {
circleIndicator
.rotateSpeed(0.6)
.interval(0.3)
.animate()
}
Default setting is shown in below
A vertical stackview which takes subviews with different widths and adds them to it's rows with paddings, spacings etc.
AudioManager is a Swift package that provides a modular and easy-to-use interface for implementing audio feedback in your applications. It ...