`
import Foundation
import UIKit
import SwiftUI
import ASProgressPopUpView
struct CrowdProgressBar: UIViewRepresentable {
typealias UIViewType = UIView
var progress: Float = 1.40
func makeUIView(context: UIViewRepresentableContext<CrowdProgressBar>) -> UIView {
let view = UIView(frame: .zero)
let progressView = ASProgressPopUpView()
progressView.tintColor = UIColor.init(named: "colorAccent")
progressView.popUpViewCornerRadius = 16
progressView.setProgress(self.progress, animated: true)
progressView.show(animated: true)
progressView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(progressView)
NSLayoutConstraint.activate([
progressView.widthAnchor.constraint(equalTo: view.widthAnchor),
progressView.heightAnchor.constraint(equalTo: view.heightAnchor)
])
return view
}
func updateUIView(_ uiView: UIView, context: UIViewRepresentableContext<CrowdProgressBar>) {
}
}
`
`
import Foundation
import UIKit
import SwiftUI
import ASProgressPopUpView
struct CrowdProgressBar: UIViewRepresentable {
typealias UIViewType = UIView
var progress: Float = 1.40
}
`