InputProgress

public class InputProgress

Sets up and handle both the bottom view and UITextField bars

  • Internal identifier tag for the bottom view bar

    Declaration

    Swift

    private let viewBarIdentifier = 974216
  • Internal identifier tag for the UITextField accessory view progress bars

    Declaration

    Swift

    private let textfieldBarIdentifier = 395629
  • Internal identifier for an auxiliar accessory view necessary when there’s no accessory view on the UITextField

    Declaration

    Swift

    private let placeholderAccessoryViewIdentifier = 822563
  • The view which the bottom progress bar should be displayed

    Declaration

    Swift

    public var presentingView: UIView
  • The UITextField objects that should display the progress bars

    Declaration

    Swift

    public var textFields: [UITextField]
  • The current progress to be displayed. This value should be between 0 and 1. The default value is 0

    Declaration

    Swift

    public var progress: CGFloat = 0
  • The fill color of the progress bar. The default value is a light blue

    Declaration

    Swift

    public var progressBarColor: UIColor = #colorLiteral(red: 0.3294117647, green: 0.6392156863, blue: 1, alpha: 1)
  • The height of the progress bar. The default value is 5

    Declaration

    Swift

    public var progressBarHeight: CGFloat = 5
  • Determines if the bottom progress bar should be displayed or not. The default value is true

    Declaration

    Swift

    public var shouldDisplayBottomViewBar: Bool = true
  • Setup the progress bar view. For a custom progress abr, this method should be overriden

    Declaration

    Swift

    func setupProgressBar(frame: CGRect) -> UIView

    Parameters

    frame

    The frame of the progress bar

    color

    The color of the progress bar

    Return Value

    The progress bar UIView

  • Setup the bottom view progress bar. By default, this bar is the same as the accessory view progress bar. Override this method for the implementation of a different bar for the view.

    Declaration

    Swift

    func setupBottomViewBar(frame: CGRect) -> UIView

    Parameters

    frame

    The frame of the progress bar

    color

    The color of the progress bar

    Return Value

    The progress bar UIView

  • Adds the progress bar UIView on the bottom of the presentingView and on the top of each one of the textFields provided

    Declaration

    Swift

    private func updateBarState()

    Parameters

    progress

    A CGFloat value between 0 and 1 representing the percentage of the progress bar to be filled