SSCircularProgress provides circular loading bar, like Instagram loading bar. This library is written by Swift, simple and easy to use.
this branch supports swift 2.0
As SSCircularProgress inherits UIView and uses @IBDesignable, @IBInspectable, you can use it on IB and can change the line width and progress on Attributes Inspector
if you are using SDWebImage, the callback for progress can be like this
@IBOutlet weak var progressView: SSCircularProgress!
...
...
var progress = { [unowned self] (receivedSize: NSInteger, expectedSize: NSInteger) -> () in
var progress = CGFloat(receivedSize) / CGFloat(expectedSize)
self.progressView.updateProgress(progress)
}
and the callback for completed can be like this
var completed:SDWebImageCompletionBlock = { [weak self] (image:UIImage!, error:NSError!, cacheType:SDImageCacheType, imageUrl: NSURL!) in
...
...
self.progressView.hidden = true
}