ASProgressPopUpView icon indicating copy to clipboard operation
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 ?

Open steve111MV opened this issue 4 years ago • 0 comments

` 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>) {
    
}
 

} `

steve111MV avatar Jul 23 '20 15:07 steve111MV