Comments (9)
Hi.
Have you tried to change progressBarColor
value?
from linearprogressbar.
Yes. I have tried to change value of progessBarColor.
But it's not changing.
from linearprogressbar.
Can you show some code examples?
from linearprogressbar.
Sorry for the late reply.
I am using below code.
let progressBar: LinearProgressBar = {
let progressBar = LinearProgressBar()
progressBar.progressBarColor = .systemYellow
return progressBar
}()
from linearprogressbar.
Did you set a frame of progressBar
or added some constraints?
from linearprogressbar.
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.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from linearprogressbar.