Git Product home page Git Product logo

Comments (9)

Recouse avatar Recouse commented on September 26, 2024

Hi.
Have you tried to change progressBarColor value?

from linearprogressbar.

milanvthakor avatar milanvthakor commented on September 26, 2024

Yes. I have tried to change value of progessBarColor.
But it's not changing.

from linearprogressbar.

Recouse avatar Recouse commented on September 26, 2024

Can you show some code examples?

from linearprogressbar.

milanvthakor avatar milanvthakor commented on September 26, 2024

Sorry for the late reply.

I am using below code.

let progressBar: LinearProgressBar = {
let progressBar = LinearProgressBar()
progressBar.progressBarColor = .systemYellow
return progressBar
}()

from linearprogressbar.

Recouse avatar Recouse commented on September 26, 2024

Did you set a frame of progressBar or added some constraints?

from linearprogressbar.

milanvthakor avatar milanvthakor commented on September 26, 2024

No. I just added programmatically upon the webView.
Here is the code.

import MaterialProgressBar

let progressBar: LinearProgressBar = {
let lProgressBar = LinearProgressBar()
lProgressBar.progressBarColor = .systemYellow
return lProgressBar
}()

@IBOutlet weak var webView: WKWebView!

override func viewDidLoad() {
super.viewDidLoad()

//adding progress bar to webview
webView.addSubview(progressBar)
progressBar.startAnimating()

}

I am just displaying progressBar on top of webView

from linearprogressbar.

Recouse avatar Recouse commented on September 26, 2024

You should set a frame or add constraints to place a progress bar in view.

You can also use UIViewController extension to show/hide a progress bar on the top of the view controller.
From README

// Start animating
showProgressBar()

// Stop animating
hideProgressBar()

from linearprogressbar.

milanvthakor avatar milanvthakor commented on September 26, 2024

Ok. So i have added constraint to progressBar and it is showing at correct place with the custom color.
But I notice some problem.
showProgressBar() method create the one new default progressBar by its self with the default blue color and this method is not working with progressBar i have created.

And same with hideProgressBar() method, it's only hiding progressBar created by showProgressBar() method and not hiding my custom progressBar.

I have checked in your demo example also. You can see, you have created only three progressBar, but its showing 4(blue one at top). And hide button is only hiding that blue progressBar not the other three in stackView.

from linearprogressbar.

Recouse avatar Recouse commented on September 26, 2024

showProgressBar() and hideProgressBar() methods are UIViewController extension methods.
showProgressBar() adds view on the top of the view controller, and hideProgressBar() removes it.

I think your issue is resolved and I can close it. Reopen this or create a new one if you have any other questions.

from linearprogressbar.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.