Coder Social home page Coder Social logo

absteppedprogressbar's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

absteppedprogressbar's Issues

How to set again the progressbar textAtIndex ?

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

Crashing on Swift 4.0

let attString = NSAttributedString(string: self.string as! String, attributes: attributes as? [String : AnyObject])

File name : ABTextLayerExtension.swift

Feature request

  1. An unique ID for the progress bar, when more than one progress bar is added to the screen
  2. Ability to set progress value programmatically

Objective c

Is this library compatible with Objective c? Because i am not able to get the delegate methods in objective c Class.

RTL support

hey, cool stuff.
Is it possible to add RTL support?

[Feature] Custom step Numbers

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.

Update to Swift 4

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.

Can you please merge the Swift3 branch?

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?

Vertical Progress Bar

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

Changing the labels at any time once the sublayers are added

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.

ScrollViewDidScoll to change current Index

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
    }

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.