antoninbiret / absteppedprogressbar Goto Github PK
View Code? Open in Web Editor NEWABSteppedProgressBar is an animated and customisable stepped progress bar for iOS written in Swift
License: MIT License
ABSteppedProgressBar is an animated and customisable stepped progress bar for iOS written in Swift
License: MIT License
Hello,
I have the following code:
-(NSString *)progressBar:(ABSteppedProgressBar *)progressBar textAtIndex:(NSInteger)index {
if ([self.listMenuParts[index][1] isEqualToString:@"YES"]) {
return @"✓";
} else {
return @"";
}
}
When the index returns ✓ then the symbol appears on the bubble, but when the index returns "" the bubble is not redrawed. I've been using [self.progressBar setNeedsDisplay] but it doesn't work for this exemple.
How to solve this problem?
Best Regards,
Luis Da Costa
Please update ABSteppedProgressBar to support cocoapods on Swift 3
let attString = NSAttributedString(string: self.string as! String, attributes: attributes as? [String : AnyObject])
File name : ABTextLayerExtension.swift
Hi,
Could you please guide if we can add images in place of stepTextColor and steptext in progress bar?
Is this library compatible with Objective c? Because i am not able to get the delegate methods in objective c Class.
Hi,
The progress bar will stop rendering if the same value is set at currentIndex
.
Thanks,
H.
hey, cool stuff.
Is it possible to add RTL support?
Hi,
Would be great to be able to set different step texts as [A, B, C..], or at least start from 1. Standard users (not programmers) are not that used to see a 0 as the first step.
Thank you,
H.
Hi here it works well for setting current index (INT)
I need also percentage support based on percentage 15/100 it will accordingly like in middle of some progress ?
Is it possible ?
How can I inform progressbar that my data has updated ? I need a method like reloadData() in tableviews.
Hi, this is a great library for stepped progress bar and i've been using it since swift 3.
And now i update it from version 0.0.8 to version 0.2.0 for support in swift 4.
But after update there is an issue from ABTextLayerExtension.
let attributes = [NSAttributedStringKey.font: font]
Type 'NSAttributedStringKey' (aka 'NSString') has no member 'font'<
Can you help me to fix this?
Appreciate your help.
Hi Antonin,
first of all thanks for this great project. It really helped me out.
Can you please merge the swift3 branch into master and create the 0.8 version to support Swift 3?
Thanks for the awesome library.
Is it possible to have the progress bar in vertical position? I can do it myself if I know where to look.
Thanks again
when i rotate view stepper progress damaged
I have a case where I depending on which step the user is on, will need to change the text of the previous step to "V" as in "Done". Any suggestions on how to achieve this without the code becoming very hacky? Also, would be awesome to have both a label inside the circle and a subtitle label underneath the circle.
I am trying to have a ScrollView determine the index selected in my ABSteppedProgressBar, however when I use progressBar.currentIndex in ScrollViewDidScroll function, my progress bar no longer appears in my view. Any ideas?
Here is a snippet of code:
import UIKit
import ABSteppedProgressBar
class ViewController: UIViewController, UIScrollViewDelegate, ABSteppedProgressBarDelegate {
@IBOutlet weak var progressBar: ABSteppedProgressBar!
@IBOutlet weak var scrollView: UIScrollView!
var index = 0
override func viewDidLoad() {
super.viewDidLoad()
scrollView.delegate = self
progressBar.delegate = self
var i = 0
for _ in 0...5 {
let label = UILabel(frame: CGRect(x: self.view.frame.width * CGFloat(i) + self.view.frame.width/2 - 50, y: self.scrollView.frame.height / 2, width: 100, height: 50))
label.layer.borderColor = UIColor.blueColor().CGColor
label.layer.borderWidth = 2
label.text = "\(i + 1)"
i++
self.scrollView.addSubview(label)
}
scrollView.frame = CGRectMake(0, 0, self.view.frame.width * 6, self.scrollView.frame.height)
scrollView.contentSize = CGSizeMake(CGFloat(self.view.frame.width) * CGFloat(6), self.scrollView.frame.height)
}
func scrollViewDidScroll(scrollView: UIScrollView) {
index = Int(self.scrollView.contentOffset.x / self.scrollView.frame.size.width)
print (index)
progressBar.currentIndex = index
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.