Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I want to use return NSStrings for any progress values using SwiftUI but i need help. Can someone complete the following implementation ? #18

Open
steve111MV opened this issue Jul 23, 2020 · 0 comments

Comments

@steve111MV
Copy link

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

}
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant