0

I want to make KDCircularProgressView programmatically. I included KDCircularProgressView.swift file from https://github.com/kaandedeoglu/KDCircularProgress.

Here is code form UIViewController:

private var progressView: KDCircularProgress!

private func setupProgressView(){
        progressView = KDCircularProgress(frame: CGRect(x: 100, y: 100, width: 100, height: 100))
        progressView.startAngle = 90
        progressView.angle = 90
        progressView.trackColor = UIColor.red
        progressView.progressColors = [UIColor.white]
        progressView.center = view.center

    }

I am calling this function in viewDidLoad, but nothing is showing on screen.

Rango
  • 229
  • 1
  • 4
  • 14

1 Answers1

2

add it to main view

 self.view.addSubview(progressView)
Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87