ASProgressPopUpView
ASProgressPopUpView copied to clipboard
I want to use return NSStrings for any progress values using SwiftUI but i need help. Can someone complete the following implementation ?
` 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>) {
}
} `